File

projects/openvidu-components-angular/src/lib/services/participant/participant.service.ts

Index

Properties
Methods

Methods

getLocalParticipant
getLocalParticipant()

Returns the local participant object.

getMyName
getMyName()

Returns the local participant name.

Returns : string | undefined
getRemoteParticipantBySid
getRemoteParticipantBySid(sid: string)

Returns the remote participant with the given sid.

Parameters :
Name Type Optional
sid string No
getRemoteParticipants
getRemoteParticipants()

Returns all remote participants in the room.

Returns : ParticipantModel[]
isMyCameraEnabled
isMyCameraEnabled()

Returns if the local participant camera is enabled.

Returns : boolean
isMyMicrophoneEnabled
isMyMicrophoneEnabled()

Returns if the local participant microphone is enabled.

Returns : boolean
isMyScreenShareEnabled
isMyScreenShareEnabled()

Returns if the local participant screen is enabled.

Returns : boolean
publishData
publishData(data: Uint8Array, publishOptions: DataPublishOptions)

Publishes a new data payload to the room. Data will be forwarded to each participant in the room if the destination field in publishOptions is empty.

Parameters :
Name Type Optional Description
data Uint8Array No
publishOptions DataPublishOptions No

DataPublishOptions

Returns : Promise<void>
Async setCameraEnabled
setCameraEnabled(enabled: boolean)

Sets the local participant camera enabled or disabled.

Parameters :
Name Type Optional
enabled boolean No
Returns : Promise<void>
Async setMicrophoneEnabled
setMicrophoneEnabled(enabled: boolean)

Sets the local participant microphone enabled or disabled.

Parameters :
Name Type Optional
enabled boolean No
Returns : Promise<void>
Async setScreenShareEnabled
setScreenShareEnabled(enabled: boolean)

Share or unshare the local participant screen.

Parameters :
Name Type Optional Description
enabled boolean No

: true to share the screen, false to unshare it

Returns : Promise<void>
Async switchCamera
switchCamera(deviceId: string)

Switches the active camera track used in this room to the given device id.

Parameters :
Name Type Optional
deviceId string No
Returns : Promise<void>
Async switchMicrophone
switchMicrophone(deviceId: string)

Switches the active microphone track used in this room to the given device id.

Parameters :
Name Type Optional
deviceId string No
Returns : Promise<void>
Async switchScreenShare
switchScreenShare()

Switches the active screen share track showing a native browser dialog to select a screen or window.

Returns : Promise<void>
updateLocalParticipant
updateLocalParticipant()

Forces to update the local participant object and fire a new localParticipant$ Observable event.

Returns : void
updateRemoteParticipants
updateRemoteParticipants()

Force to update the remote participants object and fire a new remoteParticipants$ Observable event.

Returns : void

Properties

localParticipant$
Type : Observable<ParticipantModel | undefined>

Local participant Observable which pushes the local participant object in every update.

remoteParticipants$
Type : Observable<ParticipantModel[]>

Remote participants Observable which pushes the remote participants array in every update.

results matching ""

    No results matching ""