- Restored the control-bar when playback rate is changed via keyboard.
- Also show the control-bar when seeking via keyboard.
Aside: lint was complaining about a potentially-null 'player', so added the null check in front and removed the redundant ones below.
- Since the whole overlay is now the control bar, the bottom control bar should no longer be black (too focused).
- Gray out the video when the overlay is up.
- The 'play/pause' is now at the middle of the overlay, so hide the one in the bottom controlBar. The bigger button is easier to tap in smaller mobile screens.
For some reason, adding the "-1" to the logic places it 2 slots behind the desired array slot, plus the actual item ends up being at the bottom of the DOM.
Removing the "-1" places it exactly at that index and pushes all existing items down 1 slot (feels like correct behavior), plus the final DOM is also correct.
Perhaps it's just some changes in videojs upstream that videojs-mobile-ui haven't catch up on (it has been dormant since 2018).
This is an improvement to 28e7fec3, which back then I just made the video control-bar re-appear when the shortcut is pressed, so that user gets to see the latest playback rate value.
Now, it uses a transient overlay.
The plugin only supports event-based overlays. This change will provide the functionality of an "one-off" overlay, which will be display immediately upon the 'player.overlay({...})' call, and hides when the 'end' event hits.