diff --git a/bower.json b/bower.json index db5cf8b05..d869b4ad9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "twilio-video", - "version": "1.0.0-dev", + "version": "1.0.0", "description": "Twilio Video JavaScript library", "license": "BSD", "authors": [ diff --git a/dist/docs/AccessTokenInvalidError.html b/dist/docs/AccessTokenInvalidError.html new file mode 100644 index 000000000..4269c3696 --- /dev/null +++ b/dist/docs/AccessTokenInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: AccessTokenInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: AccessTokenInvalidError

+
+ +
+ +

+ AccessTokenInvalidError +

+ +

Raised whenever the AccessToken used for connecting to Room is invalid.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

20101

message + + +string + + + + +

'Invalid Access Token'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/AudioTrack.html b/dist/docs/AudioTrack.html new file mode 100644 index 000000000..8664412b2 --- /dev/null +++ b/dist/docs/AudioTrack.html @@ -0,0 +1,1026 @@ + + + + + + + Documentation Class: AudioTrack + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: AudioTrack

+
+ +
+ +

+ AudioTrack +

+ +

An AudioTrack is a Track representing audio.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ConfigurationAcquireFailedError.html b/dist/docs/ConfigurationAcquireFailedError.html new file mode 100644 index 000000000..fb8532749 --- /dev/null +++ b/dist/docs/ConfigurationAcquireFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ConfigurationAcquireFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ConfigurationAcquireFailedError

+
+ +
+ +

+ ConfigurationAcquireFailedError +

+ +

Raised whenever the Client is unable to acquire configuration information from the Server.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53500

message + + +string + + + + +

'Unable to acquire configuration'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ConfigurationAcquireTurnFailedError.html b/dist/docs/ConfigurationAcquireTurnFailedError.html new file mode 100644 index 000000000..73044fad2 --- /dev/null +++ b/dist/docs/ConfigurationAcquireTurnFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ConfigurationAcquireTurnFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ConfigurationAcquireTurnFailedError

+
+ +
+ +

+ ConfigurationAcquireTurnFailedError +

+ +

Raised whenever the Server is unable to return TURN credentials to the Client

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53501

message + + +string + + + + +

'Unable to acquire TURN credentials'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalAudioTrack.html b/dist/docs/LocalAudioTrack.html new file mode 100644 index 000000000..68678a061 --- /dev/null +++ b/dist/docs/LocalAudioTrack.html @@ -0,0 +1,1756 @@ + + + + + + + Documentation Class: LocalAudioTrack + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalAudioTrack

+
+ +
+ +

+ LocalAudioTrack +

+ +

A LocalAudioTrack is an AudioTrack representing +audio that your LocalParticipant sends to a Room.

+ + +
+ + +
+
+ + +
+
+

new Twilio.Video.LocalAudioTrack(mediaStreamTrack, options)

+ + +
+
+ + +
+

Construct a LocalAudioTrack from a MediaStreamTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
mediaStreamTrack + + +MediaStreamTrack + + + + +

The underlying MediaStreamTrack

options + + +LocalTrackOptions + + + + +

LocalTrack options

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ + + +
+
+

disable()

+ + +
+
+ + +
+

Disable the LocalAudioTrack. This is effectively "mute".

+
+ + + + + + + + + + +
+ + + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

enable( [enabled])

+ + +
+
+ + +
+

Enable or disable the LocalAudioTrack. This is effectively "unmute" or +"mute".

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
enabled + + +boolean + + + + + + + <optional>
+ + + + + +

Specify false to mute the LocalAudioTrack

+ + + + +
+ + + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

enable()

+ + +
+
+ + +
+

Enable the LocalAudioTrack. This is effectively "unmute".

+
+ + + + + + + + + + +
+ + + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

stop()

+ + +
+
+ + +
+

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

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalAudioTrackStats.html b/dist/docs/LocalAudioTrackStats.html new file mode 100644 index 000000000..15c06d7ac --- /dev/null +++ b/dist/docs/LocalAudioTrackStats.html @@ -0,0 +1,440 @@ + + + + + + + Documentation Class: LocalAudioTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalAudioTrackStats

+
+ +
+ +

+ LocalAudioTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
audioLevel + + +AudioLevel + + + + + + + + + <nullable>
+ +

Input AudioLevel

jitter + + +number + + + + + + + + + <nullable>
+ +

Audio jitter in milliseconds

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalParticipant.html b/dist/docs/LocalParticipant.html new file mode 100644 index 000000000..8d9b87154 --- /dev/null +++ b/dist/docs/LocalParticipant.html @@ -0,0 +1,2979 @@ + + + + + + + Documentation Class: LocalParticipant + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalParticipant

+
+ +
+ +

+ LocalParticipant +

+ +

A LocalParticipant represents the local Client in a +Room.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

addTrack(track)

+ + +
+
+ + +
+

Adds a MediaStreamTrack to the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +MediaStreamTrack + + + + +

The MediaStreamTrack to be added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+
    +
  • The corresponding LocalTrack if added, null if already present
  • +
+
+ + + +
+
+ Type +
+
+ +LocalTrack + + + +
+
+ + + + + +
+ + + +
+
+

addTrack(track)

+ + +
+
+ + +
+

Adds a LocalTrack to the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack to be added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+
    +
  • The LocalTrack if added, null if already present
  • +
+
+ + + +
+
+ Type +
+
+ +LocalTrack + + + +
+
+ + + + + +
+ + + +
+
+

addTracks(tracks)

+ + +
+
+ + +
+

Adds multiple MediaStreamTracks to the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tracks + + +Array.<MediaStreamTrack> + + + + +

The MediaStreamTracks to be added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+
    +
  • The corresponding LocalTracks that + were successfully added; If the LocalParticipant already has a + corresponding LocalTrack for a MediaStreamTrack, it won't be + included in the Array
  • +
+
+ + + +
+
+ Type +
+
+ +Array.<LocalTrack> + + + +
+
+ + + + + +
+ + + +
+
+

addTracks(tracks)

+ + +
+
+ + +
+

Adds multiple LocalTracks to the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tracks + + +Array.<LocalTrack> + + + + +

The LocalTracks to be added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+ +
+ + + +
+
+ Type +
+
+ +Array.<LocalTrack> + + + +
+
+ + + + + +
+ + + +
+
+

removeTrack(track [, stop])

+ + +
+
+ + +
+

Removes a MediaStreamTrack from the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
track + + +MediaStreamTrack + + + + + + + + + + + + +

The MediaStreamTrack to be removed

stop + + +boolean + + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + true + +

Whether or not to call LocalTrack#stop

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+
    +
  • The corresponding LocalTrack if removed, + null if the corresponding LocalTrack for MediaStreamTrack + doesn't exist
  • +
+
+ + + +
+
+ Type +
+
+ +LocalTrack + + + +
+
+ + + + + +
+ + + +
+
+

removeTrack(track [, stop])

+ + +
+
+ + +
+

Removes a LocalTrack from the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
track + + +LocalTrack + + + + + + + + + + + + +

The LocalTrack to be removed

stop + + +boolean + + + + + + + <optional>
+ + + + <nullable>
+ + + +
+ + true + +

Whether or not to call LocalTrack#stop

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+ +
+ + + +
+
+ Type +
+
+ +LocalTrack + + + +
+
+ + + + + +
+ + + +
+
+

removeTracks(tracks)

+ + +
+
+ + +
+

Removes multiple LocalTracks from the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tracks + + +Array.<LocalTrack> + + + + +

The LocalTracks to be removed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+ +
+ + + +
+
+ Type +
+
+ +Array.<LocalTrack> + + + +
+
+ + + + + +
+ + + +
+
+

removeTracks(tracks)

+ + +
+
+ + +
+

Removes multiple MediaStreamTracks from the LocalParticipant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
tracks + + +Array.<MediaStreamTrack> + + + + +

The MediaStreamTracks to be removed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + +
+ + +TypeError + + + + +
+ + + + + +
Returns:
+ + +
+
    +
  • The corresponding LocalTracks that + were successfully removed; If the LocalParticipant doesn't have + the corresponding LocalTrack for a MediaStreamTrack that is to + be removed, it won't be included in the Array
  • +
+
+ + + +
+
+ Type +
+
+ +Array.<LocalTrack> + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

disconnected

+ + +
+
+ + +
+

The Participant has disconnected.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant that disconnected.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of the Participant's Tracks started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalTrack.html b/dist/docs/LocalTrack.html new file mode 100644 index 000000000..ea9e6541b --- /dev/null +++ b/dist/docs/LocalTrack.html @@ -0,0 +1,1689 @@ + + + + + + + Documentation Class: LocalTrack + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalTrack

+
+ +
+ +

+ LocalTrack +

+ +

A LocalTrack represents audio or video that your +Client is sending to a Room. As such, it can be +enabled and disabled with LocalTrack#enable and +LocalTrack#disable or stopped completely with +LocalTrack#stop.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
isStopped + + +boolean + + + + +

Whether or not the LocalTrack is stopped

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ + + +
+
+

disable()

+ + +
+
+ + +
+

Disable the LocalTrack.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

enable( [enabled])

+ + +
+
+ + +
+

Enable or disable the LocalTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
enabled + + +boolean + + + + + + + <optional>
+ + + + + +

Specify false to disable the LocalTrack

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

enable()

+ + +
+
+ + +
+

Enable the LocalTrack.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

stop()

+ + +
+
+ + +
+

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

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ +
+ + + + + +

Events

+ +
+ +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalTrackStats.html b/dist/docs/LocalTrackStats.html new file mode 100644 index 000000000..27391b05f --- /dev/null +++ b/dist/docs/LocalTrackStats.html @@ -0,0 +1,472 @@ + + + + + + + Documentation Class: LocalTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalTrackStats

+
+ +
+ +

+ LocalTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
bytesSent + + +number + + + + + + + + + <nullable>
+ +

Number of bytes sent

packetsSent + + +number + + + + + + + + + <nullable>
+ +

Number of packets sent

roundTripTime + + +number + + + + + + + + + <nullable>
+ +

Round trip time in milliseconds

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalVideoTrack.html b/dist/docs/LocalVideoTrack.html new file mode 100644 index 000000000..e943d3609 --- /dev/null +++ b/dist/docs/LocalVideoTrack.html @@ -0,0 +1,2028 @@ + + + + + + + Documentation Class: LocalVideoTrack + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalVideoTrack

+
+ +
+ +

+ LocalVideoTrack +

+ +

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

+ + +
+ + +
+
+ + +
+
+

new Twilio.Video.LocalVideoTrack(mediaStreamTrack, options)

+ + +
+
+ + +
+

Construct a LocalVideoTrack from MediaStreamTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
mediaStreamTrack + + +MediaStreamTrack + + + + +

The underlying MediaStreamTrack

options + + +LocalTrackOptions + + + + +

LocalTrack options

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + +

Members

+ +
+ +
+
+

stop

+ + +
+
+ +
+

See LocalTrack#stop.

+
+ + + + + +
+ + + + + + + + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Methods

+ +
+ +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ + + +
+
+

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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
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 + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

Dimensions

+ + +
+
+ +
+

A VideoTrack's width and height.

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/LocalVideoTrackStats.html b/dist/docs/LocalVideoTrackStats.html new file mode 100644 index 000000000..9754db7a9 --- /dev/null +++ b/dist/docs/LocalVideoTrackStats.html @@ -0,0 +1,504 @@ + + + + + + + Documentation Class: LocalVideoTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: LocalVideoTrackStats

+
+ +
+ +

+ LocalVideoTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
captureDimensions + + +VideoTrack#Dimensions + + + + + + + + + <nullable>
+ +

Video capture resolution

dimensions + + +VideoTrack#Dimensions + + + + + + + + + <nullable>
+ +

Video encoding resolution

captureFrameRate + + +number + + + + + + + + + <nullable>
+ +

Video capture frame rate

frameRate + + +number + + + + + + + + + <nullable>
+ +

Video encoding frame rate

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/MediaClientLocalDescFailedError.html b/dist/docs/MediaClientLocalDescFailedError.html new file mode 100644 index 000000000..d41853cc6 --- /dev/null +++ b/dist/docs/MediaClientLocalDescFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: MediaClientLocalDescFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: MediaClientLocalDescFailedError

+
+ +
+ +

+ MediaClientLocalDescFailedError +

+ +

Raised whenever a Client is unable to create or apply a local media description.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53400

message + + +string + + + + +

'Client is unable to create or apply a local media description'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/MediaClientRemoteDescFailedError.html b/dist/docs/MediaClientRemoteDescFailedError.html new file mode 100644 index 000000000..5b1f71270 --- /dev/null +++ b/dist/docs/MediaClientRemoteDescFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: MediaClientRemoteDescFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: MediaClientRemoteDescFailedError

+
+ +
+ +

+ MediaClientRemoteDescFailedError +

+ +

Raised whenever the Client receives a remote media description but is unable to apply it.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53402

message + + +string + + + + +

'Client is unable to apply a remote media description'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/MediaNoSupportedCodecError.html b/dist/docs/MediaNoSupportedCodecError.html new file mode 100644 index 000000000..12766779a --- /dev/null +++ b/dist/docs/MediaNoSupportedCodecError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: MediaNoSupportedCodecError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: MediaNoSupportedCodecError

+
+ +
+ +

+ MediaNoSupportedCodecError +

+ +

Raised whenever the intersection of codecs supported by the Client and the Server (or, in peer-to-peer, the Client and another Participant) is empty.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53404

message + + +string + + + + +

'No supported codec'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/MediaServerLocalDescFailedError.html b/dist/docs/MediaServerLocalDescFailedError.html new file mode 100644 index 000000000..d1ab81632 --- /dev/null +++ b/dist/docs/MediaServerLocalDescFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: MediaServerLocalDescFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: MediaServerLocalDescFailedError

+
+ +
+ +

+ MediaServerLocalDescFailedError +

+ +

Raised whenever the Server is unable to create or apply a local media description.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53401

message + + +string + + + + +

'Server is unable to create or apply a local media description'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/MediaServerRemoteDescFailedError.html b/dist/docs/MediaServerRemoteDescFailedError.html new file mode 100644 index 000000000..300d52cb9 --- /dev/null +++ b/dist/docs/MediaServerRemoteDescFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: MediaServerRemoteDescFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: MediaServerRemoteDescFailedError

+
+ +
+ +

+ MediaServerRemoteDescFailedError +

+ +

Raised whenever the Server receives a remote media description but is unable to apply it.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53403

message + + +string + + + + +

'Server is unable to apply a remote media description'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Participant.html b/dist/docs/Participant.html new file mode 100644 index 000000000..644200924 --- /dev/null +++ b/dist/docs/Participant.html @@ -0,0 +1,1577 @@ + + + + + + + Documentation Class: Participant + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Participant

+
+ +
+ +

+ Participant +

+ +

A Participant represents a remote Client in a +Room.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
audioTracks + + +Map.<Track.ID, AudioTrack> + + + + +

The Participant's AudioTracks.

identity + + +Participant.Identity + + + + +

The identity of the Participant

sid + + +Participant.SID + + + + +

The Participant's SID

state + + +string + + + + +

"connected", "disconnected" or "failed"

tracks + + +Map.<Track.ID, Track> + + + + +

The Participant's Tracks

videoTracks + + +Map.<Track.ID, VideoTrack> + + + + +

The Participant's VideoTracks.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + +

Type Definitions

+ +
+ +
+
+

Identity

+ + +
+
+ +
+

A Participant.Identity is a string that identifies a +Participant. You can think of it like a name.

+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

SID

+ + +
+
+ +
+

A Participant.SID is a 34-character string starting with "PA" +that uniquely identifies a Participant.

+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Events

+ +
+ +
+
+

disconnected

+ + +
+
+ + +
+

The Participant has disconnected.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant that disconnected.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of the Participant's Tracks started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ParticipantIdentityCharsInvalidError.html b/dist/docs/ParticipantIdentityCharsInvalidError.html new file mode 100644 index 000000000..632dce2e8 --- /dev/null +++ b/dist/docs/ParticipantIdentityCharsInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ParticipantIdentityCharsInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ParticipantIdentityCharsInvalidError

+
+ +
+ +

+ ParticipantIdentityCharsInvalidError +

+ +

Raised whenever a Participant identity contains invalid characters.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53202

message + + +string + + + + +

'Participant identity contains invalid characters'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ParticipantIdentityInvalidError.html b/dist/docs/ParticipantIdentityInvalidError.html new file mode 100644 index 000000000..71f26f144 --- /dev/null +++ b/dist/docs/ParticipantIdentityInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ParticipantIdentityInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ParticipantIdentityInvalidError

+
+ +
+ +

+ ParticipantIdentityInvalidError +

+ +

Raised whenever a Participant identity is invalid, and the scenario is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53200

message + + +string + + + + +

'Participant identity is invalid'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ParticipantIdentityTooLongError.html b/dist/docs/ParticipantIdentityTooLongError.html new file mode 100644 index 000000000..5f7bb8d8c --- /dev/null +++ b/dist/docs/ParticipantIdentityTooLongError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ParticipantIdentityTooLongError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ParticipantIdentityTooLongError

+
+ +
+ +

+ ParticipantIdentityTooLongError +

+ +

Raised whenever a Participant identity is too long.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53201

message + + +string + + + + +

'Participant identity is too long'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ParticipantMaxTracksExceededError.html b/dist/docs/ParticipantMaxTracksExceededError.html new file mode 100644 index 000000000..ec2be6fb0 --- /dev/null +++ b/dist/docs/ParticipantMaxTracksExceededError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ParticipantMaxTracksExceededError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ParticipantMaxTracksExceededError

+
+ +
+ +

+ ParticipantMaxTracksExceededError +

+ +

Raised whenever a Participant has too many Tracks.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53203

message + + +string + + + + +

'Participant has too many Tracks'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/ParticipantNotFoundError.html b/dist/docs/ParticipantNotFoundError.html new file mode 100644 index 000000000..ab011f62f --- /dev/null +++ b/dist/docs/ParticipantNotFoundError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: ParticipantNotFoundError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: ParticipantNotFoundError

+
+ +
+ +

+ ParticipantNotFoundError +

+ +

Raised whenever attempting operation on a non-existent Participant.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53204

message + + +string + + + + +

'Participant not found'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RemoteAudioTrackStats.html b/dist/docs/RemoteAudioTrackStats.html new file mode 100644 index 000000000..aad3b7bf9 --- /dev/null +++ b/dist/docs/RemoteAudioTrackStats.html @@ -0,0 +1,440 @@ + + + + + + + Documentation Class: RemoteAudioTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RemoteAudioTrackStats

+
+ +
+ +

+ RemoteAudioTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
audioLevel + + +AudioLevel + + + + + + + + + <nullable>
+ +

Output AudioLevel

jitter + + +number + + + + + + + + + <nullable>
+ +

Audio jitter in milliseconds

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RemoteTrackStats.html b/dist/docs/RemoteTrackStats.html new file mode 100644 index 000000000..3a988d7b6 --- /dev/null +++ b/dist/docs/RemoteTrackStats.html @@ -0,0 +1,440 @@ + + + + + + + Documentation Class: RemoteTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RemoteTrackStats

+
+ +
+ +

+ RemoteTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
bytesReceived + + +number + + + + + + + + + <nullable>
+ +

Number of bytes received

packetsReceived + + +number + + + + + + + + + <nullable>
+ +

Number of packets received

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RemoteVideoTrackStats.html b/dist/docs/RemoteVideoTrackStats.html new file mode 100644 index 000000000..b5f92e1a5 --- /dev/null +++ b/dist/docs/RemoteVideoTrackStats.html @@ -0,0 +1,440 @@ + + + + + + + Documentation Class: RemoteVideoTrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RemoteVideoTrackStats

+
+ +
+ +

+ RemoteVideoTrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
dimensions + + +VideoTrack#Dimensions + + + + + + + + + <nullable>
+ +

Received video resolution

frameRate + + +number + + + + + + + + + <nullable>
+ +

Received video frame rate

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Room.html b/dist/docs/Room.html new file mode 100644 index 000000000..48278f6fd --- /dev/null +++ b/dist/docs/Room.html @@ -0,0 +1,2395 @@ + + + + + + + Documentation Class: Room + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Room

+
+ +
+ +

+ Room +

+ +

A Room represents communication between your + Client and one or more Participants sharing + AudioTracks and VideoTracks. +

+ You can connect to a Room by calling Client#connect.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
isRecording + + +boolean + + + + +

Whether or not the Room is being + recorded

localParticipant + + +LocalParticipant + + + + +

Your Client's + LocalParticipant in the Room.

name + + +string + + + + +

The Room's name

participants + + +Map.<Participant.SID, Participant> + + + + +

The Participants + participating in this Room

sid + + +Room.SID + + + + +

The Room's SID

state + + +string + + + + +

"connected" or "disconnected"

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + +
Throws:
+ + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

disconnect()

+ + +
+
+ + +
+

Disconnect from the Room.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +this + + + +
+
+ + + + + +
+ + + +
+
+

getStats()

+ + +
+
+ + +
+

Get the Room's media statistics.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<Array.<StatsReport>> + + + +
+
+ + + + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

SID

+ + +
+
+ +
+

A Room.SID is a 34-character string starting with "RM" +that uniquely identifies a Room.

+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Events

+ +
+ +
+
+

disconnected

+ + +
+
+ + +
+

Your Client was disconnected from the Room and all +other Participants.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
room + + +Room + + + + + + + + + + +

The Room your + Client was disconnected from

error + + +TwilioError + + + + + + + + + <nullable>
+ + + +

Present when the Client got + disconnected from the Room unexpectedly

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('disconnected', function(room, error) {
+  if (error) {
+    console.log('Unexpectedly disconnected:', error);
+  }
+  myRoom.localParticipant.tracks.forEach(function(track) {
+    track.stop();
+    track.detach();
+  });
+});
+ + + +
+ + + +
+
+

participantConnected

+ + +
+
+ + +
+

A Participant joined the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant who joined

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('participantConnected', function(participant) {
+  console.log(participant.identity + ' joined the Room');
+});
+ + + +
+ + + +
+
+

participantDisconnected

+ + +
+
+ + +
+

A Participant left the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant who left

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('participantDisconnected', function(participant) {
+  console.log(participant.identity + ' left the Room');
+  participant.tracks.forEach(function(track) {
+    track.detach().forEach(function(mediaElement) {
+      mediaElement.remove();
+    });
+  });
+});
+ + + +
+ + + +
+
+

recordingStarted

+ + +
+
+ + +
+

The Room is now being recorded

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

recordingStopped

+ + +
+
+ + +
+

The Room is no longer being recorded

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

participant + + +Participant + + + + +

The Participant who added the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
room.on('trackAdded', function(track, participant) {
+  var participantView = document.getElementById('participant-view-' + participant.identity);
+  participantView.appendChild(track.attach());
+});
+ + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

participant + + +Participant + + + + +

The Participant whose VideoTrack's + dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

participant + + +Participant + + + + +

The Participant who disabled the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

participant + + +Participant + + + + +

The Participant who enabled the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

participant + + +Participant + + + + +

The Participant who removed the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
room.on('trackRemoved', function(track, participant) {
+  track.detach().forEach(function(mediaElement) {
+    mediaElement.remove();
+  });
+});
+ + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of a Participant's Tracks in the Room started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

participant + + +Participant + + + + +

The Participant whose Track started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomConnectFailedError.html b/dist/docs/RoomConnectFailedError.html new file mode 100644 index 000000000..375f9bb95 --- /dev/null +++ b/dist/docs/RoomConnectFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomConnectFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomConnectFailedError

+
+ +
+ +

+ RoomConnectFailedError +

+ +

Raised whenever a Client is unable to connect to a Room, and the scenario is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53104

message + + +string + + + + +

'Unable to connect to Room'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomCreateFailedError.html b/dist/docs/RoomCreateFailedError.html new file mode 100644 index 000000000..be4bba832 --- /dev/null +++ b/dist/docs/RoomCreateFailedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomCreateFailedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomCreateFailedError

+
+ +
+ +

+ RoomCreateFailedError +

+ +

Raised whenever the Server is unable to create a Room.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53103

message + + +string + + + + +

'Unable to create Room'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomMaxParticipantsExceededError.html b/dist/docs/RoomMaxParticipantsExceededError.html new file mode 100644 index 000000000..999d3868a --- /dev/null +++ b/dist/docs/RoomMaxParticipantsExceededError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomMaxParticipantsExceededError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomMaxParticipantsExceededError

+
+ +
+ +

+ RoomMaxParticipantsExceededError +

+ +

Raised whenever a Client is unable to connect to a Room because the Room contains too many Participants.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53105

message + + +string + + + + +

'Room contains too many Participants'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomNameCharsInvalidError.html b/dist/docs/RoomNameCharsInvalidError.html new file mode 100644 index 000000000..5e8cb82b6 --- /dev/null +++ b/dist/docs/RoomNameCharsInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomNameCharsInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomNameCharsInvalidError

+
+ +
+ +

+ RoomNameCharsInvalidError +

+ +

Raised whenever a Room name contains invalid characters.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53102

message + + +string + + + + +

'Room name contains invalid characters'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomNameInvalidError.html b/dist/docs/RoomNameInvalidError.html new file mode 100644 index 000000000..c93214f31 --- /dev/null +++ b/dist/docs/RoomNameInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomNameInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomNameInvalidError

+
+ +
+ +

+ RoomNameInvalidError +

+ +

Raised whenever a Room name is invalid, and the scenario is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53100

message + + +string + + + + +

'Room name is invalid'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomNameTooLongError.html b/dist/docs/RoomNameTooLongError.html new file mode 100644 index 000000000..dd2eb372f --- /dev/null +++ b/dist/docs/RoomNameTooLongError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomNameTooLongError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomNameTooLongError

+
+ +
+ +

+ RoomNameTooLongError +

+ +

Raised whenever a Room name is too long.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53101

message + + +string + + + + +

'Room name is too long'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/RoomNotFoundError.html b/dist/docs/RoomNotFoundError.html new file mode 100644 index 000000000..22a67f85b --- /dev/null +++ b/dist/docs/RoomNotFoundError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: RoomNotFoundError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: RoomNotFoundError

+
+ +
+ +

+ RoomNotFoundError +

+ +

Raised whenever attempting operation on a non-existent Room.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53106

message + + +string + + + + +

'Room not found'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/SignalingConnectionDisconnectedError.html b/dist/docs/SignalingConnectionDisconnectedError.html new file mode 100644 index 000000000..8f7733b9f --- /dev/null +++ b/dist/docs/SignalingConnectionDisconnectedError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: SignalingConnectionDisconnectedError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: SignalingConnectionDisconnectedError

+
+ +
+ +

+ SignalingConnectionDisconnectedError +

+ +

Raised whenever the signaling connection is unexpectedly disconnected.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53001

message + + +string + + + + +

'Signaling connection disconnected'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/SignalingConnectionError.html b/dist/docs/SignalingConnectionError.html new file mode 100644 index 000000000..8daaefc89 --- /dev/null +++ b/dist/docs/SignalingConnectionError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: SignalingConnectionError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: SignalingConnectionError

+
+ +
+ +

+ SignalingConnectionError +

+ +

Raised whenever a signaling connection error occurs that is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53000

message + + +string + + + + +

'Signaling connection error'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/SignalingConnectionTimeoutError.html b/dist/docs/SignalingConnectionTimeoutError.html new file mode 100644 index 000000000..34acd9530 --- /dev/null +++ b/dist/docs/SignalingConnectionTimeoutError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: SignalingConnectionTimeoutError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: SignalingConnectionTimeoutError

+
+ +
+ +

+ SignalingConnectionTimeoutError +

+ +

Raised whenever the signaling connection times out.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53002

message + + +string + + + + +

'Signaling connection timed out'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/SignalingIncomingMessageInvalidError.html b/dist/docs/SignalingIncomingMessageInvalidError.html new file mode 100644 index 000000000..bcb21d887 --- /dev/null +++ b/dist/docs/SignalingIncomingMessageInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: SignalingIncomingMessageInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: SignalingIncomingMessageInvalidError

+
+ +
+ +

+ SignalingIncomingMessageInvalidError +

+ +

Raised whenever the Client receives a message from the Server that the Client cannot handle.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53003

message + + +string + + + + +

'Client received an invalid signaling message'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/SignalingOutgoingMessageInvalidError.html b/dist/docs/SignalingOutgoingMessageInvalidError.html new file mode 100644 index 000000000..fde678874 --- /dev/null +++ b/dist/docs/SignalingOutgoingMessageInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: SignalingOutgoingMessageInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: SignalingOutgoingMessageInvalidError

+
+ +
+ +

+ SignalingOutgoingMessageInvalidError +

+ +

Raised whenever the Client sends a message to the Server that the Server cannot handle.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53004

message + + +string + + + + +

'Client sent an invalid signaling message'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/StatsReport.html b/dist/docs/StatsReport.html new file mode 100644 index 000000000..e24e555c7 --- /dev/null +++ b/dist/docs/StatsReport.html @@ -0,0 +1,459 @@ + + + + + + + Documentation Class: StatsReport + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: StatsReport

+
+ +
+ +

+ StatsReport +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
localAudioTrackStats + + +Array.<LocalAudioTrackStats> + + + + +

List of LocalAudioTrackStats

localVideoTrackStats + + +Array.<LocalVideoTrackStats> + + + + +

List of LocalVideoTrackStats

remoteAudioTrackStats + + +Array.<RemoteAudioTrackStats> + + + + +

List of RemoteAudioTrackStats

remoteVideoTrackStats + + +Array.<RemoteVideoTrackStats> + + + + +

List of RemoteVideoTrackStats

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/Track.html b/dist/docs/Track.html new file mode 100644 index 000000000..0bdab399b --- /dev/null +++ b/dist/docs/Track.html @@ -0,0 +1,1851 @@ + + + + + + + Documentation Class: Track + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: Track

+
+ +
+ +

+ Track +

+ +

A Track represents audio or video that can be sent to or +received from a Room.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
id + + +Track.ID + + + + +

This Track's ID

isStarted + + +boolean + + + + +

Whether or not the Track has started

isEnabled + + +boolean + + + + +

Whether or not the Track is enabled + (i.e., whether it is paused or muted)

kind + + +string + + + + +

The kind of the underlying + MediaStreamTrack; e.g. "audio" or "video"

mediaStreamTrack + + +MediaStreamTrack + + + + +

The underlying + MediaStreamTrack

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

attach(selector)

+ + +
+
+ + +
+

Attach the Track to an HTMLMediaElement selected by +document.querySelector.

+

If the HTMLMediaElement's srcObject is not set to a MediaStream, this +method sets it to a new MediaStream containing the Track's +MediaStreamTrack; otherwise, it adds the Track's MediaStreamTrack to +the existing MediaStream. Finally, if there are any other MediaStreamTracks +of the same kind on the MediaStream, this method removes them.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
selector + + +string + + + + +

A query selector for the HTMLMediaElement to attach to

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalAudioTrack().then(function(track) {
+  track.attach('#my-existing-video-element-id');
+});
+ + + +
+ + + +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

attach(el)

+ + +
+
+ + +
+

Attach the Track to an existing HTMLMediaElement.

+

If the HTMLMediaElement's srcObject is not set to a MediaStream, +this method sets it to a new MediaStream containing the Track's +MediaStreamTrack; otherwise, it adds the Track's MediaStreamTrack to +the existing MediaStream. Finally, if there are any other MediaStreamTracks +of the same kind on the MediaStream, this method removes them.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
el + + +HTMLMediaElement + + + + +

The HTMLMediaElement to attach to

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+var videoElement;
+
+Video.createLocalVideoTrack().then(function(track) {
+  videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+  return Video.createLocalAudioTrack();
+}).then(function(track) {
+  track.attach(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ + + +
+
+

detach(el)

+ + +
+
+ + +
+

Detach a Track from a previously attached HTMLMediaElement.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
el + + +HTMLMediaElement + + + + +

One of the HTMLMediaElements to which the + Track is attached

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detached HTMLMediaElement

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var videoElement = document.getElementById('my-video-element');
+track.detach(videoElement).remove();
+ 
+ + + +
+ + + +
+
+

detach(selector)

+ + +
+
+ + +
+

Detach a Track from a previously attached HTMLMediaElement specified +by document.querySelector.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
selector + + +string + + + + +

The query selector of HTMLMediaElement to which + the Track is attached

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detached HTMLMediaElement

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
track.detach('#my-video-element').remove();
+ + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

ID

+ + +
+
+ +
+

The Track ID is a string identifier for the Track.

+
+ + + +
Type:
+
    +
  • + +string + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Events

+ +
+ +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TrackInvalidError.html b/dist/docs/TrackInvalidError.html new file mode 100644 index 000000000..55c41f398 --- /dev/null +++ b/dist/docs/TrackInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: TrackInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TrackInvalidError

+
+ +
+ +

+ TrackInvalidError +

+ +

Raised whenever a Track is invalid, and the scenario is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53300

message + + +string + + + + +

'Track is invalid'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TrackNameCharsInvalidError.html b/dist/docs/TrackNameCharsInvalidError.html new file mode 100644 index 000000000..f1cd5cc45 --- /dev/null +++ b/dist/docs/TrackNameCharsInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: TrackNameCharsInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TrackNameCharsInvalidError

+
+ +
+ +

+ TrackNameCharsInvalidError +

+ +

Raised whenever a Track name contains invalid characters.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53303

message + + +string + + + + +

'Track name contains invalid characters'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TrackNameInvalidError.html b/dist/docs/TrackNameInvalidError.html new file mode 100644 index 000000000..6b8c0eac7 --- /dev/null +++ b/dist/docs/TrackNameInvalidError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: TrackNameInvalidError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TrackNameInvalidError

+
+ +
+ +

+ TrackNameInvalidError +

+ +

Raised whenever a Track name is invalid, and the scenario is not covered by a more specific error code.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53301

message + + +string + + + + +

'Track name is invalid'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TrackNameTooLongError.html b/dist/docs/TrackNameTooLongError.html new file mode 100644 index 000000000..a7a36c987 --- /dev/null +++ b/dist/docs/TrackNameTooLongError.html @@ -0,0 +1,527 @@ + + + + + + + Documentation Class: TrackNameTooLongError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TrackNameTooLongError

+
+ +
+ +

+ TrackNameTooLongError +

+ +

Raised whenever a Track name is too long.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

53302

message + + +string + + + + +

'Track name is too long'

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TrackStats.html b/dist/docs/TrackStats.html new file mode 100644 index 000000000..cbb04d341 --- /dev/null +++ b/dist/docs/TrackStats.html @@ -0,0 +1,519 @@ + + + + + + + Documentation Class: TrackStats + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TrackStats

+
+ +
+ +

+ TrackStats +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
trackId + + +string + + + + + + + + +

MediaStreamTrack ID

timestamp + + +number + + + + + + + + +

The Unix timestamp in milliseconds

ssrc + + +string + + + + + + + + +

SSRC of the MediaStreamTrack

packetsLost + + +number + + + + + + + + + <nullable>
+ +

Then number of packets lost

codec + + +string + + + + + + + + + <nullable>
+ +

Name of the codec used to encode the MediaStreamTrack's media

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/TwilioError.html b/dist/docs/TwilioError.html new file mode 100644 index 000000000..ee017609e --- /dev/null +++ b/dist/docs/TwilioError.html @@ -0,0 +1,500 @@ + + + + + + + Documentation Class: TwilioError + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: TwilioError

+
+ +
+ +

+ TwilioError +

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
code + + +number + + + + +

Error code

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + +
    +
  • Error
  • +
+ + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

toString()

+ + +
+
+ + +
+

Returns human readable string describing the error.

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + +
+ +
+ + + + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/VideoTrack.html b/dist/docs/VideoTrack.html new file mode 100644 index 000000000..14fb08a40 --- /dev/null +++ b/dist/docs/VideoTrack.html @@ -0,0 +1,1384 @@ + + + + + + + Documentation Class: VideoTrack + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Class: VideoTrack

+
+ +
+ +

+ VideoTrack +

+ +

A VideoTrack is a Track representing video.

+ + +
+ + +
+
+ + +
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
dimensions + + +VideoTrack#Dimensions + + + + +

The VideoTrack's VideoTrack#Dimensions

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
Fires:
+ + + + + + + + + + + + +
+ + +
+ + +

Extends

+ + + + + + + + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

attach()

+ + +
+
+ + +
+

Attach the Track to a newly created HTMLMediaElement.

+

The HTMLMediaElement's srcObject will be set to a new +MediaStream containing the Track's MediaStreamTrack.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

Either an HTMLAudioElement or HTMLVideoElement, + depending on the Track's kind

+
+ + + +
+
+ Type +
+
+ +HTMLMediaElement + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+Video.createLocalVideoTrack().then(function(track) {
+  var videoElement = track.attach();
+  document.getElementById('my-container').appendChild(videoElement);
+});
+ 
+ + + +
+ + + +
+
+

detach()

+ + +
+
+ + +
+

Detach a Track from all previously attached HTMLMediaElements.

+
+ + + + + + + + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + +
+

The detachedHTMLMediaElements

+
+ + + +
+
+ Type +
+
+ +Array.<HTMLMediaElement> + + + +
+
+ + + + + +
Example
+ +
var detachedElements = track.detach();
+detachedElements.forEach(function(el) {
+  el.remove();
+});
+ 
+ + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

Dimensions

+ + +
+
+ +
+

A VideoTrack's width and height.

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
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

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +

Events

+ +
+ +
+
+

dimensionsChanged

+ + +
+
+ + +
+

The VideoTrack's dimensions changed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/classes.list.html b/dist/docs/classes.list.html new file mode 100644 index 000000000..0e2dd0431 --- /dev/null +++ b/dist/docs/classes.list.html @@ -0,0 +1,7145 @@ + + + + + + + Documentation Classes + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Classes

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +

Classes

+ +
+
AccessTokenInvalidError
+
+ +
AudioTrack
+
+ +
ConfigurationAcquireFailedError
+
+ +
ConfigurationAcquireTurnFailedError
+
+ +
LocalAudioTrack
+
+ +
LocalAudioTrackStats
+
+ +
LocalParticipant
+
+ +
LocalTrack
+
+ +
LocalTrackStats
+
+ +
LocalVideoTrack
+
+ +
LocalVideoTrackStats
+
+ +
MediaClientLocalDescFailedError
+
+ +
MediaClientRemoteDescFailedError
+
+ +
MediaNoSupportedCodecError
+
+ +
MediaServerLocalDescFailedError
+
+ +
MediaServerRemoteDescFailedError
+
+ +
Participant
+
+ +
ParticipantIdentityCharsInvalidError
+
+ +
ParticipantIdentityInvalidError
+
+ +
ParticipantIdentityTooLongError
+
+ +
ParticipantMaxTracksExceededError
+
+ +
ParticipantNotFoundError
+
+ +
RemoteAudioTrackStats
+
+ +
RemoteTrackStats
+
+ +
RemoteVideoTrackStats
+
+ +
Room
+
+ +
RoomConnectFailedError
+
+ +
RoomCreateFailedError
+
+ +
RoomMaxParticipantsExceededError
+
+ +
RoomNameCharsInvalidError
+
+ +
RoomNameInvalidError
+
+ +
RoomNameTooLongError
+
+ +
RoomNotFoundError
+
+ +
SignalingConnectionDisconnectedError
+
+ +
SignalingConnectionError
+
+ +
SignalingConnectionTimeoutError
+
+ +
SignalingIncomingMessageInvalidError
+
+ +
SignalingOutgoingMessageInvalidError
+
+ +
StatsReport
+
+ +
Track
+
+ +
TrackInvalidError
+
+ +
TrackNameCharsInvalidError
+
+ +
TrackNameInvalidError
+
+ +
TrackNameTooLongError
+
+ +
TrackStats
+
+ +
TwilioError
+
+ +
VideoTrack
+
+
+ + + + + + + + + + + + + +

Events

+ +
+ +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The Participant has disconnected.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant that disconnected.

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of the Participant's Tracks started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

dimensionsChanged

+ + +
+
+ + +
+

The VideoTrack's dimensions changed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
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:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + +
Overrides:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

stopped

+ + +
+
+ + +
+

The LocalTrack was stopped, either because LocalTrack#stop +was called or because the underlying MediaStreamTrack ended).

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +LocalTrack + + + + +

The LocalTrack that stopped

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

The Participant has disconnected.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant that disconnected.

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by the Participant.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of the Participant's Tracks started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disconnected

+ + +
+
+ + +
+

Your Client was disconnected from the Room and all +other Participants.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
room + + +Room + + + + + + + + + + +

The Room your + Client was disconnected from

error + + +TwilioError + + + + + + + + + <nullable>
+ + + +

Present when the Client got + disconnected from the Room unexpectedly

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('disconnected', function(room, error) {
+  if (error) {
+    console.log('Unexpectedly disconnected:', error);
+  }
+  myRoom.localParticipant.tracks.forEach(function(track) {
+    track.stop();
+    track.detach();
+  });
+});
+ + + +
+ + + +
+
+

participantConnected

+ + +
+
+ + +
+

A Participant joined the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant who joined

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('participantConnected', function(participant) {
+  console.log(participant.identity + ' joined the Room');
+});
+ + + +
+ + + +
+
+

participantDisconnected

+ + +
+
+ + +
+

A Participant left the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
participant + + +Participant + + + + +

The Participant who left

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
myRoom.on('participantDisconnected', function(participant) {
+  console.log(participant.identity + ' left the Room');
+  participant.tracks.forEach(function(track) {
+    track.detach().forEach(function(mediaElement) {
+      mediaElement.remove();
+    });
+  });
+});
+ + + +
+ + + +
+
+

recordingStarted

+ + +
+
+ + +
+

The Room is now being recorded

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

recordingStopped

+ + +
+
+ + +
+

The Room is no longer being recorded

+
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackAdded

+ + +
+
+ + +
+

A Track was added by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was added

participant + + +Participant + + + + +

The Participant who added the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
room.on('trackAdded', function(track, participant) {
+  var participantView = document.getElementById('participant-view-' + participant.identity);
+  participantView.appendChild(track.attach());
+});
+ + + +
+ + + +
+
+

trackDimensionsChanged

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

participant + + +Participant + + + + +

The Participant whose VideoTrack's + dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackDisabled

+ + +
+
+ + +
+

A Track was disabled by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

participant + + +Participant + + + + +

The Participant who disabled the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackEnabled

+ + +
+
+ + +
+

A Track was enabled by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

participant + + +Participant + + + + +

The Participant who enabled the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

trackRemoved

+ + +
+
+ + +
+

A Track was removed by a Participant in the Room.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was removed

participant + + +Participant + + + + +

The Participant who removed the + Track

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
Example
+ +
room.on('trackRemoved', function(track, participant) {
+  track.detach().forEach(function(mediaElement) {
+    mediaElement.remove();
+  });
+});
+ + + +
+ + + +
+
+

trackStarted

+ + +
+
+ + +
+

One of a Participant's Tracks in the Room started.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

participant + + +Participant + + + + +

The Participant whose Track started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

dimensionsChanged

+ + +
+
+ + +
+

The VideoTrack's dimensions changed.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +VideoTrack + + + + +

The VideoTrack whose dimensions changed

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

disabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was disabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

enabled

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that was enabled

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ + + +
+
+

started

+ + +
+
+ + +
+

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

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
track + + +Track + + + + +

The Track that started

+ + + + +
+ + + + + + + +
Inherited From:
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/fonts/glyphicons-halflings-regular.eot b/dist/docs/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 000000000..b93a4953f Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.eot differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.svg b/dist/docs/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 000000000..94fb5490a --- /dev/null +++ b/dist/docs/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/fonts/glyphicons-halflings-regular.ttf b/dist/docs/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 000000000..1413fc609 Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.ttf differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.woff b/dist/docs/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 000000000..9e612858f Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.woff differ diff --git a/dist/docs/fonts/glyphicons-halflings-regular.woff2 b/dist/docs/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 000000000..64539b54c Binary files /dev/null and b/dist/docs/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/dist/docs/global.html b/dist/docs/global.html new file mode 100644 index 000000000..8d49c37f5 --- /dev/null +++ b/dist/docs/global.html @@ -0,0 +1,2408 @@ + + + + + + + Documentation Global + + + + + + + + + + + + + +
+
+ + +
+ +
+ + +

Global

+
+ +
+ +

+ +

+ + +
+ + +
+
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + + + + + + + + + +

Methods

+ +
+ +
+
+

connect(token [, options])

+ + +
+
+ + +
+

Connect to a Room. +

+ By default, this will automatically acquire an array containing a + LocalAudioTrack and LocalVideoTrack before connecting to + the Room. The LocalTracks will be stopped when you + disconnect from the Room. +

+ You can override the default behavior by specifying + options. For example, rather than acquiring LocalTracks + automatically, you can pass your own array which you can stop yourself. + See ConnectOptions for more information.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
token + + +string + + + + + + + + + + +

The Access Token string

options + + +ConnectOptions + + + + + + + <optional>
+ + + + + +

Options to override the default behavior

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
Throws:
+
    +
  • + +
    + + +RangeError + + + + +
    + +
  • + +
  • + +
    + + +TwilioError + + + + +
    + +
  • + +
  • + +
    + + +TypeError + + + + +
    + +
  • +
+ + +
Returns:
+ + + + +
+
+ Type +
+
+ +CancelablePromise.<Room> + + + +
+
+ + + + + +
Examples
+ +
var Video = require('twilio-video');
+var token = getAccessToken();
+Video.connect(token, {
+  name: 'my-cool-room'
+}).then(function(room) {
+  room.on('participantConnected', function(participant) {
+    console.log(participant.identity + ' has connected');
+  });
+  room.once('disconnected', function() {
+    console.log('You left the Room:', room.name);
+  });
+});
+ +
var Video = require('twilio-video');
+var token = getAccessToken();
+
+// Connect with audio-only
+Video.connect(token, {
+  name: 'my-cool-room',
+  audio: true
+}).then(function(room) {
+  room.on('participantConnected', function(participant) {
+    console.log(participant.identity + ' has connected');
+  });
+
+  room.once('disconnected', function() {
+    console.log('You left the Room:', room.name);
+  });
+});
+ +
var Video = require('twilio-video');
+var token = getAccessToken();
+
+// Connect with media acquired using getUserMedia()
+navigator.mediaDevices.getUserMedia({
+  audio: true,
+  video: true
+}).then(function(mediaStream) {
+  return Video.connect(token, {
+    name: 'my-cool-room',
+    tracks: mediaStream.getTracks()
+  });
+}).then(function(room) {
+  room.on('participantConnected', function(participant) {
+    console.log(participant.identity + ' has connected');
+  });
+
+  room.once('disconnected', function() {
+    console.log('You left the Room:', room.name);
+  });
+});
+ + + +
+ + + +
+
+

createLocalAudioTrack( [options])

+ + +
+
+ + +
+

Request a LocalAudioTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +CreateLocalTrackOptions + + + + + + + <optional>
+ + + + + +

Options for requesting a LocalAudioTrack

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<LocalAudioTrack> + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+// Connect to the Room with just video
+Video.connect('my-token', {
+  name: 'my-room-name',
+  video: true
+}).then(function(room) {
+  // Add audio after connecting to the Room
+  Video.createLocalAudioTrack().then(function(localTrack) {
+    room.localParticipant.addTrack(localTrack);
+  });
+});
+ + + +
+ + + +
+
+

createLocalTracks( [options])

+ + +
+
+ + +
+

Request LocalTracks. By default, it requests a +LocalAudioTrack and a LocalVideoTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +CreateLocalTracksOptions + + + + + + + <optional>
+ + + + + +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Array.<LocalTrack> + + + +
+
+ + + + + +
Examples
+ +
var Video = require('twilio-video');
+// Request audio and video tracks
+Video.createLocalTracks().then(function(localTracks) {
+  var localMediaContainer = document.getElementById('local-media-container-id');
+  localTracks.forEach(function(track) {
+    localMediaContainer.appendChild(track.attach());
+  });
+});
+ +
var Video = require('twilio-video');
+// Request just the default audio track
+Video.createLocalTracks({ audio: true }).then(function(localTracks) {
+  return Video.connect('my-token', {
+    name: 'my-room-name',
+    tracks: localTracks
+  });
+});
+ + + +
+ + + +
+
+

createLocalVideoTrack( [options])

+ + +
+
+ + +
+

Request a LocalVideoTrack.

+
+ + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDescription
options + + +CreateLocalTrackOptions + + + + + + + <optional>
+ + + + + +

Options for requesting a LocalVideoTrack

+ + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Promise.<LocalVideoTrack> + + + +
+
+ + + + + +
Example
+ +
var Video = require('twilio-video');
+
+// Connect to the Room with just audio
+Video.connect('my-token', {
+  name: 'my-room-name',
+  audio: true
+}).then(function(room) {
+  // Add video after connecting to the Room
+  Video.createLocalVideoTrack().then(function(localTrack) {
+    room.localParticipant.addTrack(localTrack);
+  });
+});
+ + + +
+ +
+ + + +

Type Definitions

+ +
+ +
+
+

AudioLevel

+ + +
+
+ +
+

The maximum absolute amplitude of a set of audio samples in the +range of 0 to 32767 inclusive.

+
+ + + +
Type:
+
    +
  • + +number + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

ConnectOptions

+ + +
+
+ +
+

You may pass these options to connect in order to override the +default behavior.

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
audio + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether or not to get local audio + with getUserMedia when tracks are not + provided.

iceServers + + +Array.<RTCIceServer> + + + + + + + + + + +

Override the STUN and TURN + servers used by the Client when connecting to Rooms

iceTransportPolicy + + +RTCIceTransportPolicy + + + + + + + <optional>
+ + + +
+ + "all" + +

Override the + ICE transport policy to be one of "relay" or "all"

name + + +string + + + + + + + <optional>
+ + + + <nullable>
+ +
+ + null + +

Set to connect to a Room by name

logLevel + + +LogLevel +| + +LogLevels + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Set the log verbosity + of logging to console. Passing a LogLevel string will use the same + level for all components. Pass a LogLevels to set specific log + levels.

tracks + + +Array.<(LocalTrack|MediaStreamTrack)> + + + + + + + <optional>
+ + + +
+ +

The + LocalTracks or MediaStreamTracks with which to join the + Room. These tracks can be obtained either by calling + createLocalTracks, or by constructing them from the MediaStream + obtained by calling getUserMedia().

video + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether or not to get local video + with getUserMedia when tracks are not + provided.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

CreateLocalTrackOptions

+ + +
+
+ +
+

Create LocalTrack options.

+
+ + + +
Type:
+
    +
  • + +MediaTrackConstraints + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
logLevel + + +LogLevel +| + +LogLevels + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

CreateLocalTracksOptions

+ + +
+
+ +
+

createLocalTracks options

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
audio + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether or not to get local audio + with getUserMedia when tracks are not + provided.

logLevel + + +LogLevel +| + +LogLevels + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Set the log verbosity + of logging to console. Passing a LogLevel string will use the same + level for all components. Pass a LogLevels to set specific log + levels.

video + + +boolean + + + + + + + <optional>
+ + + +
+ + true + +

Whether or not to get local video + with getUserMedia when tracks are not + provided.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

LocalTrackOptions

+ + +
+
+ +
+

LocalTrack options

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
logLevel + + +LogLevel +| + +LogLevels + + + + +

Log level for 'media' modules

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

LogLevel

+ + +
+
+ +
+

Levels for logging verbosity.

+
+ + + +
Type:
+
    +
  • + +String + + + +
  • +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+
+

LogLevels

+ + +
+
+ +
+

You may pass these levels to ConnectOptions to override + log levels for individual components.

+
+ + + +
Type:
+
    +
  • + +object + + + +
  • +
+ + + +
+ + +
Properties:
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeArgumentDefaultDescription
default + + +LogLevel + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Log level for 'default' modules.

media + + +LogLevel + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Log level for 'media' modules.

signaling + + +LogLevel + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Log level for 'signaling' modules.

webrtc + + +LogLevel + + + + + + + <optional>
+ + + +
+ + 'warn' + +

Log level for 'webrtc' modules.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + +
+ +
+ + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/img/glyphicons-halflings-white.png b/dist/docs/img/glyphicons-halflings-white.png new file mode 100644 index 000000000..3bf6484a2 Binary files /dev/null and b/dist/docs/img/glyphicons-halflings-white.png differ diff --git a/dist/docs/img/glyphicons-halflings.png b/dist/docs/img/glyphicons-halflings.png new file mode 100644 index 000000000..a99699932 Binary files /dev/null and b/dist/docs/img/glyphicons-halflings.png differ diff --git a/dist/docs/index.html b/dist/docs/index.html new file mode 100644 index 000000000..e28f30929 --- /dev/null +++ b/dist/docs/index.html @@ -0,0 +1,304 @@ + + + + + + + Documentation Index + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+

twilio-video.js

NPM Build Status

+

twilio-video.js allows you to add real-time voice and video to your web apps.

+ +

We want your feedback! Email +video-product@twilio.com with suggested +improvements, feature requests and general feedback, or feel free to open a +GitHub issue. If you need technical support, contact +help@twilio.com.

+

Installation

NPM

npm install twilio-video --save

Using this method, you can require twilio-video.js like so:

+
const Video = require('twilio-video');

Bower

bower install twilio-video --save

CDN

Releases of twilio-video.js are hosted on a CDN, and you can include these +directly in your web app using a <script> tag.

+
<script src="//media.twiliocdn.com/sdk/js/video/v1/twilio-video.min.js"></script>

Using this method, twilio-video.js will set a browser global:

+
const Video = Twilio.Video;

Usage

The following is a simple example showing a Client connecting to a Room. For +more information, refer to the +API Docs.

+
const Video = require('twilio-video');
+
+Video.connect('$TOKEN', { name: 'room-name' }).then(room => {
+  console.log('Connected to Room "%s"', room.name);
+
+  room.participants.forEach(participantConnected);
+  room.on('participantConnected', participantConnected);
+
+  room.on('participantDisconnected', participantDisconnected);
+  room.once('disconnected', error => room.participants.forEach(participantDisconnected));
+});
+
+function participantConnected(participant) {
+  console.log('Participant "%s" connected', participant.identity);
+
+  const div = document.createElement('div');
+  div.id = participant.sid;
+  div.innerText = participant.identity;
+
+  participant.on('trackAdded', track => trackAdded(div, track));
+  participant.tracks.forEach(track => trackAdded(div, track));
+  participant.on('trackRemoved', trackRemoved);
+
+  document.body.appendChild(div);
+}
+
+function participantDisconnected(participant) {
+  console.log('Participant "%s" disconnected', participant.identity);
+
+  participant.tracks.forEach(trackRemoved);
+  document.getElementById(participant.sid).remove();
+}
+
+function trackAdded(div, track) {
+  div.appendChild(track.attach());
+}
+
+function trackRemoved(track) {
+  track.detach().forEach(element => element.remove());
+}

Changelog

See CHANGELOG.md.

+

License

See LICENSE.md.

+

Building

Fork and clone the repository. Then, install dependencies with

+
npm install

Then run the build script:

+
npm run build

The builds and docs will be placed in the dist/ directory.

+

Contributing

Bug fixes welcome! If you're not familiar with the GitHub pull +request/contribution process, +this is a nice tutorial.

+
+ + + + + + + +
+
+ +
+ + +
+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/docs/quicksearch.html b/dist/docs/quicksearch.html new file mode 100644 index 000000000..6149443de --- /dev/null +++ b/dist/docs/quicksearch.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/dist/docs/scripts/docstrap.lib.js b/dist/docs/scripts/docstrap.lib.js new file mode 100644 index 000000000..09d9272a0 --- /dev/null +++ b/dist/docs/scripts/docstrap.lib.js @@ -0,0 +1,11 @@ +if(!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"!==c&&!_.isWindow(a)&&(!(1!==a.nodeType||!b)||("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a))}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c)}catch(a){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("