代码提交
This commit is contained in:
parent
a722270b89
commit
e455026e22
Binary file not shown.
|
@ -0,0 +1,108 @@
|
||||||
|
.mainContainer {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
@media screen and (min-width: 1152px) {
|
||||||
|
.mainContainer {
|
||||||
|
display: block;
|
||||||
|
width: 1152px;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container {
|
||||||
|
position: relative;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container:before {
|
||||||
|
display: block;
|
||||||
|
content: "";
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 56.25%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container > div {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container video {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.urlInput {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.centeredVideo {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-bottom: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logcatBox {
|
||||||
|
border-color: #CCCCCC;
|
||||||
|
font-size: 11px;
|
||||||
|
font-family: Menlo, Consolas, monospace;
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
text-align: left;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-input , .options {
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-input {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-input label {
|
||||||
|
flex: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-input input {
|
||||||
|
flex: auto;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.url-input button {
|
||||||
|
flex: initial;
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.options {
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,49 @@
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>视频监控</title>
|
||||||
|
</head>
|
||||||
|
<body style="margin:0px;width: 1000px;;height: 582px;overflow: hidden;z-index: 99;">
|
||||||
|
<script src="flv.min.js"></script>
|
||||||
|
<video id="videoElement" style="width: 1000px;height: 582px;" muted></video>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var a=getParam('name')
|
||||||
|
|
||||||
|
console.log(a,'sssss');
|
||||||
|
|
||||||
|
if (flvjs.isSupported()) {
|
||||||
|
var videoElement = document.getElementById('videoElement');
|
||||||
|
var flvPlayer = flvjs.createPlayer({
|
||||||
|
type: 'flv',
|
||||||
|
isLive: true,
|
||||||
|
// url: 'ws://172.16.1.209:8998/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@172.16.1.242:554/cam/realmonitor?channel=1&subtype=0'
|
||||||
|
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://admin:5Gpmlabs@10.16.1.1:10086/cam/realmonitor'
|
||||||
|
// url: 'ws://172.16.1.21:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||||
|
// url: 'ws://223.112.17.26:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||||
|
// url: 'ws://223.112.17.26:12309/rtsp/1/channel=1&subtype=0/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||||
|
url: 'ws://119.45.94.212:12309/rtsp/1/a/?url=rtsp://127.0.0.1:12310/live/'+a
|
||||||
|
});
|
||||||
|
flvPlayer.attachMediaElement(videoElement);
|
||||||
|
flvPlayer.load();
|
||||||
|
flvPlayer.play();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function getParam(name) {
|
||||||
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||||
|
//search,查询?后面的参数,并匹配正则
|
||||||
|
var r = location.search.substr(1).match(reg);
|
||||||
|
let val = 'videoPlayer'
|
||||||
|
window.parent.postMessage({
|
||||||
|
val
|
||||||
|
}, '*')
|
||||||
|
if (r != null) return decodeURI(decodeURI(r[2]));
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,45 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>video</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
let socket;
|
||||||
|
|
||||||
|
function startWebsocket() {
|
||||||
|
toUserId = document.getElementById('toUserId').value;
|
||||||
|
let webSocketUrl = 'ws://172.17.2.42:71';
|
||||||
|
if ('WebSocket' in window) {
|
||||||
|
// console.log(1)
|
||||||
|
socket = new WebSocket(webSocketUrl);
|
||||||
|
} else if ('MozWebSocket' in window) {
|
||||||
|
// console.log(2)
|
||||||
|
socket = new MozWebSocket(webSocketUrl);
|
||||||
|
}
|
||||||
|
// socket = new SockJS('https://' + location.host + '/websocket/' + userId);
|
||||||
|
//连接成功
|
||||||
|
socket.onopen = function (e) {
|
||||||
|
console.log('连接服务器成功!')
|
||||||
|
};
|
||||||
|
//server端请求关闭
|
||||||
|
socket.onclose = function (e) {
|
||||||
|
console.log('close')
|
||||||
|
alert(JSON.stringify(e))
|
||||||
|
|
||||||
|
};
|
||||||
|
//error
|
||||||
|
socket.onerror = function (e) {
|
||||||
|
console.error(e)
|
||||||
|
alert(JSON.stringify(e))
|
||||||
|
};
|
||||||
|
socket.onmessage = onmessage;
|
||||||
|
}
|
||||||
|
//连接服务器
|
||||||
|
startWebsocket();
|
||||||
|
|
||||||
|
</script>
|
|
@ -430,9 +430,9 @@
|
||||||
// ratio: 0.9, // [0, 1],越大相机越近
|
// ratio: 0.9, // [0, 1],越大相机越近
|
||||||
// });
|
// });
|
||||||
// console.log(e.data.cName,'e.data.cName');
|
// console.log(e.data.cName,'e.data.cName');
|
||||||
// if (e.data.cName.indexOf('monitor')!= -1) {
|
// // if (e.data.cName.indexOf('monitor')!= -1) {
|
||||||
// window.parent.openVideo()
|
// // window.parent.openVideo()
|
||||||
// }
|
// // }
|
||||||
// }
|
// }
|
||||||
// 双击实体
|
// 双击实体
|
||||||
if (e.kind === "doubleClickData") {
|
if (e.kind === "doubleClickData") {
|
||||||
|
@ -442,6 +442,7 @@
|
||||||
// animation: true,
|
// animation: true,
|
||||||
// ratio: 0.9, // [0, 1],越大相机越近
|
// ratio: 0.9, // [0, 1],越大相机越近
|
||||||
// })
|
// })
|
||||||
|
window.setTimeout(() => {
|
||||||
if (e.data.cName == 'XG') {
|
if (e.data.cName == 'XG') {
|
||||||
let val = 'XG'
|
let val = 'XG'
|
||||||
window.parent.postMessage({
|
window.parent.postMessage({
|
||||||
|
@ -493,6 +494,8 @@
|
||||||
val
|
val
|
||||||
}, '*')
|
}, '*')
|
||||||
}
|
}
|
||||||
|
}, 200)
|
||||||
|
|
||||||
}
|
}
|
||||||
// 开始旋转镜头
|
// 开始旋转镜头
|
||||||
// if (e.kind === 'beginRotate') {
|
// if (e.kind === 'beginRotate') {
|
||||||
|
@ -503,7 +506,7 @@
|
||||||
// 结束旋转镜头
|
// 结束旋转镜头
|
||||||
// if (e.kind === 'endRotate') {
|
// if (e.kind === 'endRotate') {
|
||||||
// this.g3d.setVisibleFunc(function(data) { // 设置图元可见性,内部循环
|
// this.g3d.setVisibleFunc(function(data) { // 设置图元可见性,内部循环
|
||||||
// return data.cVisible
|
// return data
|
||||||
// });
|
// });
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
|
|
|
@ -47,7 +47,8 @@ export const getEnvironmentInfo = (data) => {
|
||||||
};
|
};
|
||||||
export const getSiteInfo = (params) => {
|
export const getSiteInfo = (params) => {
|
||||||
return axios.get('electric_interface/gk/info/getSiteInfo', {
|
return axios.get('electric_interface/gk/info/getSiteInfo', {
|
||||||
params
|
params,
|
||||||
|
timeout:1000
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
export const getSwitchInfo = (params) => {
|
export const getSwitchInfo = (params) => {
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
|
@ -48,7 +48,7 @@ const routes = [
|
||||||
name: 'landChildren',
|
name: 'landChildren',
|
||||||
meta: {
|
meta: {
|
||||||
title: '侵华日军南京大屠杀遇难同胞纪念馆',
|
title: '侵华日军南京大屠杀遇难同胞纪念馆',
|
||||||
requireLogin: true
|
// requireLogin: true
|
||||||
},
|
},
|
||||||
component: () =>
|
component: () =>
|
||||||
import ('../views/land/child/index.vue'),
|
import ('../views/land/child/index.vue'),
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -500,6 +500,7 @@ export default {
|
||||||
searchShow: true,
|
searchShow: true,
|
||||||
leftNum: [],
|
leftNum: [],
|
||||||
cityId: "",
|
cityId: "",
|
||||||
|
mqttClient: undefined
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -894,7 +895,7 @@ export default {
|
||||||
console.log("[MQTT-TEST] 连接回调....");
|
console.log("[MQTT-TEST] 连接回调....");
|
||||||
});
|
});
|
||||||
// 接收回调
|
// 接收回调
|
||||||
this.mqttClient.on("message", (topic, message, packet) => {
|
this.mqttClient.on("message", (topic, message) => {
|
||||||
console.log(
|
console.log(
|
||||||
`[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`
|
`[MQTT-TEST] 从主题 "${topic}" 收到的内容: ${message.toString()}`
|
||||||
);
|
);
|
||||||
|
@ -903,8 +904,15 @@ export default {
|
||||||
// this.infodata[4].num = dataReceived.realTimeLoad
|
// this.infodata[4].num = dataReceived.realTimeLoad
|
||||||
console.log(dataReceived.realTimeLoad, "dataReceived");
|
console.log(dataReceived.realTimeLoad, "dataReceived");
|
||||||
});
|
});
|
||||||
|
// this.mqttClient.publish('my-topic','hello,MQTT')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//发送消息给服务
|
||||||
|
mqttPublish() {
|
||||||
|
let topic = "my-topic"; //和后台约定好的主题
|
||||||
|
message = 'hello,MQTT'
|
||||||
|
this.mqttClient.publish(topic, JSON.stringify(message));
|
||||||
|
},
|
||||||
show: function () {
|
show: function () {
|
||||||
this.leftOpen = true;
|
this.leftOpen = true;
|
||||||
this.rightOpen = true;
|
this.rightOpen = true;
|
||||||
|
|
Loading…
Reference in New Issue