amazon-ivs-react-native-player icon indicating copy to clipboard operation
amazon-ivs-react-native-player copied to clipboard

Failed to load playlist

Open rennard opened this issue 3 years ago • 2 comments

Describe the bug If I render the player before the stream has started then I get a 'failed to load playlist' error. Once the stream starts I can manually press play and it will work, however I was assuming that it would either autoplay once the stream starts or I would at least get onData events

May be expected behaviour but I wasn't sure

To reproduce Render this before the stream starts const Player = () => { return ( <IVSPlayer ref={mediaPlayerRef} streamUrl={STREAM_URL} style={{ height: 200, width: "100%", backgroundColor: "yellow" }} resizeMode={"aspectFill"} autoplay /> ); };

Expected behavior The player to automatically play once the stream has started

Screenshots

Device (please complete the following information):

  • Real device
  • Device: realme 8
  • OS: Android 12

Debug logs Failed to load playlist

rennard avatar Sep 16 '22 16:09 rennard

Hi @rennard – the player does not start automatically when the stream goes live. You could build this functionality (e.g. using the “Stream Start” EventBridge and API Gateway), but it’s not built-in currently. The player will always attempt to load the playlist if the autoplay prop is present. I’ll leave this open as a feature request and share the feedback with the team. Thanks!

maxstoller avatar Sep 18 '22 20:09 maxstoller

Thanks for the response. Unfortunately I've already tried using event bridge, the issue I run into is the stream start event fires before the player actually has access to the stream. My solution at the moment is render the component on Steam start and then wait 10 seconds before playing, which obviously isn't ideal, though maybe I could do something slightly nicer with polling and a timeout. Anyway, I can get by with my hack, thanks for an awesome library!

rennard avatar Sep 18 '22 22:09 rennard