From d1686607a33dccd8350144aeddb5a0e0bb5c599b Mon Sep 17 00:00:00 2001 From: lll Date: Mon, 11 Dec 2023 17:59:06 +0800 Subject: [PATCH] 1 --- public/module/webs/index.js | 7 +++---- src/views/Zhou/ZNYWJK.vue | 21 ++++++++++----------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/public/module/webs/index.js b/public/module/webs/index.js index f25ec9d..5ce77a4 100644 --- a/public/module/webs/index.js +++ b/public/module/webs/index.js @@ -150,6 +150,7 @@ const setVideoDom = () => { */ const onPreview = (isPlayback, url, playbackIndex, isChangeStream) => { let channel = window.location.href.split("?")[1]; + let ip = window.location.href.split("?")[2]; if ( playerInstance[WndIndex] && onlineChannel.indexOf(channel) > -1 && @@ -161,10 +162,10 @@ const onPreview = (isPlayback, url, playbackIndex, isChangeStream) => { onStopPreview(); var player = null; let options = { - wsURL: "ws://" + "221.214.127.18" + ":" + "8200" + "/rtspoverwebsocket", + wsURL: "ws://" + ip + ":" + "8200" + "/rtspoverwebsocket", rtspURL: "rtsp://" + - "221.214.127.18" + + ip + ":" + "8200" + `/cam/realmonitor?channel=${channel}` + @@ -179,7 +180,6 @@ const onPreview = (isPlayback, url, playbackIndex, isChangeStream) => { playbackIndex: playbackIndex, }; player = new PlayerControl(options); - player.on("MSEResolutionChanged", function (e) { console.log(e); }); @@ -191,7 +191,6 @@ const onPreview = (isPlayback, url, playbackIndex, isChangeStream) => { updateChannelList(); } }); - player.on("GetFrameRate", function (e) { console.log("GetFrameRate: " + e); }); diff --git a/src/views/Zhou/ZNYWJK.vue b/src/views/Zhou/ZNYWJK.vue index ab78338..dd66102 100644 --- a/src/views/Zhou/ZNYWJK.vue +++ b/src/views/Zhou/ZNYWJK.vue @@ -17,7 +17,7 @@