mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-08 02:12:17 -04:00
Play the second channel using Go2RTC on the Console page if it is available (skin.js)
This commit is contained in:
1 parent
7cf71f82b2
commit
dc1c4e231d
1 file changed
+4
-3
@@ -1466,7 +1466,7 @@ function createThumbnailOverlay(img, overlaySrc, dimensions, streamType, monitor
|
||||
}
|
||||
|
||||
if (isLive && useGo2rtc) {
|
||||
createGo2rtcStream(container, go2rtcSrc, monitorId || go2rtcMid, fallbackToMjpeg);
|
||||
createGo2rtcStream(container, img, go2rtcSrc, monitorId || go2rtcMid, fallbackToMjpeg);
|
||||
} else if (streamType === 'rtsp2web') {
|
||||
createRtsp2webStream(container, img, monitorId, fallbackToMjpeg, eventStart, statusBar);
|
||||
} else if (m3u8Exists && currentView !== 'frames') {
|
||||
@@ -1506,15 +1506,16 @@ function formatDateTime(date) {
|
||||
return date.toLocaleString(undefined, options);
|
||||
}
|
||||
|
||||
function createGo2rtcStream(container, src, mid, fallbackToMjpeg) {
|
||||
function createGo2rtcStream(container, img, src, mid, fallbackToMjpeg) {
|
||||
ensureVideoStreamLoaded().then(function() {
|
||||
if (!document.getElementById('thumb-overlay')) return;
|
||||
|
||||
const channel = (img.dataset.streamChannel && img.dataset.streamChannel.toLowerCase().indexOf("direct") !== -1 ) ? img.dataset.streamChannel : 'CameraDirectPrimary';
|
||||
const url = new URL(src);
|
||||
url.protocol = (url.protocol === 'https:') ? 'wss:' : 'ws:';
|
||||
url.pathname += '/ws';
|
||||
//url.search = 'src=' + mid + '_0';
|
||||
url.search = 'src=' + mid + '_CameraDirectPrimary';
|
||||
url.search = 'src=' + mid + '_' + channel;
|
||||
|
||||
const stream = document.createElement('video-stream');
|
||||
stream.style.cssText = 'width: 100%; height: 100%; display: block;';
|
||||
|
||||
Reference in new issue
Block a user