I try to reproduce a classroom in which a teacher will publish video and audio and student only video at first.
Students can raise hand and teacher can accept to leave the student speak (all with dataChannel). I tried to change the mediaConstraints
(enable audio
) but as WebRTCAdaptor is basically stateless, it does not change a thing. Is there a simple way to publish audio as video is already published, as I cannot publish twice either.
Publish audio when already publishing video with Ant Media
475 views Asked by Rin3 At
1
If you create a WebRTCAdaptor with a disabled audio, user would not be able to speak later. But you can use the
Un/Mute mic funtions
for that. As an example:webRTCAdaptor.muteLocalMic()
would mute the microphone andwebRTCAdaptor.unmuteLocalMic()
These functions are included in the sample conference.html file. You can use these functions for your case.