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

Reconnect the stream in previous URL when internet connection interrupts or switch from wifi to gsm or vice versa. #1523

Open
RedwanSharafatKabir opened this issue Jul 15, 2024 · 2 comments

Comments

@RedwanSharafatKabir
Copy link

I am streaming in a URL that only allows one stream. But if the internet disconnects the stream from the Application side, stops. And streaming on the URL also stops. How to re-stream when the internet is restored.

@pedroSG94
Copy link
Owner

pedroSG94 commented Jul 15, 2024

Hello,

You can do a reconnection like here:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/CameraFragment.kt#L199
Remember add the number of retries:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/CameraFragment.kt#L171

If you want connect to other url you can replace the null value of the first link to your new url

@RedwanSharafatKabir
Copy link
Author

Its working great now. Thanks a lot for your fast reply.

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

No branches or pull requests

2 participants