react-player
react-player copied to clipboard
Questing: Playing same song multiple times
Hello,
i'm making something like "playlist" functionality, but when 2 song in row are the same the second song will not be played automaticaly. Maybe because nothing changed in state? Is there way to start it playing?
Thanks Boris
You are correct that if you try to "play" the currently playing URL, the props don't change and so nothing happens. This is an unfortunate downside in the declarative nature of how ReactPlayer listens to changes in props.
One thing you could do is, at the point where you load a song, check if it is the same as the previous URL and run seekTo(0) if so.