Class: LocalVideoTrack

LocalVideoTrack

A LocalVideoTrack is a VideoTrack representing audio that your Client sends to a Room.


Extends

Methods


attach()

Attach the VideoTrack to a newly created <video> element.

Inherited From:
Overrides:
Returns:
Type
HTMLElement
Example
var videoEl = videoTrack.attach();
document.getElementById('div#video-track-container').appendChild(videoEl);

detach()

Detach the VideoTrack from any and all previously attached <video> elements.

Inherited From:
Overrides:
Returns:
Type
Array.<HTMLElement>
Example
var detachedVideoEls = videoTrack.detach();

disable()

Disable the LocalVideoTrack. This is effectively "pause".

Overrides:
Fires:
Returns:
Type
this

enable( [enabled])

Enable or disable the LocalVideoTrack. This is effectively "unpause" or "pause".

Parameters:
Name Type Argument Description
enabled boolean <optional>

Specify false to pause the LocalVideoTrack

Overrides:
Fires:
Returns:
Type
this

enable()

Enable the LocalVideoTrack. This is effectively "unpause".

Overrides:
Fires:
Returns:
Type
this

stop()

Calls stop on the underlying MediaStreamTrack. If you choose to stop a LocalTrack, you should use LocalMedia#removeTrack to remove it after stopping. You do not need to stop a track before using LocalTrack#disable or LocalMedia#removeTrack.

Inherited From:
Overrides:
Returns:
Type
this

Type Definitions


Dimensions

A VideoTrack's width and height.

Type:
  • object
Properties:
Name Type Argument Description
width number <nullable>

The VideoTrack's width or null if the VideoTrack has not yet started

height number <nullable>

The VideoTrack's height or null if the VideoTrack has not yet started

Inherited From:

Events


dimensionsChanged

The VideoTrack's dimensions changed.

Parameters:
Name Type Description
track VideoTrack

The VideoTrack whose dimensions changed

Inherited From:

disabled

The Track was disabled. For AudioTracks this means "muted", and for VideoTracks this means "paused".

Parameters:
Name Type Description
track Track

The Track that was disabled

Inherited From:
Overrides:

enabled

The Track was enabled. For AudioTracks this means "unmuted", and for VideoTracks this means "unpaused".

Parameters:
Name Type Description
track Track

The Track that was enabled

Inherited From:
Overrides:

started

The Track started. This means that the Track contains enough audio or video to begin playback.

Parameters:
Name Type Description
track Track

The Track that started

Inherited From:
Overrides: