Play multiple livestreams on a single connection (Android SDK) #6454
Replies: 2 comments 4 replies
-
just and idea, maybe you can put not as livestreams but yes as video playback, so it will show and will play and when press will go to the live. just an idea. regards. |
Beta Was this translation helpful? Give feedback.
-
Hi @Usama99786 Build a WebRTC client only once. If you create it multiple times, each time it will recreate the websocket connection, which will take time. The best way is to hold it in a service on Android. When you switch the views you can clear remote video renderers of webrtc client.
Track the resource, then add it again. Call play for the new streamId. It should work this way. |
Beta Was this translation helpful? Give feedback.
-
I am playing multiple live streams in a recyclerview. Like the live streams play in tiktok. The problem that i am facing is when i switch between the livestreams, I have to first stop the previous stream and then start the next one. This way, the connection is disconnected and connection again which takes some time. I want the videos to play instantly like tiktok.
webRTCClient = WebRTCClient(this, context)
Is there any way for me to achieve the above scenario?
Beta Was this translation helpful? Give feedback.
All reactions