Replies: 1 comment
-
When working with dynamic SurfaceView renderers, it's best to avoid using RecyclerView. In my experience, the nature of SurfaceView renderers tends to cause issues when used within a RecyclerView. There are two approaches you can take: Fixed Number of Visible SurfaceView Renderers: You can limit the number of SurfaceView renderers displayed on the screen at a time. Based on the active speaker (e.g., who is talking), you can dynamically assign tracks to these visible renderers. Manually Manage SurfaceView Renderers: Another approach is to manually add and remove SurfaceView renderers from the screen using addView() and removeView(). This effectively simulates the behavior of a RecyclerView without actually using it. You can refer to the MultiTrackPlay sample for an example, where addView() is used to add new tracks to the screen. |
Beta Was this translation helpful? Give feedback.
-
Hello there,
I am trying to implement a feature like twitter space using the webrtc conference activity on Android. I converted the code to kotlin and compose, works for the first host who joins the room with his streamid, but now trying to dynamically add more remote surface view renderers just stops everything from both the host and the remote view.
Has anyone implemented the conferencing feature on android before using the dynamic adding of remote view renderers as new streams enter the room.
The sample we have is the hardcoded remote surfaceview renderers and also java and xml. We need dynamic just like the way the web conferencing works.
Can anyone point me to what I'm doing wrong or how to go about this?
Beta Was this translation helpful? Give feedback.
All reactions