I just updated from 0.25.3 to 1.2.1 and encountered this issue :
When seeking player position with a Youtube video either programmatically or manually by clicking on the progress bar (video controls must be activated) sound resets to its default value. It also happens when playing / pausing.
controls to player's attributesTest A
Problems comes from onPlay
As ReactPlayer state is not updated when changing volume manually it will always go back to its default value when seeking or pausing / playing.
I don't know about other players but Youtube API doesn't seems to provide a onVolumeChange method. So the best solution for me is to set volume to null per default and only call setVolume in onPlay when it is set to a number value.
Would you accept a PR implementing this solution @CookPete ?
As of 1.3.0, the default volume is set to null and setVolume will not be called unless a non-null volume prop is passed in.
Thanks, that was fast !
The only downside to this is that muted no longer works if volume is not set, as we do not know what the volume was before muting the player. Then again, I don't think muted is used by many.
Most helpful comment
As of
1.3.0, the default volume is set tonullandsetVolumewill not be called unless a non-nullvolumeprop is passed in.