Class: LocalParticipant

LocalParticipant

A LocalParticipant represents the local Client in a Room.

Extends

Methods


addTrack(track)

Adds a LocalTrack to the LocalParticipant.

Parameters:
Name Type Description
track LocalTrack

The LocalTrack to be added

Fires:
Throws:
TypeError
Returns:
Type
this

removeTrack(track [, stop])

Removes a LocalTrack from the LocalParticipant, if it was added.

Parameters:
Name Type Argument Default Description
track LocalTrack

The LocalTrack to be removed

stop boolean <optional>
<nullable>
true

Whether or not to call LocalTrack#stop

Fires:
Throws:
TypeError
Returns:
Type
this

Events


disconnected

The Participant has disconnected.

Parameters:
Name Type Description
participant Participant

The Participant that disconnected.

Inherited From:

trackAdded

A Track was added by the Participant.

Parameters:
Name Type Description
track Track

The Track that was added

Inherited From:

trackDimensionsChanged

One of the Participant's VideoTrack's dimensions changed.

Parameters:
Name Type Description
track VideoTrack

The VideoTrack whose dimensions changed

Inherited From:

trackDisabled

A Track was disabled by the Participant.

Parameters:
Name Type Description
track Track

The Track that was disabled

Inherited From:

trackEnabled

A Track was enabled by the Participant.

Parameters:
Name Type Description
track Track

The Track that was enabled

Inherited From:

trackRemoved

A Track was removed by the Participant.

Parameters:
Name Type Description
track Track

The Track that was removed

Inherited From:

trackStarted

One of the Participant's Tracks started.

Parameters:
Name Type Description
track Track

The Track that started

Inherited From:

trackStopped

One of the LocalParticipant's LocalTracks stopped, either because LocalTrack#stop was called or because the underlying MediaStreamTrack ended).

Parameters:
Name Type Description
track LocalTrack

The LocalTrack that stopped