LocalParticipant
Defined in: client-sdk-js/src/participant/LocalParticipant.ts:69
A typed wrapper over Node’s EventEmitter.
Extends EventEmitter with declare overrides so that emit, on,
off, etc. are type-safe without introducing circular-reference issues
that arise when using typed-emitter directly in extends clauses
whose event maps reference the class itself.
Runtime behaviour is 100% EventEmitter; this class adds zero runtime
code.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new LocalParticipant( sid, identity, name?, metadata?): LocalParticipant;Defined in: client-sdk-js/src/participant/Participant.ts:178
Parameters
Section titled “Parameters”string
identity
Section titled “identity”string
string
metadata?
Section titled “metadata?”string
Returns
Section titled “Returns”LocalParticipant
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”addListener
Section titled “addListener”addListener: <E>(event, listener) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:37
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
listener
Section titled “listener”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E] : (…args) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”attributes
Section titled “attributes”attributes: Record<string, string> = {};Defined in: client-sdk-js/src/participant/Participant.ts:157
Inherited from
Section titled “Inherited from”audioLevel
Section titled “audioLevel”audioLevel: number = 0;Defined in: client-sdk-js/src/participant/Participant.ts:156
Inherited from
Section titled “Inherited from”audioTrackPublications
Section titled “audioTrackPublications”audioTrackPublications: Map<string, LocalTrackPublication>;Defined in: client-sdk-js/src/participant/Participant.ts:162
Inherited from
Section titled “Inherited from”Participant.audioTrackPublications
emit: <E>(event, ...args) => boolean;Defined in: client-sdk-js/src/utils/typedEmitter.ts:17
Type Parameters
Section titled “Type Parameters”E extends ParticipantEvent
Parameters
Section titled “Parameters”E
…Parameters<ParticipantEvents<LocalTrackPublication>[E]>
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”groupId?
Section titled “groupId?”groupId?: string;Defined in: client-sdk-js/src/participant/Participant.ts:160
The group (breakout room) this participant is currently in. undefined = main room.
Inherited from
Section titled “Inherited from”identity
Section titled “identity”identity: string;Defined in: client-sdk-js/src/participant/Participant.ts:151
Inherited from
Section titled “Inherited from”isSpeaking
Section titled “isSpeaking”isSpeaking: boolean = false;Defined in: client-sdk-js/src/participant/Participant.ts:155
Inherited from
Section titled “Inherited from”joinedAt?
Section titled “joinedAt?”joinedAt?: Date;Defined in: client-sdk-js/src/participant/Participant.ts:165
Inherited from
Section titled “Inherited from”lastSpokeAt?
Section titled “lastSpokeAt?”lastSpokeAt?: Date;Defined in: client-sdk-js/src/participant/Participant.ts:164
Inherited from
Section titled “Inherited from”listenerCount
Section titled “listenerCount”listenerCount: (event) => number;Defined in: client-sdk-js/src/utils/typedEmitter.ts:57
Parameters
Section titled “Parameters”string | number
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”listeners
Section titled “listeners”listeners: <E>(event) => E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E][] : ((...args) => void)[];Defined in: client-sdk-js/src/utils/typedEmitter.ts:49
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
Returns
Section titled “Returns”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E][] : ((…args) => void)[]
Inherited from
Section titled “Inherited from”metadata?
Section titled “metadata?”metadata?: string;Defined in: client-sdk-js/src/participant/Participant.ts:153
Inherited from
Section titled “Inherited from”name?: string;Defined in: client-sdk-js/src/participant/Participant.ts:152
Inherited from
Section titled “Inherited from”off: <E>(event, listener) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:32
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
listener
Section titled “listener”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E] : (…args) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”on: <E>(event, listener) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:22
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
listener
Section titled “listener”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E] : (…args) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”once: <E>(event, listener) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:27
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
listener
Section titled “listener”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E] : (…args) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”permissions?
Section titled “permissions?”permissions?: ParticipantPermission;Defined in: client-sdk-js/src/participant/Participant.ts:158
Inherited from
Section titled “Inherited from”rawListeners
Section titled “rawListeners”rawListeners: <E>(event) => E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E][] : ((...args) => void)[];Defined in: client-sdk-js/src/utils/typedEmitter.ts:53
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
Returns
Section titled “Returns”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E][] : ((…args) => void)[]
Inherited from
Section titled “Inherited from”removeAllListeners
Section titled “removeAllListeners”removeAllListeners: (event?) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:47
Parameters
Section titled “Parameters”event?
Section titled “event?”string | number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Participant.removeAllListeners
removeListener
Section titled “removeListener”removeListener: <E>(event, listener) => this;Defined in: client-sdk-js/src/utils/typedEmitter.ts:42
Type Parameters
Section titled “Type Parameters”E extends string | number
Parameters
Section titled “Parameters”E
listener
Section titled “listener”E extends keyof ParticipantEvents<LocalTrackPublication> ? ParticipantEvents<LocalTrackPublication>[E] : (…args) => void
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”roomOptions?
Section titled “roomOptions?”roomOptions?: RoomOptions;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:86
Room-level options passed in from the Room instance.
sid: string;Defined in: client-sdk-js/src/participant/Participant.ts:150
Inherited from
Section titled “Inherited from”state: ParticipantState;Defined in: client-sdk-js/src/participant/Participant.ts:154
Inherited from
Section titled “Inherited from”trackPublications
Section titled “trackPublications”trackPublications: Map<string, LocalTrackPublication>;Defined in: client-sdk-js/src/participant/Participant.ts:161
Inherited from
Section titled “Inherited from”videoTrackPublications
Section titled “videoTrackPublications”videoTrackPublications: Map<string, LocalTrackPublication>;Defined in: client-sdk-js/src/participant/Participant.ts:163
Inherited from
Section titled “Inherited from”Participant.videoTrackPublications
defaultMaxListeners
Section titled “defaultMaxListeners”static defaultMaxListeners: number;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:5
Inherited from
Section titled “Inherited from”Participant.defaultMaxListeners
Accessors
Section titled “Accessors”connectionQuality
Section titled “connectionQuality”Get Signature
Section titled “Get Signature”get connectionQuality(): ConnectionQuality;Defined in: client-sdk-js/src/participant/Participant.ts:217
Current connection quality for this participant.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”isActive
Section titled “isActive”Get Signature
Section titled “Get Signature”get isActive(): boolean;Defined in: client-sdk-js/src/participant/Participant.ts:200
Whether the participant is in an active (joined) state.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isAgent
Section titled “isAgent”Get Signature
Section titled “Get Signature”get isAgent(): boolean;Defined in: client-sdk-js/src/participant/Participant.ts:195
Whether this participant is an AI agent.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isCameraEnabled
Section titled “isCameraEnabled”Get Signature
Section titled “Get Signature”get isCameraEnabled(): boolean;Defined in: client-sdk-js/src/participant/Participant.ts:251
Whether the participant has an enabled camera track.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”isLocal
Section titled “isLocal”Get Signature
Section titled “Get Signature”get isLocal(): boolean;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:88
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”isMicrophoneEnabled
Section titled “isMicrophoneEnabled”Get Signature
Section titled “Get Signature”get isMicrophoneEnabled(): boolean;Defined in: client-sdk-js/src/participant/Participant.ts:256
Whether the participant has an enabled microphone track.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Participant.isMicrophoneEnabled
isScreenShareEnabled
Section titled “isScreenShareEnabled”Get Signature
Section titled “Get Signature”get isScreenShareEnabled(): boolean;Defined in: client-sdk-js/src/participant/Participant.ts:261
Whether the participant is sharing their screen.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”Participant.isScreenShareEnabled
Get Signature
Section titled “Get Signature”get kind(): ParticipantKind;Defined in: client-sdk-js/src/participant/Participant.ts:190
The kind of participant (Standard, Agent, etc.).
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”lastCameraError
Section titled “lastCameraError”Get Signature
Section titled “Get Signature”get lastCameraError(): Error | undefined;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:125
Last error encountered while creating a camera track.
Returns
Section titled “Returns”Error | undefined
lastMicrophoneError
Section titled “lastMicrophoneError”Get Signature
Section titled “Get Signature”get lastMicrophoneError(): Error | undefined;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:130
Last error encountered while creating a microphone track.
Returns
Section titled “Returns”Error | undefined
Methods
Section titled “Methods”createScreenTracks()
Section titled “createScreenTracks()”createScreenTracks(options?): Promise<LocalTrack[]>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:1104
Create screen share tracks without publishing.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<LocalTrack[]>
createTracks()
Section titled “createTracks()”createTracks(options?): Promise<LocalTrack[]>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:1079
Create local tracks without publishing. Useful for creating preview tracks.
Parameters
Section titled “Parameters”options?
Section titled “options?”audio?
Section titled “audio?”boolean | AudioCaptureOptions
video?
Section titled “video?”boolean | VideoCaptureOptions
Returns
Section titled “Returns”Promise<LocalTrack[]>
deleteMessage()
Section titled “deleteMessage()”deleteMessage(id): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:853
Delete a single message by ID.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
deleteRoomState()
Section titled “deleteRoomState()”deleteRoomState(key): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:869
Delete a key from the room’s shared state.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
editChatMessage()
Section titled “editChatMessage()”editChatMessage(editText, originalMessage): Promise<Message>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:879
Parameters
Section titled “Parameters”editText
Section titled “editText”string
originalMessage
Section titled “originalMessage”Returns
Section titled “Returns”Promise<Message>
Deprecated
Section titled “Deprecated”Use editMessage instead.
editMessage()
Section titled “editMessage()”editMessage(editText, originalMessage): Promise<Message>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:839
Edit a previously sent message.
Parameters
Section titled “Parameters”editText
Section titled “editText”string
originalMessage
Section titled “originalMessage”Returns
Section titled “Returns”Promise<Message>
enableCameraAndMicrophone()
Section titled “enableCameraAndMicrophone()”enableCameraAndMicrophone(captureOptions?, publishOptions?): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:224
Enable both camera and microphone simultaneously.
Uses a single getUserMedia call so the user only grants permission once.
Parameters
Section titled “Parameters”captureOptions?
Section titled “captureOptions?”audio?
Section titled “audio?”video?
Section titled “video?”publishOptions?
Section titled “publishOptions?”Returns
Section titled “Returns”Promise<void>
eventNames()
Section titled “eventNames()”eventNames(): (string | number)[];Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:7
Returns
Section titled “Returns”(string | number)[]
Inherited from
Section titled “Inherited from”getMaxListeners()
Section titled “getMaxListeners()”getMaxListeners(): number;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:9
Returns
Section titled “Returns”number
Inherited from
Section titled “Inherited from”getTrackPublication()
Section titled “getTrackPublication()”getTrackPublication(source): LocalTrackPublication | undefined;Defined in: client-sdk-js/src/participant/Participant.ts:344
Parameters
Section titled “Parameters”source
Section titled “source”Returns
Section titled “Returns”LocalTrackPublication | undefined
Inherited from
Section titled “Inherited from”Participant.getTrackPublication
getTrackPublicationByName()
Section titled “getTrackPublicationByName()”getTrackPublicationByName(name): LocalTrackPublication | undefined;Defined in: client-sdk-js/src/participant/Participant.ts:359
Find a track publication by its name.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”LocalTrackPublication | undefined
Inherited from
Section titled “Inherited from”Participant.getTrackPublicationByName
getTrackPublications()
Section titled “getTrackPublications()”getTrackPublications(): LocalTrackPublication[];Defined in: client-sdk-js/src/participant/Participant.ts:268
Returns all track publications as an array.
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Participant.getTrackPublications
joinGroup()
Section titled “joinGroup()”joinGroup(groupId): Promise<ParticipantInfo[]>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:764
Join a group (breakout room). The server will rewire subscriptions so that only participants in the same group exchange media. Permissions may change to the group-level permissions.
Parameters
Section titled “Parameters”groupId
Section titled “groupId”string
Returns
Section titled “Returns”Promise<ParticipantInfo[]>
The list of other participants already in the group.
leaveGroup()
Section titled “leaveGroup()”leaveGroup(): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:774
Leave the current group and return to the main room. Permissions revert to room-level defaults.
Returns
Section titled “Returns”Promise<void>
performRpc()
Section titled “performRpc()”performRpc(params): Promise<string>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:928
Perform an RPC call to a specific remote participant.
The remote participant must have registered a handler for the method
via room.registerRpcMethod.
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise<string>
The response payload string.
prependListener()
Section titled “prependListener()”prependListener(type, listener): this;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:14
Parameters
Section titled “Parameters”string | number
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”prependOnceListener()
Section titled “prependOnceListener()”prependOnceListener(type, listener): this;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:15
Parameters
Section titled “Parameters”string | number
listener
Section titled “listener”Listener
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”Participant.prependOnceListener
publishData()
Section titled “publishData()”publishData(data, options?): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:643
Parameters
Section titled “Parameters”Uint8Array
options?
Section titled “options?”Returns
Section titled “Returns”Promise<void>
publishTrack()
Section titled “publishTrack()”publishTrack(track, options?): Promise<LocalTrackPublication>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:264
Parameters
Section titled “Parameters”MediaStreamTrack | LocalTrack
options?
Section titled “options?”Returns
Section titled “Returns”Promise<LocalTrackPublication>
republishAllTracks()
Section titled “republishAllTracks()”republishAllTracks(options?, restartTracks?): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:1116
Re-publish all currently published tracks. Useful after a full reconnect or when changing publish options globally.
The transportclose handler only clears producers, not
trackPublications, so the publications are still available here even
after the old transport has been closed.
Parameters
Section titled “Parameters”options?
Section titled “options?”restartTracks?
Section titled “restartTracks?”boolean = true
Returns
Section titled “Returns”Promise<void>
sendChatMessage()
Section titled “sendChatMessage()”sendChatMessage(text, options?): Promise<Message>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:874
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<Message>
Deprecated
Section titled “Deprecated”Use sendMessage instead.
sendFile()
Section titled “sendFile()”sendFile(file, options?): Promise<{ id: string;}>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:905
Send a file to participants via data stream.
Parameters
Section titled “Parameters”File
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
id: string;
}>
sendMessage()
Section titled “sendMessage()”sendMessage(text, options?): Promise<Message>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:815
Send a message to all participants in the room.
Parameters
Section titled “Parameters”string
The message text / payload.
options?
Section titled “options?”SendTextOptions & object
Optional settings such as type, transient, topic, etc.
Returns
Section titled “Returns”Promise<Message>
sendText()
Section titled “sendText()”sendText(text, options?): Promise<{ id: string;}>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:888
Send a complete text message to participants via data stream.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”Returns
Section titled “Returns”Promise<{
id: string;
}>
setAttributes()
Section titled “setAttributes()”setAttributes(attributes): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:751
Set or update participant attributes. It will make updates only to keys that
are present in attributes, and will not override others.
Note: this requires canUpdateMetadata permission.
Parameters
Section titled “Parameters”attributes
Section titled “attributes”Record<string, string>
Returns
Section titled “Returns”Promise<void>
setCameraEnabled()
Section titled “setCameraEnabled()”setCameraEnabled( enabled, captureOptions?, publishOptions?): Promise<LocalTrackPublication | undefined>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:134
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
captureOptions?
Section titled “captureOptions?”publishOptions?
Section titled “publishOptions?”Returns
Section titled “Returns”Promise<LocalTrackPublication | undefined>
setMaxListeners()
Section titled “setMaxListeners()”setMaxListeners(n): this;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:8
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
Inherited from
Section titled “Inherited from”setMetadata()
Section titled “setMetadata()”setMetadata(metadata): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:732
Sets and updates the metadata of the local participant.
Note: this requires canUpdateMetadata permission.
Parameters
Section titled “Parameters”metadata
Section titled “metadata”string
Returns
Section titled “Returns”Promise<void>
setMicrophoneEnabled()
Section titled “setMicrophoneEnabled()”setMicrophoneEnabled( enabled, captureOptions?, publishOptions?): Promise<LocalTrackPublication | undefined>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:163
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
captureOptions?
Section titled “captureOptions?”publishOptions?
Section titled “publishOptions?”Returns
Section titled “Returns”Promise<LocalTrackPublication | undefined>
setName()
Section titled “setName()”setName(name): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:741
Sets and updates the name of the local participant.
Note: this requires canUpdateMetadata permission.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise<void>
setScreenShareEnabled()
Section titled “setScreenShareEnabled()”setScreenShareEnabled( enabled, captureOptions?, publishOptions?): Promise<LocalTrackPublication | undefined>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:192
Parameters
Section titled “Parameters”enabled
Section titled “enabled”boolean
captureOptions?
Section titled “captureOptions?”publishOptions?
Section titled “publishOptions?”Returns
Section titled “Returns”Promise<LocalTrackPublication | undefined>
setTrackSubscriptionPermissions()
Section titled “setTrackSubscriptionPermissions()”setTrackSubscriptionPermissions(allParticipantsAllowed, participantTrackPermissions?): void;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:790
Control who can subscribe to LocalParticipant’s published tracks.
By default, all participants can subscribe. This allows fine-grained control over who is able to subscribe at a participant and track level.
Parameters
Section titled “Parameters”allParticipantsAllowed
Section titled “allParticipantsAllowed”boolean
Allows all participants to subscribe all tracks.
Takes precedence over participantTrackPermissions if set to true.
participantTrackPermissions?
Section titled “participantTrackPermissions?”ParticipantTrackPermission[] = []
Full list of individual permissions per participant/track. Any omitted participants will not receive any permissions.
Returns
Section titled “Returns”void
streamBytes()
Section titled “streamBytes()”streamBytes(options?): Promise<ByteStreamWriter>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:914
Open an incremental byte stream to participants. Returns a writer that can be used to send byte chunks.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<ByteStreamWriter>
streamText()
Section titled “streamText()”streamText(options?): Promise<TextStreamWriter>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:897
Open an incremental text stream to participants. Returns a writer that can be used to send text chunks.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<TextStreamWriter>
unpublishTrack()
Section titled “unpublishTrack()”unpublishTrack(track, stopOnUnpublish?): Promise<LocalTrackPublication | undefined>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:586
Unpublish a track from the room.
Parameters
Section titled “Parameters”MediaStreamTrack | LocalTrack
The track or MediaStreamTrack to unpublish.
stopOnUnpublish?
Section titled “stopOnUnpublish?”boolean
Whether to stop the track after unpublishing.
Defaults to RoomOptions.stopLocalTrackOnUnpublish (true).
Returns
Section titled “Returns”Promise<LocalTrackPublication | undefined>
unpublishTracks()
Section titled “unpublishTracks()”unpublishTracks(tracks): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:1072
Unpublish all tracks matching the given sources, or all tracks if no sources specified.
Parameters
Section titled “Parameters”tracks
Section titled “tracks”Returns
Section titled “Returns”Promise<void>
updateFromInfo()
Section titled “updateFromInfo()”updateFromInfo(info): void;Defined in: client-sdk-js/src/participant/Participant.ts:272
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”updateRoomState()
Section titled “updateRoomState()”updateRoomState(key, value): Promise<void>;Defined in: client-sdk-js/src/participant/LocalParticipant.ts:862
Update a key in the room’s shared state.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<void>
waitUntilActive()
Section titled “waitUntilActive()”waitUntilActive(): Promise<void>;Defined in: client-sdk-js/src/participant/Participant.ts:209
Returns a promise that resolves once the participant is active and ready to receive data messages. Rejects if the participant transitions away from the active state first.
Returns
Section titled “Returns”Promise<void>
Inherited from
Section titled “Inherited from”listenerCount()
Section titled “listenerCount()”static listenerCount(emitter, type): number;Defined in: client-sdk-js/node_modules/.pnpm/@types+events@3.0.3/node_modules/@types/events/index.d.ts:4
Parameters
Section titled “Parameters”emitter
Section titled “emitter”EventEmitter
string | number
Returns
Section titled “Returns”number