Skip to content

Commit

Permalink
🐛 修复全屏快捷键可能需要按两次
Browse files Browse the repository at this point in the history
  • Loading branch information
Aira-Sakuranomiya committed Nov 18, 2023
1 parent 8139936 commit cd04312
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions components/Player/PlayerVideo/PlayerVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,7 @@
return shortcutKeysStore.allowShortcutKeys;
}
const { f, d, m } = useMagicKeys();
/** 全屏 */
whenever(f, () => getAllowShortcutKeys() && toggle());
const { d, m } = useMagicKeys();
/** 弹幕 */
whenever(d, () => getAllowShortcutKeys() && (showDanmaku.value = !showDanmaku.value));
Expand All @@ -296,6 +293,14 @@
whenever(space, () => getAllowShortcutKeys() && (playing.value = !playing.value));
/** 全屏 */
onKeyStroke("f", e => {
if (getAllowShortcutKeys()) {
e.preventDefault();
toggle();
}
});
/** 音量 + */
onKeyStroke("ArrowUp", e => {
if (getAllowShortcutKeys()) {
Expand Down

0 comments on commit cd04312

Please sign in to comment.