Commit f485a397 authored by 梁淳峰's avatar 梁淳峰

247020

parent 01bbc5b8
......@@ -206,9 +206,11 @@ function getVideoInfo() {
})
}
//页面初始化
function initPage() {
getVideoInfo();
getStats();
getVideoInfo();//视频信息
getStats();//下拉列表
initIp();//ip
// console.log(VideoInfo)
}
......@@ -299,10 +301,13 @@ onUnmounted(() => {
//声明公用变量
var initCount = 0;
var pubKey = '';
var playWnd_width = window.innerWidth-200;
var playWnd_width = window.innerWidth;
var playWnd_height = 700;
// var testWeb= new WebControl();
var oWebControl;
var videoIp;
var videoPort=1443;
// 创建播放实例
......@@ -381,16 +386,27 @@ function cbIntegrationCallBack(oData) {
} */
}
//初始化
//初始化ip
function initIp(){
var serverIP = localStorage.getItem("SERVEICE");
if(!serverIP || serverIP == null || serverIP == "" || serverIP == "218.69.97.198"){
videoIp="218.69.97.198";
videoPort=1443;
}else{
videoIp="192.168.1.100";
videoPort=1443;
}
}
//初始化插件
function init() {
getPubKey(function () {
////////////////////////////////// 请自行修改以下变量值 ////////////////////////////////////
var appkey = "27337031"; //综合安防管理平台提供的appkey,必填
var secret = setEncrypt("MI9Q4eAHC0Ip7bVX2Sov"); //综合安防管理平台提供的secret,必填
var ip = "218.69.97.198"; //综合安防管理平台IP地址,必填
var ip = videoIp; //综合安防管理平台IP地址,必填
var playMode = 0; //初始播放模式:0-预览,1-回放
var port = 1443; //综合安防管理平台端口,若启用HTTPS协议,默认443
var port = videoPort; //综合安防管理平台端口,若启用HTTPS协议,默认443
var snapDir = "D:\\SnapDir"; //抓图存储路径
var videoDir = "D:\\VideoDir"; //紧急录像或录像剪辑存储路径
var layout = "2x2"; //playMode指定模式的布局
......@@ -457,9 +473,12 @@ $(window).resize(function () {
});
function resizeVideo() {
// console.log('触发重绘')
// console.log('resize')
playWnd_width = window.innerWidth;
if (oWebControl != null) {
// console.log('startresize')
// console.log('重绘界面位置')
oWebControl.JS_Resize(playWnd_width, playWnd_height);
setWndCover();
}
......
......@@ -290,9 +290,15 @@ export default defineComponent({
amslogo_style.width = store.state.iscollapse ? 40 : 150;
mainWidth.value = window.innerWidth - menuWidth.value;
await EventBus.emit('changeValue', mainWidth.value);
if(proxy.$refs.componentView && proxy.$refs.componentView.resizeVideo){
proxy.$refs.componentView.resizeVideo();
console.log('触发')
// console.log(proxy.$refs.componentView);
// console.log(proxy.$refs.componentView.resizeVideo);
if(proxy.$refs.componentView && proxy.$refs.componentView.showPlay){
proxy.$refs.componentView.showPlay();
}
// if(proxy.$refs.componentView && proxy.$refs.componentView.resizeVideo){
// proxy.$refs.componentView.resizeVideo();
// }
}
//开放手动折叠菜单方法
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment