Commit dabd543e by Tianqing Liu

feat: 暴露相关方法到外部

1 parent 0b11a55d
......@@ -125,7 +125,7 @@ export default {
stop:-1
},
nowPanTilt:'',
isShowTime:true,// 是否显示时间操作区,默认为true
height:'',// 设置组件高度
isShowJT:false,// 是否显示截图按钮,默认为false
......@@ -142,6 +142,9 @@ export default {
},
mounted() {
window.playWebVideo = this.playWebVideo;
window.initWebVideo = this.initWebVideo;
window.screenshot = this.screenshot;
window.stopPlay = this.stopPlay;
},
methods: {
initWebVideo(obj) {
......@@ -237,12 +240,12 @@ export default {
},
allVideoExitFullScreen(){
// 暴露退出全屏方法
// this.isFullScreen = false
},
allVideoFullScreen(val){
// 暴露全屏方法
// this.isFullScreen = true
},
// 四分屏,单屏切换
......@@ -351,13 +354,13 @@ export default {
this.videoBackEndTime = moment().format('YYYY-MM-DD HH:mm:ss')
},
// 暴露方法
/**
* 截图
* num为分屏时的窗口序号,从0开始;不传则认为是单屏
*/
*/
screenshot(num) {
if(num === 0) {
this.$refs.vionPlayer0.screenshot().then(data => {
......@@ -385,12 +388,12 @@ export default {
}).catch(err => {
})
}
},
/**
* 关闭视频播放
* num为分屏时的窗口序号,从0开始;不传则认为是单屏
*/
*/
stopPlay(val) {
if(val >=0) {
if(val === 0) {
......@@ -452,7 +455,7 @@ export default {
border-radius: 5px;
}
}
.elRow{
width: calc(100% - 60px);
position: absolute;
......@@ -497,4 +500,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!