再次解决恢复窗口不继续播放视频的问题

This commit is contained in:
haiyangcui
2020-11-14 20:23:37 +01:00
parent 82df96e4d0
commit 1dc683e332
2 changed files with 3 additions and 2 deletions

View File

@@ -130,7 +130,6 @@ export default {
},
async playEvent (n) {
if (!this.playOnline) {
console.log(this.detail)
const db = await history.find({ site: this.detail.key, ids: this.detail.info.id })
if (db) {
this.video = { key: db.site, info: { id: db.ids, name: db.name, index: n, site: this.detail.site } }

View File

@@ -1201,7 +1201,9 @@ export default {
}
})
win.on('restore', () => {
if (this.xg && this.xg.hasStart) {
// 不知为何在if clause里直接使用this.xg.hasStart居然就不工作不得其解。
var hasStart = this.xg.hasStart
if (this.xg && hasStart) {
this.xg.play()
}
})