Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load playlist #89

Open
rennard opened this issue Sep 16, 2022 · 2 comments
Open

Failed to load playlist #89

rennard opened this issue Sep 16, 2022 · 2 comments

Comments

@rennard
Copy link

rennard commented Sep 16, 2022

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 rennard added the bug Something isn't working label Sep 16, 2022
@maxstoller
Copy link
Contributor

maxstoller commented Sep 18, 2022

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 maxstoller added feature-request and removed bug Something isn't working labels Sep 18, 2022
@rennard
Copy link
Author

rennard commented Sep 18, 2022

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants