mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-10 05:55:04 +08:00
😂 Mini 窗口支持倍速快捷键
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user