samvera-labs / ramp

Interactive, IIIF powered audio/video media player React components library. Styleguidist Docs: https://samvera-labs.github.io/ramp/
https://ramp.avalonmediasystem.org/
30 stars 5 forks source link

Fix minor bugs in player introduced in refactor/cleanup work #662

Closed Dananji closed 1 month ago

Dananji commented 1 month ago

This PR includes the following;

  1. Cleanup of playerFocusElement global state variable, as this is not needed anymore to retain focus for previous/next button keyboard navigation with the changes done on these custom components with new implementation
  2. Remove float: inline-end styling with display: inline-block for player controls to right align some of the controls in the player, as this reverses the tab order of the controls when using keyboard navigation. Replace this styling to use display: flex
  3. Fix a bug in the state updates for persisting the player's play/pause status as isPlaying in global state with hotkey implementation and pointer events
  4. Set aspect ratio for inaccessible message display as 16/9 (equivalent to video player) when switching from an audio item to inaccessible item
  5. Attach player hotkeys event handler upon player creation, as hotkeys doesn't work as expected with the previous implementation when the first item is an inaccessible item.