this.monitorHistoryUrl = res.data.data.url;
this.init();
this.createPlayer();
this.playbackStart();
})
},
init() {
// 设置播放容器的宽高并监听窗口大小变化
window.addEventListener(‘resize’, () => {
this.player.JS_Resize()
})
},
createPlayer() {
let szBasePath = ‘’;
//因为项目配置在二级域名,所以文件需改变路径
if (process.env.NODE_ENV == “production”) {
szBasePath = ‘/bzsv/js/’
}
else{
szBasePath = ‘/js/’
}
this.player = new window.JSPlugin({
szId: ‘player’,
szBasePath: szBasePath,
iMaxSplit: 4,
iCurrentSplit: 1,
openDebug: true,
oStyle: {
borderSelect: IS_MOVE_DEVICE ? ‘#000’ : ‘#FFCC00’,
}
})
// 事件回调绑定
this.player.JS_SetWindowControlCallback({
windowEventSel