This commit is contained in:
unknown 2023-12-11 18:01:34 +08:00
commit ebe8c43519
2 changed files with 13 additions and 15 deletions

View File

@ -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);
});

View File

@ -17,7 +17,7 @@
<div id="dqsxtxx">
<div class="headers">
<iframe
:src="'module/webs/index.html?1'"
:src="'module/webs/index.html?1?221.214.127.18'"
frameborder="0"
width="100%"
height="100%"
@ -60,7 +60,7 @@
<div class="spjk_one" v-for="(item, index) in sxtlist" :key="index">
<div class="jiankong">
<iframe
:src="'module/webs/index.html?' + item.channel"
:src="'module/webs/index.html?' + item.channel + '?' + item.ip"
frameborder="0"
width="100%"
height="100%"
@ -389,38 +389,38 @@ export default {
sxtlist: [
{
channel: "D19",
ip: "221.214.127.18",
name: "3号煤磨在线监测",
},
{
channel: "D14",
ip: "221.214.127.18",
name: "水泥散12#发货口",
},
{
channel: "69",
ip: "221.214.127.18",
name: "1#回转窑",
},
{
channel: "70",
ip: "221.214.127.18",
name: "辊压机",
},
{
channel: "71",
ip: "221.214.127.18",
name: "2#窑",
},
{
channel: "33",
name: "矿区全貌",
},
{
channel: "40",
name: "3#煤磨",
},
{
channel: "63",
ip: "221.214.127.18",
name: "垃圾处理北门外",
},
{
channel: "71",
ip: "221.214.127.18",
name: "2#窑",
},
],
@ -589,7 +589,6 @@ export default {
width: 184px;
height: 37px;
font-size: 22px;
font-family: MicrosoftYaHei;
color: #ffffff;
line-height: 20px;
}