react-player
react-player copied to clipboard
seekTo triggers onPlay for YouTube
Current Behavior
When the onPlay handler issues a seekTo command, it triggers onPlay again, causing a continuous loop. This does not seem to effect SoundCloud where onPlay is not triggered by seekTo
Expected Behavior
onPlay should not be triggered by seekTo. Or at the very least YouTube and SoundCloud should have consistent behaviour
Steps to Reproduce
- Set onPlay to seekTo(x)
- Play video
Environment
- URL attempting to play: https://www.youtube.com/watch?v=HuC2MUmQaG4&list=PL231EC31AA8EDC28E
- Browser: Chrome
- Operating system: OSX
- jsFiddle example: https://jsfiddle.net/y61uwfvg/
Playing after seek is a behaviour of the Youtube API and can't be controlled, as far as I know.
If you're trying to start the video from a certain time, use the start player parameter.
See also: https://github.com/CookPete/react-player/issues/601