LocalParticipant ⇐ Participant
ParticipantLocalParticipant represents a single local Participant in the ProCONF room.
Kind: global class
Extends:
ParticipantProperties
| Name | Type | Description |
|---|---|---|
| identity | string | The identity of the participant. |
| audioTracks | Map.<Track.ID, LocalTrack> | The local audio tracks of the local participant. |
| videoTracks | Map.<Track.ID, LocalTrack> | The local video tracks of the local participant. |
| dataTracks | Map.<Track.ID, LocalTrack> | The local data tracks of the local participant. |
| tracks | Map.<Track.ID, LocalTrack> | The local tracks of the local participant. |
- LocalParticipant ⇐
Participant- instance
- .publishTrack(track) ⇒
Promise.<(Track|null)> - .unpublishTrack(track) ⇒
Promise.<(Track|null)> - .unpublishAll() ⇒
Promise
- .publishTrack(track) ⇒
- static
- instance
localParticipant.publishTrack(track) ⇒ Promise.<(Track|null)>
Publishes local participant's track to the room.
Kind: instance method of LocalParticipant
Returns: Promise.<(Track|null)> - Promise that resolves when the track is published or null.
Throws:
- error if administrator has disabled videoCall config from backend.
Fulfil: void
Reject: ProConfError On publish track error
| Param | Type | Description |
|---|---|---|
| track | LocalTrack | MediaStreamTrack | The LocalTrack or MediaStreamTrack to publish. |
localParticipant.unpublishTrack(track) ⇒ Promise.<(Track|null)>
Unpublishes a local participant's track from the room.
Kind: instance method of LocalParticipant
Returns: Promise.<(Track|null)> - Promise that resolves when the track is unpublished or null.
| Param | Type | Description |
|---|---|---|
| track | Track | LocalTrack | MediaStreamTrack | DataTrack | null | The LocalTrack or MediaStreamTrack or DataTrack to unpublish. |
localParticipant.unpublishAll() ⇒ Promise
Unpublish all tracks from the participant. Called in 'room failed' flow
Kind: instance method of LocalParticipant
Returns: Promise - Promise that resolves when all tracks are unpublished.
Fulfil: any
Reject: void
LocalParticipant.Events
Kind: static typedef of LocalParticipant
Properties
| Name | Type | Description |
|---|---|---|
| trackPublished | TrackPublishedEvent | Track published event |
| trackUnpublished | TrackUnpublishedEvent | Track unpublished event |