视频播放-关闭自动播放功能

This commit is contained in:
guoyue 2022-09-20 10:24:12 +08:00
parent bff2aa9f97
commit c35398209b
1 changed files with 38 additions and 8 deletions

View File

@ -561,7 +561,11 @@
<template #footer></template> <template #footer></template>
<div style="width: 100%; display: flex; justify-content: center"> <div style="width: 100%; display: flex; justify-content: center">
<div style="width: 100%; height: 100%"> <div style="width: 100%; height: 100%">
<vue3VideoPlay v-bind="options" /> <vue3VideoPlay v-bind="options"
@play="onPlay"
@pause="onPause"
@timeupdate="onTimeupdate"
@canplay="onCanplay"/>
</div> </div>
</div> </div>
</a-modal> </a-modal>
@ -753,7 +757,8 @@
muted: false, // muted: false, //
webFullScreen: false, webFullScreen: false,
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], // speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //
autoPlay: isXiHaiAn, // // autoPlay: isXiHaiAn, //
autoPlay: false, //
loop: false, // loop: false, //
mirror: false, // mirror: false, //
ligthOff: false, // ligthOff: false, //
@ -973,11 +978,14 @@
const param = { const param = {
key: id, key: id,
} }
getStreamByChannelCode(param).then((res) => { // getStreamByChannelCode(param).then((res) => {
console.log(res) // console.log(res)
// visible.value = true
// options.src = res.data.data
// })
visible.value = true visible.value = true
options.src = res.data.data options.src = 'http://playertest.longtailvideo.com/adaptive/bipbop/gear4/prog_index.m3u8'
})
} }
// //
const openPicture = (id) => { const openPicture = (id) => {
@ -1877,6 +1885,28 @@
getCamera() getCamera()
// this.getTableList() // this.getTableList()
} }
// todo
// const vue3VideoPlay = ref(null)
const onPlay = (ev) => {
console.log('播放')
// message.warning('')
// nextTick(() => {
// // console.log('vue3VideoPlay.value.state------------>', vue3VideoPlay.value.state);
// })
}
const onPause = (ev) => {
console.log(ev, '暂停')
}
const onTimeupdate = (ev) => {
console.log(ev, '时间更新')
onPause(ev)
}
const onCanplay = (ev) => {
console.log(ev, '可以播放')
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.infrastructrueBox { .infrastructrueBox {