提交 3744e00c 编写于 作者: D DCloud_LXH

feat: video add the isLive property question/163201

上级 1ad2af71
......@@ -203,6 +203,10 @@ export default {
title: {
type: String,
default: ''
},
isLive: {
type: Boolean,
default: false
}
},
computed: {
......@@ -218,7 +222,13 @@ export default {
},
mounted () {
this._onParentReady(() => {
const video = this.video = plus.video.createVideoPlayer('video' + Date.now(), Object.assign({}, this.attrs, this.position))
const playStrategy = Number(this.isLive ? 3 : this.playStrategy)
const video = this.video = plus.video.createVideoPlayer(
'video' + Date.now(),
Object.assign({}, this.attrs, this.position, {
playStrategy: isNaN(playStrategy) ? 0 : playStrategy
})
)
plus.webview.currentWebview().append(video)
if (this.hidden) {
video.hide()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册