Merge pull request '修复了返回播放' (#328) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/328
This commit is contained in:
luyuan 2020-09-03 11:57:56 +08:00
commit 85fce676e5

View File

@ -1,6 +1,6 @@
<template>
<view>
<video :src="url" class="vodio" autoplay="true" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors">
<video :src="url" class="vodio" :autoplay="true" id="myVideo" :show-fullscreen-btn="false" :show-play-btn="false" :enable-progress-gesture="false" :show-center-play-btn="false" :show-progress="false" :controls="false" :style="{'height':height}" @error="errors">
</video>
<view class="user" :style="{'top': top}">
@ -337,7 +337,8 @@ export default {
danmu:false,
room:{},
chatRoomService:{},
danmulist:[]
danmulist:[],
videoContext:{}
};
},
onBackPress(options) {
@ -347,14 +348,10 @@ export default {
return false;
},
onShow(){
if(this.url != '' && this.url){
let url = this.url
this.url = ""
this.url = url
}
this.videoContext.play()
},
onLoad(a) {
this.videoContext = uni.createVideoContext('myVideo')
this.url = a.url;
this.id = a.id
console.log(this.url);