提交 3d28531b 编写于 作者: Q qiang

feat: H5 端 video 支持 show-center-play-btn

上级 fc6be3cb
......@@ -15,7 +15,7 @@
>
<video
ref="video"
:style="{opacity:!start?0.8:1,objectFit:objectFit}"
:style="{objectFit:objectFit}"
:muted="muted"
:loop="loop"
:src="srcSync"
......@@ -99,7 +99,7 @@
class="uni-video-danmu"
/>
<div
v-if="!start"
v-if="centerPlayBtnShow"
class="uni-video-cover"
@click.stop
>
......@@ -278,6 +278,10 @@ export default {
showPlayBtn: {
type: [Boolean, String],
default: true
},
showCenterPlayBtn: {
type: [Boolean, String],
default: true
}
},
data () {
......@@ -306,8 +310,11 @@ export default {
}
},
computed: {
centerPlayBtnShow () {
return this.controls && this.showCenterPlayBtn && !this.start
},
controlsShow () {
return this.start && this.controls && this.controlsVisible
return !this.centerPlayBtnShow && this.controls && this.controlsVisible
},
autoHideContorls () {
return this.controlsShow && this.playing && !this.controlsTouching
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册