react-native-jw-media-player icon indicating copy to clipboard operation
react-native-jw-media-player copied to clipboard

Cant `play` after adding playlist with `autoplay: false`

Open marcinkieruzel opened this issue 4 years ago • 3 comments

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?

marcinkieruzel avatar Mar 06 '21 23:03 marcinkieruzel

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.

arsimr16 avatar Mar 08 '21 17:03 arsimr16

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

marcinkieruzel avatar Mar 11 '21 10:03 marcinkieruzel

Hi @marcinkieruzel

Can you check latest version.

Thanks.

chaimPaneth avatar Dec 08 '21 08:12 chaimPaneth

Closing due to inactivity.

chaimPaneth avatar Oct 23 '23 13:10 chaimPaneth