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

Access source property for Player #232

Open
Caggegi opened this issue Oct 25, 2023 · 2 comments
Open

Access source property for Player #232

Caggegi opened this issue Oct 25, 2023 · 2 comments
Labels
question Further information is requested

Comments

@Caggegi
Copy link

Caggegi commented Oct 25, 2023

Hello, there is any way to access source property and set shouldAttemptReconnect to false from the frontend? I have to manage multiple streams and the server could be down for some streams sometimes so I have to stop the reconnect attempts.
Currently the change of the stream and the creation of a new Player is not possible due to the reconnection attempts of the stream selected before.

to reproduce that issue just make a page with a text input and a canvas, put in the text input the right ws and let the player start. Then change to a new fake ws, so the player cannot connect. At the end change back the url to a working ws, the player is not working anymore due to the previous fake connection.
Screenshot from 2023-10-25 18-00-42

@alfian444
Copy link

maybe this can help

players[id]=loadPlayer({ url:url canvas: canvas disconnectThreshold:30000, onDisconnect: () => { players[id].then(function(result) { result.destroy() }); });

@Caggegi
Copy link
Author

Caggegi commented Oct 26, 2023

I tried but that does not solve the problem, the connection attempts are like a loop that don't let the player call onDisconnect.

@k-yle k-yle added the question Further information is requested label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants