This commit is contained in:
曹辉 2023-04-27 17:16:04 +08:00
parent 11958b9e26
commit 98783b9607
2 changed files with 19 additions and 4 deletions

View File

@ -42,8 +42,9 @@
</view>
</view>
<u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
<video v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"></video>
<video id="video" v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"
@play='videoplays'></video>
</u-popup>
<u-toast ref="uToast" />
</view>
@ -119,6 +120,12 @@
})
},
//
videoplays() {
if (this.videoitem.watchTime) {
this.videoContext = uni.createVideoContext('video')
this.videoContext.seek(this.videoitem.watchTime)
}
},
videoplay(item) {
this.videoerroshow = true
if (item.itemDirectoryUrl) {

View File

@ -42,8 +42,9 @@
</view>
</view>
<u-popup v-model="videoshow" mode="center" closeable @close='videoshowfalse'>
<video v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"></video>
<video id="video" v-if="videoshow" :src="baseurl+videoitem.itemDirectoryUrl" @timeupdate='videotimeupdate'
:initial-time='videoitem.watchTime' @error='videoerror' :custom-cache="false"
@play='videoplays'></video>
</u-popup>
<u-toast ref="uToast" />
</view>
@ -108,6 +109,13 @@
this.videoshow = false
},
//
videoplays() {
if (this.videoitem.watchTime) {
this.videoContext = uni.createVideoContext('video')
this.videoContext.seek(this.videoitem.watchTime)
}
},
//
videoplay(item) {
this.videoerroshow = true
if (item.itemDirectoryUrl) {