<video :src="getMyMedia()" autoplay loop muted=true controls=false @ended='playedEnd()'></video>
VideoList = ["A.mp4","B.mp4"]
VideoIndex = 0
getMyMedia() {
return this.VideoList [this.VideoIndex ]
}
playedEnd(){
this.playIndex ++
if (this.playIndex>=this.playList.length) {
this.playIndex = 0
}
}
3 个回复
DCMarvel
这是历史遗留问题,临时解决办法 watch 监听 videosrc 判断
samshum22 (作者)
第二種方法為
<view v-html='test'></view>
用一button去改this.test的值
改為
this.test = "<video src='_doc/uniapp_save/16214803928133.mp4' ></video>"
這方法也不行
samshum22 (作者)