react-native-jw-media-player
react-native-jw-media-player copied to clipboard
Cant `play` after adding playlist with `autoplay: false`
When I add playlist with autoplay: true player works well, but when I'm trying to add playlist with autoplay: false and then set playerRef.play() it doesn't work. Also I have a question is it possible to load playlist and autostart from specific index?
Have you tried setPlaylistIndex()? Also, playerRef.play() works for me. Are you having problems with the other video player methods, or is it just a problem with play()? I'm wondering if it's a problem with the way you're handling the playerRef, but it's hard to tell without seeing your code.
I would try using setPlaylistIndex() with autoplay: true and see if that gets you what you want. If that doesn't work, then you can probably achieve your desired behavior by calling playerRef.play() right after you call setPlaylistIndex() (maybe with autoplay: false). In my app I'm only ever passing one video at a time to the player, so I haven't tested these ideas. Hopefully something in here is helpful for you.
Hi,
I've noticed couple of issues on IOS strictly:
– can't use playerRef.setPlaylistIndex() or playerRef.play() right after playerRef.loadPlaylist()
– onPlaylist callback doesn't work at all
Hi @marcinkieruzel
Can you check latest version.
Thanks.
Closing due to inactivity.