优化音量保存策略

This commit is contained in:
buvta
2021-01-24 15:25:13 +08:00
parent 6bfeb9fcd8
commit c08ae7666c

View File

@@ -1462,7 +1462,8 @@ export default {
this.xg.on('volumechange', () => {
this.config.volume = this.xg.volume.toFixed(2)
setting.find().then(res => { res.volume = this.config.volume; setting.update(res) })
const volume = this.config.volume
setTimeout(() => { if (volume === this.config.volume) setting.find().then(res => { res.volume = this.config.volume; setting.update(res) }) }, 500)
})
this.xg.on('timeupdate', () => {