Current Behavior
No onPlaybackRateChange callback prop or something similar exists, passing a custom listener via e.g.
config={{
"youtube": {
embedOptions: {
events: {
"onPlaybackRateChange": (e) => newPlaybackRate(e.data)
}
}
}
}}
will break all the other listeners definable: https://github.com/cookpete/react-player#callback-props
As react-player itself mentions as a warning in the console output:
Using embedOptions.events will likely break things. Use ReactPlayer’s callback props instead, eg onReady, onPlay, onPause
Expected Behavior
Have a onPlaybackRateChange callback prop for the providers that support it or do not break all the other listeners.
As YT, Wistia and file paths are also the only one (to my knowledge) that support the prop playbackRate and also have a onPlaybackRateChange event, I expected react-player to have a unified callback prop as well.
Other Information
YouTube: https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
Wistia: https://wistia.com/support/developers/player-api#playbackratechange
HTML: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event
Current Behavior
No
onPlaybackRateChangecallback prop or something similar exists, passing a custom listener via e.g.will break all the other listeners definable: https://github.com/cookpete/react-player#callback-props
As react-player itself mentions as a warning in the console output:
Expected Behavior
Have a
onPlaybackRateChangecallback prop for the providers that support it or do not break all the other listeners.As YT, Wistia and file paths are also the only one (to my knowledge) that support the prop
playbackRateand also have aonPlaybackRateChangeevent, I expected react-player to have a unified callback prop as well.Other Information
YouTube: https://developers.google.com/youtube/iframe_api_reference#onPlaybackRateChange
Wistia: https://wistia.com/support/developers/player-api#playbackratechange
HTML: https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ratechange_event