mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-09 13:37:41 +08:00
打开ZY,直接播放的话,或者是视频停止后再点击播放的话,播放最近的历史记录
This commit is contained in:
@@ -470,7 +470,6 @@ export default {
|
||||
time[key] = '00'
|
||||
} else if (time[key].length > 2) {
|
||||
time[key] = '' + parseInt(time[key])
|
||||
// time[key] = time[key].replace(/^0+/, '')
|
||||
} else if (time[key] < 10 && time[key].length === 1) {
|
||||
time[key] = '0' + time[key]
|
||||
}
|
||||
@@ -1394,6 +1393,15 @@ export default {
|
||||
this.xg.on('exitFullscreen', () => {
|
||||
document.querySelector('.xg-view-videoTitle').style.display = 'none'
|
||||
})
|
||||
|
||||
this.xg.on('play', () => {
|
||||
if (!this.video.key && !this.video.info.ids) {
|
||||
// 如果当前播放页面的播放信息没有被赋值,播放历史记录
|
||||
var historyItem = this.right.history[0]
|
||||
this.video = { key: historyItem.site, info: { id: historyItem.ids, name: historyItem.name, index: historyItem.index } }
|
||||
this.getUrls()
|
||||
}
|
||||
})
|
||||
},
|
||||
videoStop () {
|
||||
win.setProgressBar(-1)
|
||||
|
||||
Reference in New Issue
Block a user