AgoraIO / Basic-Video-Broadcasting

Sample app to join/leave a channel, set the role as a host/audience, mute/unmute, switch between front/rear cameras, and set the video parameters.
MIT License
269 stars 287 forks source link

Can multiple users host a broadcast at the same time? #47

Closed AxesandGrinds closed 4 years ago

AxesandGrinds commented 4 years ago

I understand that working with the demo, a user can either enter as a broadcaster or as the audience. My question is, can multiple users enter as broadcasters in the same channel while the remaining users enter as audience?

Thanks for your help.

plutoless commented 4 years ago

yes you can.

AxesandGrinds commented 4 years ago

For other users with the same question, I solved this issue by combining the Basic-Video-Broadcasting code with the interactive broadcasting code (https://github.com/AgoraIO/Advanced-Interactive-Broadcasting) such that if a user joins as a streamer with a particular uid (starts or ends with a particular keyword) then that user enters the broadcast in the smallAdapter. To remove the user from small video then simply have user leave channel, change user's uid back to original then enter the same channel again. But that would be taken care of with your signaling code.