Commit Graph

379 Commits (master)

Author SHA1 Message Date
IgorA100 989b4a8628
Fix: Missing semicolons (MonitorStream.js) 2025-07-24 23:50:35 +03:00
IgorA100 8da9cb3ba7
We will now manage player availability here (MonitorStream.js) 2025-07-24 23:41:49 +03:00
IgorA100 69a72700b9
Merge branch 'ZoneMinder:master' into patch-784062 2025-07-24 23:39:37 +03:00
IgorA100 ccaf00f842
Avoid JS errors when stopping go2rtc stream unsuccessfully (MonitorStream.js) 2025-07-24 19:00:24 +03:00
IgorA100 bded13752c
On Montage page StreamChannel is now always used from the monitor settings, as it was before (MonitorStream.js)
Added support for streamChannel = 'default' for Go2RTC
2025-07-24 16:50:46 +03:00
IgorA100 e00f8dc24b
The MonitorStream.start() method can now be passed both a numerical channel value and a string, including an empty one. (MonitorStream.js) 2025-07-24 16:24:04 +03:00
IgorA100 e588ad4e7a
Support switching between Primary & Secondary streams (MonitorStream.js)
To #4381
2025-07-23 18:10:01 +03:00
Isaac Connor 783974c4b4
Merge pull request #4376 from IgorA100/patch-771054
Fix: Run ResizeObserver for Go2RTC on Montage page
2025-07-22 19:46:22 -04:00
IgorA100 c683b14a89
Fix: tabs->space (MonitorStream.js) 2025-07-23 00:49:10 +03:00
IgorA100 de57d830e4
We do not use the document hiding/showing analysis from "video-rtc.js", because we have our own analysis (MonitorStream.js) 2025-07-23 00:47:23 +03:00
IgorA100 fc5e53d00f
Fix: Broken channel switching (MonitorStream.js)
You can't use "!streamChannel" in the condition, because "streamChannel = 0" will be true.
That is, we have channel 0 and channel 1.
In this case, if you don't pass anything to the "MonitorStream.start" method, then the default channel specified in the monitor settings is used.
If we want to use channel 0, we call it like this:
MonitorStream.start(0)
If the first one, then like this:
MonitorStream.start(1)
If the default one from the monitor settings, then like this:
MonitorStream.start()
2025-07-23 00:02:12 +03:00
IgorA100 afeeb5dca0
When using go2rtc, perform an Observe on the newly created <video-stream> element (MonitorStream.js) 2025-07-22 19:34:14 +03:00
IgorA100 0f40b28d3b
We don't need a delay when stopping (MonitorStream.js)
The delay is used in the VideoRTC.disconnectedCallback() method
Alternatively, you can add an optional argument "immediately" to the disconnectedCallback() method, but I did not edit video-rtc.js
2025-07-21 23:57:08 +03:00
IgorA100 c758aa6889
Correctly close go2rtc stream when executing "stop" command (MonitorStream.js)
This should be enough.
2025-07-21 23:40:40 +03:00
Isaac Connor 7c6aa9e539 Fix eslint 2025-07-21 10:17:25 -04:00
IgorA100 b2e0d696ba
Revert "if" (MonitorStream.js) 2025-07-21 12:47:31 +03:00
IgorA100 e8ef6d729e
Stream stopping fix for RTSP2Web and Go2Rtc (MonitorStream.js)
Flow stops for Go2Rtc require further adjustment.
2025-07-21 11:21:06 +03:00
IgorA100 fcfc58e6a8
Don't change "src" attribute when using RTSP2Web (MonitorStream.js) 2025-07-20 11:52:51 +03:00
IgorA100 51c2083ef6
Returned the conditions as they were before (MonitorStream.js) 2025-07-20 11:33:59 +03:00
IgorA100 394f90fb1f
Update MonitorStream.js 2025-07-20 02:01:49 +03:00
IgorA100 3c744084c2
Remove Timeout and perform "reject()" immediately at the moment of unsuccessful attempt to delete MSE buffer (MonitorStream.js) 2025-07-20 01:56:46 +03:00
IgorA100 09c2463f70
Fix: Correct switching of players (MonitorStream.js)
- When changing the player, set the correct value in "this.RTSP2WebType"
- Incorrect placement of brackets in the conditions when starting a stream
- When stopping "webrtc", clear "stream.srcObject"
- When executing ".stopMse", limit the promise wait time to 500ms and, in case of failure, execute reject()
2025-07-20 01:33:56 +03:00
Isaac Connor 4dfa260458 Fix eslint 2025-07-19 17:08:44 -04:00
Isaac Connor acce1217b3 Only do Rtsp2Web resyncing if we are using rtsp2web. Fixes restarts with go2rtc 2025-07-19 16:59:20 -04:00
Isaac Connor 4043c02d51 Clear img/src before calling stop so that we don't try to load a still image in kill 2025-07-18 18:23:36 -04:00
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