Skip to main content

Introduction - Local User

DyteSelfUser object contain all the methods and properties about the self user including their media controls for the current room.


Here is a list of properties that local user provides:

  • id: ID of the participant pertaining to local user. (aka peerId)
  • userId: The userId of the participant.
  • name: Contains Name of the local user.
  • picture: Link to the url of the participant
  • isHost: Boolean value indicating whether this user is host of current meeting or not.
  • clientSpecificId: Identifier provided by the developer while adding the participant.
  • flags: Type ParticipantFlags and it contains two boolean values
    • recorder: if the participant is recorder
    • hidden: if the participant is hidden
  • audioEnabled: Boolean value indicating if the audio currently enabled.
  • videoEnabled: Boolean value indicating if the video currently enabled.
  • stageStatus : Stage status of the local participant.

Local user properties can be fetched via localUser getter on the dyteClient.

final selfUser = dyteClient.localUser;

Change default audio / video settings

By default as soon as you join the meeting, Dyte SDK will produce your video and audio streams. To change this behaviour, use the audioEnabled & videoEnabled parameter

final meetingInfo = DyteMeetingInfoV2(
authToken = AUTH_TOKEN,
audioEnabled = false,
videoEnabled = true

Turn on audio/video tracks after initializing the client

If audio and video tracks are disabled during the DyteMobileClient initialization process. You can setup the audio and video tracks by simply calling enableAudio() and enableVideo() like below:


Change the name of the local user

Change the user's name by calling setDisplayName method. The changed name will reflect across all participants ONLY if the change happens before joining the meeting. This is only possible when the user has the permission to change the name.

dyteClient.localUser.setDisplayName("New Name");

Mute/Unmute microphone

// Mute Audio

// Unmute Audio

// Get current status
final isAudioEnabled = dyteClient.localUser.audioEnabled;

Enable/Disable camera

// Disable Video

// Enable Video

// Get current status
final isVideoEnabled = dyteClient.localUser.videoEnabled;

Switch camera between sources

// switch camera

Enable / Disable Screen share

// Enable Screenshare

// Disable Screenshare