😂 Mini 窗口支持倍速快捷键

This commit is contained in:
hunlongyu
2020-05-25 22:31:10 +08:00
parent 0ed25643fc
commit 203d2c19fd
3 changed files with 24 additions and 1 deletions

View File

@@ -162,6 +162,13 @@ export default {
this.index++
})
})
},
playbackRateEvent (e) {
let rate = this.xg.playbackRate
if (rate > 0.25) {
rate = rate + e
this.xg.playbackRate = rate
}
}
},
created () {
@@ -195,6 +202,20 @@ export default {
this.opacityChange(this.opacity)
}
})
ipc.on('playbackRateUp', () => {
if (this.xg) {
if (this.xg.hasStart) {
this.playbackRateEvent(0.25)
}
}
})
ipc.on('playbackRateDown', () => {
if (this.xg) {
if (this.xg.hasStart) {
this.playbackRateEvent(-0.25)
}
}
})
}
}
</script>