Skip to content

feat(media): add fullscreen keyboard shortcut to React controls#1606

Open
sanilsalvi wants to merge 1 commit intobox:masterfrom
sanilsalvi:feat/fullscreen-keyboard-shortcut-1605
Open

feat(media): add fullscreen keyboard shortcut to React controls#1606
sanilsalvi wants to merge 1 commit intobox:masterfrom
sanilsalvi:feat/fullscreen-keyboard-shortcut-1605

Conversation

@sanilsalvi
Copy link
Collaborator

@sanilsalvi sanilsalvi commented Feb 3, 2026

Summary

Adds the 'f' keyboard shortcut to toggle fullscreen mode in the React video controls (handleKeydownReact), matching the existing behavior in the legacy controls (handleKeydown).

Changes

  • Added f and shift+f key handlers to handleKeydownReact in MediaBaseViewer.js
  • Added corresponding unit tests in MediaBaseViewer-test.js

Background

The video player has two keyboard handling paths:

  • Legacy controls (handleKeydown) - already supported 'f' for fullscreen
  • React controls (handleKeydownReact) - was missing this shortcut

This PR brings parity between the two by adding the fullscreen shortcut to the React controls path.

Screencast

Full.Screen.Toggle.mov

Test Plan

  • Press 'f' while viewing a video with React controls enabled - should toggle fullscreen
  • Press 'Shift+F' while viewing a video - should also toggle fullscreen
  • Verify existing keyboard shortcuts still work (space/k for play/pause, arrow keys for seek, m for mute, etc.)

@sanilsalvi sanilsalvi requested a review from a team as a code owner February 3, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant