westonsoftware / vue-webrtc

WebRTC video component for Vue.js
MIT License
369 stars 127 forks source link

Limit Video chat to one Broadcaster #68

Closed muarachmann closed 3 years ago

muarachmann commented 3 years ago

Is your feature request related to a problem? Please describe. Hi @westonsoftware plus one on this package and I am so much liking it. I have this feature which I want only one user to be able to broadcast and the others join in but their cameras are not turned on. I wish to have a one on many video chat like say one host and many users connecting to it say to listen the host show. I wish to know how to go about this feature thanks

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered I tried destroying the divs of streams created by the for loop but this doesn't solve the issue as the Camera of other users are still on

Additional context Add any other context or screenshots about the feature request here.

muarachmann commented 3 years ago

Another option is to hide the divs display but anyone can toggle this to display block upon inspecting the element since the camera is on

westonsoftware commented 3 years ago

hi @muarachmann, you could set enableVideo = true for the broadcaster and false for the listeners when they connect. However, I think you still need either audio or video for the connection to work. Remember, peer to peer supports a limited number of users too so you wouldn't be able to broadcast to a large number of people like I think you want.

muarachmann commented 3 years ago

@westonsoftware thanks for your response. I will be needing only audio for the other listeners and video for the "host". Also you seem to be correct about my usecase. Any recommendations on what to use to accomodate a larger audience say 1k-2k users simultaneously? thanks

westonsoftware commented 3 years ago

that is usually done by converting the video to MPEG-DASH or HLS using streaming server like Wowza