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

feat: video add the isLive property question/163201

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