/ SDKs / React Native
SDKs
Calls SDKs React Native v1
Calls SDKs React Native
Calls SDKs
React Native
Version 1

Manage participant's actions

Copy link

Participant’s actions, such as turning on or off their microphone or camera, in a room are handled by the participant objects.

To control the media of the local user, you can use the following methods from the Room.localParticipant object as the follow.

// Mutes local microphone.
room.localParticipant.muteMicrophone();

// Unmutes local microphone.
room.localParticipant.unmuteMicrophone();

// Starts video.
room.localParticipant.startVideo();

// Stops video.
room.localParticipant.stopVideo();

// Changes current video device.
room.localParticipant.switchCamera();