😂 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

@@ -49,6 +49,8 @@
| `⌘ + ⬅``Ctrl + ⬅` | 上一集 | √ | √ |
| `⌘ + ⬆``Ctrl + ⬆` | 减少透明度 | | √ |
| `⌘ + ⬇``Ctrl + ⬇` | 增加透明度 | | √ |
| `Shift + ⬆` | 减少透明度 | √ | √ |
| `Shift + ⬇` | 增加透明度 | √ | √ |
#### 下载:

View File

@@ -1,6 +1,6 @@
{
"name": "zy",
"version": "1.0.9",
"version": "1.0.10",
"private": true,
"author": {
"name": "Hunlongyu",

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>