Commit Graph

354 Commits (master)

Author SHA1 Message Date
Isaac Connor b0d0021b71 Remove dead code 2025-07-18 18:23:12 -04:00
Isaac Connor 4fb00af91a Allow forcing stream mode 2025-07-18 18:21:42 -04:00
Isaac Connor 06636d58fb Show volume controls for rtsp2web to 2025-07-17 15:35:54 -04:00
Isaac Connor bbdb15e1e4 In kill, just clear src. It calls stop already, which will change the url to a single image. Handle the case when the src doesn't have a mode= in it's query params. 2025-07-16 16:00:34 -04:00
Isaac Connor d501be6ff0 Only show volumeControls for go2RTC 2025-07-16 14:46:29 -04:00
Isaac Connor b7fbfe5c4f Remove references to Go2RTCType which we don't use. Also removed failed attempt at startGo2RTCplay function 2025-07-06 22:26:04 -04:00
IgorA100 a26a2e8020
Merge branch 'master' into patch-826436 2025-07-02 15:54:06 +03:00
Isaac Connor a27a1bc5e5 Use post instead of get. Fixes #4345 2025-07-02 08:29:48 -04:00
IgorA100 d2710e41f7
Update MonitorStream.js 2025-07-02 14:25:01 +03:00
IgorA100 999a60a7af
Update MonitorStream.js 2025-07-02 14:15:52 +03:00
Isaac Connor 104901c8f8 fix eslint, remove debug 2025-06-29 09:27:31 -04:00
Isaac Connor 25f03a5e3e Allow Go2RTC/RTSP2Web or Janus when player is not specified 2025-06-26 17:18:02 -04:00
Isaac Connor b0fdc628d1 Add Go2RTC support. Cleanup RTSP2Web and Janus code. Add volume and mute button support. 2025-06-26 15:02:34 -04:00
IgorA100 63a54f776c
If browser does not support 'RTCPeerConnection', display message instead of image (MonitorStream.js) 2025-04-10 16:44:25 +03:00
IgorA100 c5f14170ed
If codec is not supported, display message instead of image (MonitorStream.js) 2025-04-10 16:33:29 +03:00
IgorA100 9db8a2ee34
Control RTCPeerConnection and video codec support, stop all monitors when closing the page, etc. (MonitorStream.js)
Added this.name and this.capturing to monitor stream
this.capturing is not used yet.

If the browser does not support "RTCPeerConnection", then warn in the console, avoid errors and repeated restarts

When closing the page, not only close the Web socket for MSE, but also stop all monitors. This is more correct, since it will allow you to avoid a number of errors when closing the page.

If the codec is not supported by the browser - there is no point in performing repeated restarts. Just stop.
2025-04-10 15:06:27 +03:00
Isaac Connor 4300a5872d
Merge pull request #4288 from IgorA100/patch-193100
Fix: Requires using MediaSourse existence check (MonitorStream.js)
2025-04-03 14:17:47 -04:00
IgorA100 a8e3c097f0
Update MonitorStream.js 2025-04-03 15:49:21 +03:00
IgorA100 45d480445e
Fix: Show more information in console when outputting "Image stream has loaded!..." message (MonitorStream.js) 2025-04-03 13:58:41 +03:00
IgorA100 4dea8527ac
Fix: Check RTCPeerConnection state before executing "setRemoteDescription" (MonitorStream.js)
This will avoid unnecessary errors in the console.
2025-04-03 13:05:28 +03:00
IgorA100 869cb3745d
tabs -> space (MonitorStream.js) 2025-04-03 00:59:15 +03:00
IgorA100 2a0b7f4518
Fix: RTSP2Web type WebRTC. Check RTCPeerConnection status before setLocalDescription (MonitorStream.js) 2025-04-03 00:57:04 +03:00
IgorA100 fcd0520190
Fix: Requires using MediaSourse existence check (MonitorStream.js) 2025-04-02 23:53:30 +03:00
Isaac Connor b7b87e50c9
Merge pull request #4286 from IgorA100/patch-44013
Fix: Using RTSP2Web type MSE. If WebSocket is not ready, then do not add packets to the buffer, this will cause an error (MonitorStream.js)
2025-04-02 13:37:24 -04:00
IgorA100 b1fadf96c1
Place the "readyState" check above (MonitorStream.js) 2025-04-02 17:02:03 +03:00
IgorA100 40a2ef82f9
Fix: It is necessary to check the state of not WebSocket but MediaSource (MonitorStream.js) 2025-04-02 16:37:52 +03:00
IgorA100 7282177a53
Fix: Prevent error on startRTSP2WebPlay() if RTCPeerConnection was previously created (MonitorStream.js) 2025-04-02 16:16:14 +03:00
IgorA100 3a68091500
Fix: Using RTSP2Web type MSE. If the socket is not ready, then do not add packets to the buffer, this will cause an error (MonitorStream.js) 2025-04-02 13:04:57 +03:00
IgorA100 780729e4a7
Fix: When connection is lost using RTSP2Web type==WebRTC, restart the stream (MonitorStream.js) 2025-04-02 11:59:36 +03:00
IgorA100 50232ca247
Remove extra space (MonitorStream.js) 2025-03-28 10:22:53 +03:00
IgorA100 8af23bac05
Fix: Use addEventListener 'beforeunload' instead of window.onbeforeunload (MonitorStream.js)
Because there can be multiple "beforeunload" event handlers on one page and they all must be executed.
2025-03-28 10:18:14 +03:00
IgorA100 12c8fc8a40
Fix: Set this.started = false when initializing "MonitorStream" & wsMSE restart stream when error (MonitorStream.js)
Also added: If wsMSE socket error occurs, restart the stream.
2025-03-16 15:29:12 +03:00
IgorA100 16c984066f
Fix: Don't lose "this" environment when calling "setTimeout" (MonitorStream.js)
And also remove the unnecessary check "&& this.streamStartTime !==0" when analyzing stream delay
2025-02-27 19:49:32 +03:00
IgorA100 31b66692df
Missing semicolon (MonitorStream.js) 2025-02-27 15:53:25 +03:00
IgorA100 e6ec2d3c6a
Remove unused code + do not analyze the stream lag until the stream has started (MonitorStream.js) 2025-02-27 15:50:06 +03:00
IgorA100 b0ab258207
Chore: Eslint fix (MonitorStream.js) 2025-02-27 13:55:32 +03:00
IgorA100 4ea26148ee
Ability to switch Primary/Secondary stream for RTSP2Web (MonitorStream.js)
1. RTSP2Web type MSE has been implemented to work more correctly.
2. Minor fixes
2025-02-27 13:11:03 +03:00
Isaac Connor 46e283a9a2 Merge branch 'patch-146634' of github.com:IgorA100/zoneminder into IgorA100-patch-146634 2025-02-26 12:37:38 -05:00
Isaac Connor b17067ed5e Update hls.js to 1.5.20. Instead of #4213 2025-02-26 09:33:32 -05:00
IgorA100 92cead92b2
Added support for selecting Secondary stream for RTSP2Web (MonitorStream.js) 2025-02-22 21:18:32 +03:00
Isaac Connor 9afec506a9
Merge pull request #4217 from IgorA100/patch-836420
The most correct transmission of RTSP stream with audio support when using RTSPToWeb
2025-02-12 16:05:20 -05:00
IgorA100 234b21d42f
Correctly stop RTSP2Web Type HLS when executing "MonitorStream.stop()" (MonitorStream.js)
1. Correctly stop RTSP2Web Type HLS when executing "MonitorStream.stop()"

2. Merged with Fix: Stop RTSP2Web Type HLS when stream stops #4214
2025-02-02 20:47:31 +03:00
IgorA100 4eff84b80e
Fix: URL parameters for RTSP2Web Type MSE (MonitorStream.js)
You can't combine the path and search parameters in one line, because there may be problems, for example the "?" sign will be converted to "%3F and the socket will not be created!
2025-02-02 17:06:19 +03:00
IgorA100 32badf1b6c
Fis space (MonitorStream.js) 2025-02-02 14:42:59 +03:00
IgorA100 b65fb1bbdb
Fix space (MonitorStream.js) 2025-02-02 14:37:28 +03:00
IgorA100 33ec46d941
Fix Eslint (MonitorStream.js) 2025-02-02 14:31:01 +03:00
IgorA100 d38472597e
The most correct transmission of RTSP stream with audio support (MonitorStream.js) 2025-02-02 14:14:15 +03:00
IgorA100 1d78a10cc1
Fix: Stop RTSP2Web (close RTCPeerConnection) when playback stops (MonitorStream.js) 2025-01-28 23:11:43 +03:00
Isaac Connor 3307c9ea90 Don't log cant edit 2025-01-07 16:55:02 -05:00
Isaac Connor 72330a5234 Fix api url getting monitors for map 2024-12-18 13:44:20 -05:00
Isaac Connor 1de8d76cae Remove debug of forceAlarmButton 2024-10-29 13:31:11 -04:00
Isaac Connor ce1a1b87e9 Only try to send a command to enable analysis frames if we are streaming through zms. prevents an error being logged 2024-10-22 16:18:31 -04:00
Isaac Connor c2fe3ce1e8 Fix eslint 2024-10-15 18:10:05 -04:00
Isaac Connor e306dcf972
Merge pull request #4163 from IgorA100/patch-180200
Chore: Removed the use of the "delay" constant as it is no longer used when starting monitors on the Montage page
2024-10-03 06:51:14 -04:00
IgorA100 5790a0d03b
Recovered spaces that I accidentally deleted (MonitorStream.js) 2024-10-02 19:35:54 +03:00
IgorA100 701d485773
Removed the "delay" argument from the "start" function as it is no longer used (MonitorStream.js) 2024-10-02 19:33:37 +03:00
IgorA100 8843d8c18a
Fix: Restored monitors start with delay (MonitorStream.js)
Probably it broke at some point. Or maybe it never worked, but in montage.js monitors start with a delay:
"monitor.start(delay);"
2024-10-02 13:37:05 +03:00
Isaac Connor 35f2dee620 add setGridStack. Rework logic on enable/disable motion anf force/cancel alarm to match when using rtsp2web. Add support for score and analysing in status response. 2024-10-01 17:13:30 -04:00
Isaac Connor 506cdc5e66 Only show non-deleted monitors 2024-09-30 09:32:35 -04:00
Isaac Connor 53ffcd4121 In play/pause, start/stop rtsp2web as well as zms stream. Also stop status requests. Rework the enable/disable alarms and force alarm buttons when using rtsp2web. 2024-09-25 14:54:58 -04:00
IgorA100 52a5bf2a1f
Chore: Eslint (panzoom.js) 2024-09-18 12:30:04 +03:00
IgorA100 edf7f808b0
Fix: Panning didn't work when using "preventDefault" (panzoom.js)
This happened after PR #4137
When Scale panZoom > 1, you need to use "preventDefault" for Panning to work correctly. But at the same time (if Scale panZoom > 1), clicking on the progress bar generated by video.js will not work.
In principle, this is not critical, because when increasing, the progress bar generated by video.js usually goes beyond the visible boundaries.
2024-09-18 12:23:33 +03:00
IgorA100 0ecb9a7754
Fix: Disabled preventDefault() when initializing PanZoom (panzoom.js) 2024-09-17 17:42:41 +03:00
IgorA100 b59c2f564c
Chore: Remove extra space (panzoom.js) 2024-09-17 10:53:49 +03:00
IgorA100 6f50c7169e
Fix: When executing "setTouchAction: function(el)" check if the element is passed to the function (panzoom.js) 2024-09-17 10:51:57 +03:00
Isaac Connor 2ca08fb546 Track started state for RTSP2Web and Janus as well 2024-09-06 09:33:55 -04:00
Isaac Connor 1e4bb4798e Update auth in zms url when scaling as it may have been running for a while and need updating 2024-08-22 14:57:28 -04:00
IgorA100 0717a2d324
Chore: Removed extra spaces (panzoom.js) 2024-08-20 13:07:00 +03:00
IgorA100 f2323426a0
chore: remove console.log (panzoom.js) 2024-08-20 13:03:08 +03:00
IgorA100 b0511e31fa
chore: Enable "touchAction" if Zoom=1 and disable if Zoom<>1 (panzoom.js)
Enable "touchAction" if Zoom=1 and disable if Zoom<>1
This will allow canvas panning when capturing an image on mobile devices with Zoom=1
The issue may be closed: https://forums.zoneminder.com/viewtopic.php?p=135128&sid=7e7685052e5f107a364dfd445565643f#p135128
2024-08-20 12:53:23 +03:00
Isaac Connor 37e7da4dfa Don't keep our own copy of auth credentials. Use the global ones. When getting new auth from status request, update auth_relay as well. 2024-07-30 09:54:37 -04:00
Isaac Connor 43e21a3200 Update auth_hash in zms url 2024-06-28 14:33:59 -04:00
IgorA100 d9b9dfc77f
Chore: eslint (panzoom.js) 2024-06-14 15:47:02 +03:00
IgorA100 7fadd6444b
Merge branch 'ZoneMinder:master' into patch-144 2024-06-14 15:33:40 +03:00
IgorA100 845049c951
When initializing, specify any PanZoom & more parameters (panzoom.js)
+ During initialization, you can specify any parameters that will later be transferred directly to "Panzoom"

+ Added an experimental function for reducing the block containing the image (Shift+Alt+mouse wheel).
To do this, you need to initialize another object. For example like this:
 "zmPanZoom.init({objString: '.imageFeed', disablePan: true, contain: 'inside', additional: true});"
 The key parameter for additional control (Alt key) is "additional: true"

+ Code optimization
2024-06-14 15:31:19 +03:00
Isaac Connor 22f3910953 Use statusRefreshTimeout instead of delay on status requests. If new auth info is found in statusresponse, use it. 2024-06-06 18:10:53 -04:00
IgorA100 e0bfc12a66
Now addEventListener without an anonymous function (panzoom.js)
+ Now addEventListener without an anonymous function, which allows you to correctly removeEventListener for a specific PanZoom object
+ Disabling ".btn-zoom-in" and ".btn-zoom-out" only for the PanZoom object being disabled, not for all.
2024-06-07 00:13:01 +03:00
IgorA100 ba62d251cd
Chore: eslint (panzoom.js) 2024-06-06 20:16:19 +03:00
IgorA100 79073cab23
Added all other event handlers (panzoom.js) 2024-06-06 20:01:35 +03:00
IgorA100 d377d2f5dc
Добавил возможность инициализации с параметрами (panzoom.js)
+ Изменять стиль курсора в зависимости от disablePan & disableZoom
+ Добавлена обработка ошибочных ситуаций.
+ Добавлено назначение функций для прослушивания событий "panzoomchange", "panzoomzoom"
2024-06-06 19:54:56 +03:00
IgorA100 c3d4328adb
Fix: Avoid error if object was not initialized & more (panzoom.js)
- Do nothing if you click on the image without Ctrl or Shift
2024-06-05 21:12:14 +03:00
Isaac Connor e7eba3d33c
Merge pull request #4058 from IgorA100/patch-132
Added Scales = Max 480, 640, 800, 1024, 1280, 1600 px & added settings Stream Quality on Watch, Event & Montage page
2024-06-02 12:39:58 -04:00
IgorA100 4f9657c482
Fix: eslint (panzoom.js) 2024-06-01 23:37:37 +03:00
IgorA100 71a08c94dd
Fix: For bind/unbind events use namespaced (panzoom.js)
- When disable, also perform unbind keyup, keydown
- Code optimization.
2024-06-01 23:32:53 +03:00
IgorA100 7d86df0c04
Chore: eslint MonitorStream.js 2024-05-31 01:04:03 +03:00
IgorA100 5706bf2ade
Added $streamQuality processing (MonitorStream.js) 2024-05-31 00:51:49 +03:00
Isaac Connor 662fc2baf2 Turn on use strict 2024-05-29 10:26:42 -04:00
Isaac Connor 4a0ea62fa6 Merge branch 'master' of github.com:ZoneMinder/zoneminder 2024-05-29 10:10:54 -04:00
Isaac Connor 878c8a7687 In kill, turn the url from a streaming url into a single so as to actually stop the stream. 2024-05-29 10:10:36 -04:00
IgorA100 ca40a794d2
Added this.started = true/false when starting/stopping the monitor (MonitorStream.js) 2024-05-29 17:06:33 +03:00
Isaac Connor 69d5855653 Add another decimal digit to fps displays 2024-05-28 10:11:02 -04:00
Isaac Connor faa3ed3aa7
Merge pull request #4042 from IgorA100/patch-119
Chore: Moved PanZoom functions to "web/js/panzoom.js"
2024-05-27 17:08:50 -04:00
IgorA100 f0b13f0c11
Fix: function "this.setMaxFPS" (MonitorStream.js)
The function didn't work!
The parameter "maxfps" was passed to the function, and "currentSpeed" was passed to "streamCommand" instead of "maxfps"
2024-05-27 22:58:41 +03:00
IgorA100 075bbfc244
Fix eslint (panzoom.js) 2024-05-27 19:37:49 +03:00
IgorA100 c582e7ab5b
Added file panzoom.js 2024-05-27 19:32:25 +03:00
Isaac Connor 9f730bc0d7 Immediately do a status command when the image loads instead of waiting statusInterval for it. 2024-05-16 15:57:50 -04:00
IgorA100 d72303de48
Fix: eslint (MonitorStream.js) 2024-05-09 20:51:46 +03:00
IgorA100 418a18d59d
Changed the "setScale" function to support PanZoom on Montage & Watch page (MonitorStream.js)
\views\js\montage.js is affected
2024-05-09 20:14:16 +03:00
Isaac Connor 4b596b70f3 Fix eslint 2024-05-08 16:22:36 -04:00
IgorA100 a809a92d1f
Chore: eslint MonitorStream.js 2024-05-07 20:50:34 +03:00