This topic describes how to implement the mute and unmute features in the VS mode.
Procedure
Mute a host
Suppose Host A in Channel A is in a VS session with Host B in Channel B. Host A wants to mute Host B so that neither Host A nor the audience in Channel A can hear Host B. Meanwhile, Host B's broadcast in their own channel (Channel B) remains unaffected. This requires two steps:
Host A calls the
muteRemoteAudioPlayingAPI to locally mute Host B's audio.For the transcoded stream of Channel A, remove Host B's audio. To do this, your app server calls the UpdateLiveMPUTask API and changes the
streamTypefor Host B from 0 to 2 in theUserInfosparameter.
Unmute a host
Unmuting the host also requires two steps:
Host A calls the
muteRemoteAudioPlayingAPI to locally unmute Host B's audio.For the transcoded stream of Channel A, add Host B's audio back. To do this, your app server calls the UpdateLiveMPUTask API and changes the
streamTypefor Host B from 2 to 0 in theUserInfosparameter.