diff --git a/CHANGELOG.md b/CHANGELOG.md index c8fbbccea..af11a769b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Subscription and file view counts ([#2920](https://github.com/lbryio/lbry-desktop/pull/2920)) - Pagination on Library, Publishes, and Transactions page ([#2923](https://github.com/lbryio/lbry-desktop/pull/2923)) - Granular balance information ([#2916](https://github.com/lbryio/lbry-desktop/pull/2916)) +- Keyboard shortcuts for the following actions: ([#2999](https://github.com/lbryio/lbry-desktop/pull/2999)) + - `→` to Seek Forward + - `←` to Seek Backward + - `f` to Going Fullscreen + - `m` to Mute/Unmute ### Changed diff --git a/src/ui/component/viewers/videoViewer/view.jsx b/src/ui/component/viewers/videoViewer/view.jsx index e2afd9889..689427321 100644 --- a/src/ui/component/viewers/videoViewer/view.jsx +++ b/src/ui/component/viewers/videoViewer/view.jsx @@ -9,19 +9,14 @@ const SPACE_BAR_KEYCODE = 32; const SMALL_F_KEYCODE = 70; const SMALL_M_KEYCODE = 77; const ARROW_LEFT_KEYCODE = 37; -const ARROW_UP_KEYCODE = 38; const ARROW_RIGHT_KEYCODE = 39; -const ARROW_DOWN_KEYCODE = 40; const FULLSCREEN_KEYCODE = SMALL_F_KEYCODE; const MUTE_KEYCODE = SMALL_M_KEYCODE; -const VOLUME_INCREASE_KEYCODE = ARROW_UP_KEYCODE; -const VOLUME_DECREASE_KEYCODE = ARROW_DOWN_KEYCODE; const SEEK_FORWARD_KEYCODE = ARROW_RIGHT_KEYCODE; const SEEK_BACKWARD_KEYCODE = ARROW_LEFT_KEYCODE; -const VOLUME_STEP = 0.1; // Volume range is 0 to 1 const SEEK_STEP = 10; // time to seek in seconds const VIDEO_JS_OPTIONS = { @@ -151,17 +146,6 @@ function VideoViewer(props: Props) { videoNode.muted = !videoNode.muted; } - // Volume Shortcuts - const volume = videoNode.volume; - if (e.keyCode === VOLUME_INCREASE_KEYCODE) { - const newVolume = volume + VOLUME_STEP; - videoNode.volume = newVolume > 1 ? 1 : newVolume; - } - if (e.keyCode === VOLUME_DECREASE_KEYCODE) { - const newVolume = volume - VOLUME_STEP; - videoNode.volume = newVolume < 0 ? 0 : newVolume; - } - // Seeking Shortcuts const duration = videoNode.duration; const currentTime = videoNode.currentTime;