Skip to content
Cloudflare Docs

RTKParticipant

This module represents a single participant in the meeting. The participant object can be accessed from one of the participant lists present in the meeting.participants object. For example,

TypeScript
const participant1 = meeting.participants.active.get(participantId);
const participant2 = meeting.participants.joined.get(participantId);
const participant3 = meeting.participants.active.toArray()[0];
const participant4 = meeting.participants.active.toArray().filter((p) => p.name === 'John');

module.exports ⏏

Kind: Exported class

new module.exports(context, participant, self, roomSocket)

ParamType
contextContext
participantIRTKParticipant
selfSelf
roomSocketRoomSocketHandler

module.exports.id

The peer ID of the participant. The participants are indexed by this ID in the participant map.

Kind: instance property of module.exports

module.exports.userId

The user ID of the participant.

Kind: instance property of module.exports

module.exports.name

The name of the participant.

Kind: instance property of module.exports

module.exports.picture

The picture of the participant.

Kind: instance property of module.exports

module.exports.customRTKParticipantId

The custom id of the participant set during Add RTKParticipant REST API

Kind: instance property of module.exports

module.exports.clientSpecificId

Deprecated

Kind: instance property of module.exports

module.exports.device

The device configuration of the participant.

Kind: instance property of module.exports

module.exports.videoTrack

The participant's video track.

Kind: instance property of module.exports

module.exports.audioTrack

The participant's audio track.

Kind: instance property of module.exports

module.exports.screenShareTracks

The participant's screenshare video and audio track.

Kind: instance property of module.exports

module.exports.videoEnabled

This is true if the participant's video is enabled.

Kind: instance property of module.exports

module.exports.audioEnabled

This is true if the participant's audio is enabled.

Kind: instance property of module.exports

module.exports.screenShareEnabled

This is true if the participant is screensharing.

Kind: instance property of module.exports

module.exports.producers

producers created by participant

Kind: instance property of module.exports

module.exports.manualProducerConfig

producer config passed during manual subscription

Kind: instance property of module.exports

module.exports.supportsRemoteControl

This is true if the participant supports remote control.

Kind: instance property of module.exports

module.exports.presetName

The preset of the participant.

Kind: instance property of module.exports

module.exports.stageStatus

Denotes the participants's current stage status.

Kind: instance property of module.exports

module.exports.telemetry

Kind: instance property of module.exports

module.exports.isPinned

Returns true if the participant is pinned.

Kind: instance property of module.exports

module.exports.setVideoEnabled(videoEnabled, [emitEvent])

Kind: instance method of module.exports

ParamTypeDefault
videoEnabledboolean
[emitEvent]booleantrue

module.exports.setAudioEnabled(audioEnabled, [emitEvent])

Kind: instance method of module.exports

ParamTypeDefault
audioEnabledboolean
[emitEvent]booleantrue

module.exports.setScreenShareEnabled(screenShareEnabled, [emitEvent])

Kind: instance method of module.exports

ParamTypeDefault
screenShareEnabledboolean
[emitEvent]booleantrue

module.exports.pin()

Returns participant.id if user has permission to pin participants.

Kind: instance method of module.exports

module.exports.unpin()

Returns participant.id if user has permission to unpin participants.

Kind: instance method of module.exports

module.exports.setIsPinned(isPinned, [emitEvent])

Kind: instance method of module.exports

ParamTypeDefault
isPinnedboolean
[emitEvent]booleantrue

module.exports.disableAudio()

Disables audio for this participant. Requires the permission to disable participant audio.

Kind: instance method of module.exports

module.exports.kick()

Kicks this participant from the meeting. Requires the permission to kick a participant.

Kind: instance method of module.exports

module.exports.disableVideo()

Disables video for this participant. Requires the permission to disable video for a participant.

Kind: instance method of module.exports

module.exports.registerVideoElement(videoElem)

Kind: instance method of module.exports

ParamType
videoElemHTMLVideoElement

module.exports.deregisterVideoElement([videoElem])

Kind: instance method of module.exports

ParamType
[videoElem]HTMLVideoElement

module.exports.updateVideo(e)

Internal method, do not use

Kind: instance method of module.exports

ParamType
eHTMLVideoElement