Closed evamaxfield closed 4 years ago
We are currently using react-player, but video-react looks like a nice alternative?
react-player also has a playbackRate
prop. Currently, for video controls(play, pause, volume,etc), react-player display the native player controls. For example, if url is a youtube link, then it will show the youtube video controls(which has a playbackRate
UI element). For files url (our case), it will show the HTML5 video controls, which doesn't include a playbackRate
UI element. For Firefox and Edge, the user could right-click on the video, and change the playbackRate
. Chrome doesn't have this feature.
video-react has a flexible ControlBar
component that we could use. It could include all the video controls components that we need. And it looks pretty good visually.
Do you want to switch over to video-react? In terms of coding, by just looking at the documentation, I don't see any big complications in replacing with video-react.
If video-react
has a ControlBar
component then absolutely I think we should switch over. Things like playback rate and styling of the controlbar are huge wins imo.
What do you think of the example of PlaybackRateMenuButton, along with other video controls, as an example for what our video player could look like?
I would personally switch the position of the buttons on the bar and learn from YouTubes button placements but that is exactly it. :+1:
Cool, I'm going to replace the full-screen button with playback rate button.
Have video options for 0.75x / 1.0x / 1.5x / 2x playback speeds.
I think we are using
video-react
, which has aplaybackRate
property. Would need to add some handlers for switching this in the controls.But this opens up a larger discussion on creating a custom component for handling video player state because I think you would have to have a separate drop down outside of the video player frame which would lead to bad UX imo. So in that case we would basically have to create this large container for managing video + video controls components. (Plus we can then style the controls however we like. Which would be cool.)