logo
On this page

How to perform mute/unmute, mute audio, and disable camera operations on remote users?

2022-09-06
Products / Plugins:Video Call / Audio Call / Live streaming
Platform / Framework:iOS / Android / macOS / Windows

Introduction

In real-time audio and video interaction, there is often a need for local users to perform operations on remote users. For example, in a voice chat room, the host may invite audience members to unmute and interact, and can mute users on the microphone to return them to regular audience members. In video conferences, the host can mute audio and disable cameras for participants.

Implementation Method

Before implementing local operations on remote users, please ensure that you have implemented the basic real-time audio and video functionality.

In ZEGO Express SDK, local operations on remote users are generally implemented by sending and receiving custom signals sendCustomCommand/onIMRecvCustomCommand combined with a business system designed by developers.

Mute/Unmute

Basic API sequence diagram for host inviting audience to unmute

Specific steps:

  1. Implement basic audio and video functionality
  2. Host sends unmute signal to specified audience member sendCustomCommand
  3. Audience member receives the signal onIMRecvCustomCommand
  4. Audience member starts publishing stream to unmute startPublishingStream
  5. Host receives room stream update onRoomStreamUpdate
  6. Host plays the specified audience member's stream startPlayingStream

Similarly, to implement the mute function, the audience member calls stopPublishingStream to stop publishing when receiving the mute signal.

Mute Audio/Disable Camera

API sequence diagram for local requiring remote to mute audio or disable camera

Similar to mute/unmute operations, the host and participants perform mute audio or disable camera operations by sending and receiving custom signals.

After the remote microphone and camera change, the local end will receive corresponding message callbacks where logic processing can be performed.

Precautions

If developers need to use ZEGO room user broadcast notification onRoomUserUpdate, please ensure that each user passes ZegoRoomConfig with the isUserStatusNotify property set to true when logging into the room, otherwise the callback notification will not be received.

Previous

In Windows application development, how to analyze problems such as high CPU usage and memory leaks?

Next

When running Java source code to generate Token, if an exception "java.security.InvalidKeyException:illegal Key Size" appears, how to handle it?

On this page

Back to top