Commit Graph

7149 Commits

Author SHA1 Message Date
IgorA100
1bfeb2512d Added "disabled" class to #volumeControls and ".audio-control-mute" (skin.css) 2026-02-04 16:52:24 +03:00
IgorA100
8714f295b7 IDs for #volumeControls, #volumeSlider, #controlMute now include the monitor ID (watch.php)
And also #volumeControls by default has the class "disabled"
2026-02-04 16:40:52 +03:00
Isaac Connor
446b1a563b Define players for montage 2026-02-03 12:17:52 -05:00
Isaac Connor
ac4585b6b4 fix: use monitor's StreamChannel setting for go2rtc stream selection
Two issues caused monitors to stream from wrong channel:

1. In setChannelStream(), the expression `StreamChannel && SecondPath`
   returned SecondPath (often empty) instead of StreamChannel. Now
   correctly uses the monitor's configured StreamChannel.

2. In MonitorStream.start(), default channel only checked for
   CameraDirectSecondary and defaulted everything else to Restream.
   Now respects the actual StreamChannel setting.

Also improved fallback when selected option is disabled to find first
enabled option rather than always defaulting to Restream.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 13:01:50 -05:00
Isaac Connor
f05370eb05 fix: add missing Path and Restream fields to monitorData in watch view
The manageChannelStream() function expected Path and Restream fields
in monitorData to enable/disable StreamChannel options, but these
fields were not being populated. This caused CameraDirectPrimary and
Restream options to always be disabled on the watch view.

Also updated SecondPath to use validJsStr() for proper escaping.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 12:26:43 -05:00
Isaac Connor
eae89025ee refactor: rename RTSP2WebStream to StreamChannel
Rename applies to Go2RTC, Janus, and RTSP2Web streaming options.
Update enum values from Primary/Secondary to Restream/CameraDirectPrimary/CameraDirectSecondary.

- Add db migration zm_update-1.37.79.sql to rename column and migrate data
- Update C++ enum StreamChannelOption and member stream_channel
- Update PHP getStreamChannelOptions() method
- Update all JavaScript references
- Auto-select CameraDirectPrimary when Restream option becomes disabled

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 19:37:08 -05:00
Isaac Connor
d89f2e59db refactor: rename Janus_Use_RTSP_Restream to Restream
Rename Janus-specific restream fields to be more generic since they are
now used by Go2RTC and RTSP2Web as well:
- Janus_Use_RTSP_Restream → Restream
- Janus_RTSP_User → RTSP_User

Update visibility logic so the Restream checkbox appears when RTSPServer
is enabled AND any streaming service (Janus, Go2RTC, or RTSP2Web) is
selected, rather than only when Janus is enabled.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 18:47:37 -05:00
IgorA100
3dee901585 Fix: Removed duplicates (watch.css) 2026-01-30 19:59:56 +03:00
Isaac Connor
cbbdeb2910 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-30 11:41:09 -05:00
Isaac Connor
b254ea60a8 Remove hard coded scale=32 for the stream image. 2026-01-30 11:40:58 -05:00
Isaac Connor
c59bc3678f Add hevc_vaapi as an encoder option 2026-01-30 08:33:49 -05:00
Isaac Connor
59fdffa62b Handle no meminfo. 2026-01-30 08:33:49 -05:00
Isaac Connor
9502c79d91 feat: add motion analysis frame toggle to watch view
Add ability to view motion analysis frames on the watch view, similar
to the existing functionality in the zone edit view. Includes a toggle
button that switches between raw and analysis frames using the existing
MonitorStream.show_analyse_frames() method.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:17:32 -05:00
Isaac Connor
3a5f2cbccb fix: add AddNewRole button handler in options.js
The Add New Role button was not working because the AddNewRole
JavaScript function was missing from options.js. Added the handler
function following the same pattern as AddNewUser.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:37:26 -05:00
Isaac Connor
4e60cb96a7 feat: add User Roles feature for reusable permission templates
Add a User Roles system where roles define reusable permission templates.
When a user has a role assigned, the role provides fallback permissions
(user's direct permissions take precedence; role is used when user has 'None').

Database changes:
- Add User_Roles table with same permission fields as Users
- Add Role_Groups_Permissions table for per-role group overrides
- Add Role_Monitors_Permissions table for per-role monitor overrides
- Add RoleId foreign key to Users table

Permission resolution order:
1. User's direct Monitor/Group permissions (if not 'Inherit')
2. Role's Monitor/Group permissions (if user has role)
3. Role's base permission (if user's is 'None')
4. User's base permission (fallback)

Includes:
- PHP models: User_Role, Role_Group_Permission, Role_Monitor_Permission
- Role management UI in Options > Roles tab
- Role selector in user edit form
- REST API endpoints for roles CRUD
- Translation strings for en_gb

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:34:27 -05:00
Ben Dailey
c80542343a Remove Preview Rate Control. Disable BuiltIn Video controls. 2026-01-29 11:18:30 -05:00
Ben Dailey
d70fc62780 feat: honor zmWatchMuted cookie in thumbnail popup videos
Updated all three video creation functions in thumbnail overlays to
respect the user's mute preference stored in the zmWatchMuted cookie:
- go2rtc streams (video-stream element)
- RTSP2Web HLS streams
- MP4 video playback for recorded events

Default behavior remains muted unless user has explicitly set the
cookie to 'false' via the watch page volume controls.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 07:46:26 -05:00
Ben Dailey
8279458edd style: enhance thumbnail overlay status bar visuals
- Increase font size ~28% for better readability
- Add more spacing between video and status bar
- Enlarge LIVE dot with glow effect
- Make pulse animation more pronounced (scale 1.0 to 1.4)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:53:51 -05:00
Ben Dailey
fd5bd63808 feat: add status bar to thumbnail overlay with LIVE indicator and wall clock time
- Add status bar below video with LIVE indicator for live streams
- Show pulsing red dot animation for live streams
- Display wall clock time that updates as recorded video plays
- Add event start time data attribute to console and events pages
- Hide status bar when no content to display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 21:09:57 -05:00
Ben Dailey
d51790531a feat: add live streaming support to console thumbnail hover overlay
- Support go2rtc, RTSP2Web, and Janus streaming in thumbnail popups
- Separate still thumbnail logic from hover overlay streaming
- Still thumbnails use event snapshot when not decoding
- Hover overlay prioritizes live streaming over recorded video
- Refactor thumbnail JS into focused helper functions
- Fix video-stream.js path for dynamic import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:50:50 -05:00
Ben Dailey
3f69df433b Merge branch 'master' into ChangeThumbnails
Resolved conflict in web/ajax/console.php:
- Incorporated master's improved $streamSrc computation (modifies $options in place)
- Kept our streaming priority logic (go2rtc > rtsp2web > janus > event fallback)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 20:03:36 -05:00
Ben Dailey
65373ed8d3 feat: add Preview Rate dropdown to events page filter bar
Add a Preview Rate dropdown control that allows users to adjust the
playback speed of thumbnail hover preview videos on the events page.

- Add previewRateHtml() helper method to Filter class
- Add Preview Rate to simple_widget() filter bar with matching term styling
- Add getPreviewRate() and changePreviewRate() JS functions in skin.js
- Add helper functions in _monitor_filters.php for rate options
- Store selected rate in zmPreviewRate cookie (values: 100-1600 for 1x-16x)
- Add PreviewRate translation to en_gb.php
- Add CSS styling for preview rate control

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:06:03 -05:00
Ben Dailey
ee229d4257 feat: add event thumbnail fallback and go2rtc support for console hover overlay
When a monitor is not analyzing or decoding, the console thumbnail now
shows the most recent event's snapshot instead of attempting a live
stream. The hover overlay plays the event replay (with mp4 support if
available).

For active monitors with go2rtc enabled, the hover overlay now uses
go2rtc WebRTC streaming via the video-stream custom element, with a
3-second fallback to MJPEG if the connection fails.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:39:34 -05:00
Isaac Connor
d0358c89bb Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-28 10:03:10 -05:00
Isaac Connor
5162df68dd Make tfoot elements clickable the way they were before 2026-01-28 10:02:58 -05:00
Isaac Connor
d373696fe8 fix: critical bugs in skin.js
- Fix chained assignment creating implicit globals (shifted/ctrled/alted)
- Fix .done() callback executing immediately instead of on success
- Fix XOR operator (^) used instead of exponentiation in human_filesize()
- Fix invalid destructuring assignment in applyChosen()
- Fix implicit global creation in closeMbExtruder() call
- Add missing var declarations for runstate, length, modal variables

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 18:11:40 -05:00
Isaac Connor
87f0970a12 Merge pull request #4572 from BHMSD-bdailey/AddCurrentTimeToPlayback
Add Wall Clock Time to information below video playback of events
2026-01-27 17:29:20 -05:00
Ben Dailey
8d655af63f feat: replace in-place thumbnail zoom with centered overlay popout
Thumbnail hover now creates a separate overlay element centered
on-screen instead of transforming the original thumbnail in place.
The overlay shows the cached still image as a background for instant
display, with the stream or video layered on top.

When an event has an mp4 file (DefaultVideo), the overlay uses a
<video> tag at 5x playback speed for smooth hardware-decoded
playback. Falls back to MJPEG <img> stream with scale=32 when
no mp4 is available. On mouseout the stream/video connection is
explicitly stopped before the overlay is removed.

Removes the old .zoom/.zoom-console CSS classes and the console
overflow workarounds that were needed for the in-place approach.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:12:25 -05:00
Isaac Connor
9c59ce36eb Fix issues in montagereview 2026-01-27 15:20:09 -05:00
Isaac Connor
faa35e7c45 Cleanup filter loading. If filter query exists in query params, use that instead of loading from db 2026-01-27 15:19:43 -05:00
Isaac Connor
b3c79d3190 When submitting form serialize it to the history so that if we hit the back button we still have the filter contents. 2026-01-27 12:16:52 -05:00
Ben Dailey
b406fde272 Add Wall Clock Time to information below video playback of events 2026-01-26 22:35:12 -05:00
Isaac Connor
5820d07501 Add autocomplete=off 2026-01-26 11:56:42 -05:00
IgorA100
ec6c496801 Feat: Display AJAX execution errors in the browser console (skin.js) 2026-01-25 20:01:48 +03:00
Isaac Connor
23f18b2603 FIxes for cyrillic c, duplicated lasteight id on buttons. And make sure error_message is defined 2026-01-24 17:54:32 -05:00
Isaac Connor
75cfbfad58 Always define events and events_for_monitor. Remove dead code 2026-01-24 17:31:04 -05:00
Isaac Connor
c27b91cfa8 Attempt to improve layout 2026-01-24 17:15:49 -05:00
Isaac Connor
e0cc745720 feat: improve zmNg QR code section layout in user view
- Center-align QR code as focal point
- Add subtle box shadow and border radius to QR container
- Use compact inline form for optional password field
- Auto-generate QR code on page load, regenerate on password input
- Remove collapsed section, always show QR code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 16:45:48 -05:00
Isaac Connor
709b14c5bd Add URL for where qrcode.js comes from 2026-01-24 10:47:46 -05:00
Isaac Connor
c63317f371 If a single file is passed to output_script, handle it 2026-01-24 10:47:27 -05:00
Isaac Connor
f78b6890cf Sync up password name to camelCase. Add styles to fix visibility icon layout. 2026-01-24 10:47:01 -05:00
Isaac Connor
d43de8f3b8 feat: add zmNg mobile app QR code onboarding to user view
Add QR code generation feature to the user edit page that allows
administrators to quickly set up users in the zmNg mobile app.

- Add qrcode.min.js library for client-side QR code generation
- Add collapsible QR code section to user.php view
- Generate QR codes with zmNg-compatible JSON format containing
  profile name, portal URL, username, and password
- Profile name uses ZM_WEB_TITLE or ZM_HOME_URL if customized,
  otherwise defaults to 'ZoneMinder'
- Only visible when API is enabled and user has API access
- Add translation strings for new UI elements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:15:43 -05:00
Isaac Connor
3fc497122c Merge branch 'master' of github.com:ZoneMinder/zoneminder 2026-01-22 22:18:24 -05:00
Isaac Connor
1ac5e0ddc1 Add footer to the events table with sum of diskspace and duration in it. 2026-01-22 22:17:42 -05:00
Isaac Connor
9fff27542e Try to auto-calculate the best number of rows to paginate to 2026-01-21 20:06:51 -05:00
Isaac Connor
a728d9e0e8 Cleanup monitor filters. Allow setting by request, so that bookmarks work, otherwise ONLY use cookies. Clean up groups dropdown. 2026-01-21 15:19:39 -05:00
Isaac Connor
38183a73db Set default to mute 2026-01-20 22:19:46 -05:00
Isaac Connor
1fbfcd2d98 Set default visible=false for Manufacturer, Model and Sequence 2026-01-20 22:19:24 -05:00
Isaac Connor
a57ada1762 Default to Muted on watch 2026-01-20 16:49:09 -05:00
Isaac Connor
41ce8a2541 Add Manufacturer and Model to console 2026-01-17 12:32:47 -05:00