Members
-
<constant> AudioCodec :string
-
Names of the supported audio codecs.
Type:
- string
Properties:
Name Type Default Description isacstring isac opusstring opus PCMAstring PCMA PCMUstring PCMU -
<constant> LogLevel :string
-
Levels for logging verbosity.
Type:
- string
Properties:
Name Type Default Description debugstring debug infostring info warnstring warn errorstring error offstring off -
<constant> NetworkQualityVerbosity :number
-
The verbosity level of network quality information of a Participant.
Type:
- number
Properties:
Name Type Default Description nonenumber 0 Nothing is reported for the Participant. This has no effect and defaults to NetworkQualityVerbosity#minimal for the LocalParticipant.
minimalnumber 1 Reports NetworkQualityLevel for the Participant.
moderatenumber 2 Reports NetworkQualityLevel and NetworkQualityStats for the Participant. NetworkQualityStats is populated with audio and video NetworkQualityLevels based on which the Participant's NetworkQualityLevel is calculated.
detailednumber 3 Reports NetworkQualityLevel and NetworkQualityStats for the Participant. NetworkQualityStats is populated with audio and video NetworkQualityLevels and their corresponding NetworkQualityMediaStats based on which the Participant's NetworkQualityLevel is calculated.
-
<constant> VideoCodec :string
-
Names of the supported video codecs.
Type:
- string
Properties:
Name Type Default Description H264string H264 VP8string VP8 VP9string VP9
Type Definitions
-
AudioLevel
-
The maximum absolute amplitude of a set of audio samples in the range of 0 to 32767 inclusive.
Type:
- number
-
AudioTrackPublication
-
Type:
-
ConnectOptions
-
You may pass these options to connect in order to override the default behavior.
Type:
- object
Properties:
Name Type Argument Default Description abortOnIceServersTimeoutboolean <optional>
false If fetching ICE servers times out (for example, due to a restrictive network or slow HTTP proxy), then, by default, twilio-video.js will fallback to using hard-coded STUN servers and continue connecting to the Room. Setting this property to
truewill cause twilio-video.js to abort instead, and connect will reject with a ConfigurationAcquireFailedError.audioboolean | CreateLocalTrackOptions <optional>
true Whether or not to get local audio with
getUserMediawhentracksare not provided.dominantSpeakerboolean <optional>
false Whether to enable the Dominant Speaker API or not. This only takes effect in Group Rooms.
dscpTaggingboolean <optional>
false DSCP tagging allows you to request enhanced QoS treatment for RTP media packets from any firewall that the client may be behind. Setting this option to
truewill request DSCP tagging for media packets on supported browsers (only Chrome supports this as of now). Audio packets will be sent with DSCP header value set to 0xb8 which corresponds to Expedited Forwarding (EF). Video packets will be sent with DSCP header value set to 0x88 which corresponds to Assured Forwarding (AF41).iceServersArray.<RTCIceServer> Override the STUN and TURN servers used when connecting to Rooms
iceServersTimeoutnumber <optional>
3000 Override the amount of time, in milliseconds, that the SDK will wait when acquiring STUN and TURN servers
iceTransportPolicyRTCIceTransportPolicy <optional>
"all" Override the ICE transport policy to be one of "relay" or "all"
insightsboolean <optional>
true Whether publishing events to the Insights gateway is enabled or not
maxAudioBitratenumber <optional>
<nullable>
null Max outgoing audio bitrate (bps); A
nullor a0value does not set any bitrate limit; This value is set as a hint for variable bitrate codecs, but will not take effect for fixed bitrate codecs; Based on our tests, Chrome, Firefox and Safari support a bitrate range of 12000 bps to 256000 bps for Opus codec; This parameter has no effect on iSAC, PCMU and PCMA codecsmaxVideoBitratenumber <optional>
<nullable>
null Max outgoing video bitrate (bps); A
nullor0value does not set any bitrate limit; This value is set as a hint for variable bitrate codecs, but will not take effect for fixed bitrate codecs; Based on our tests, Chrome, Firefox and Safari all seem to support an average bitrate range of 20000 bps (20 kbps) to 8000000 bps (8 mbps) for a 720p VideoTracknamestring <optional>
<nullable>
null Set to connect to a Room by name
networkQualityboolean | NetworkQualityConfiguration <optional>
false Whether to enable the Network Quality API or not. This only takes effect in Group Rooms. Pass a NetworkQualityConfiguration to configure verbosity levels for network quality information for LocalParticipant and RemoteParticipants. A
truevalue will set the NetworkQualityVerbosity for the LocalParticipant to NetworkQualityVerbosity#minimaland the NetworkQualityVerbosity for RemoteParticipants to NetworkQualityVerbosity#none.preferredAudioCodecsArray.<AudioCodec> <optional>
[] Preferred audio codecs; An empty array preserves the current audio codec preference order.
preferredVideoCodecsArray.<(VideoCodec|VideoCodecSettings)> <optional>
[] Preferred video codecs; An empty array preserves the current video codec preference order. If you want to set a preferred video codec on a Group Room, you will need to create the Room using the REST API and set the
VideoCodecsproperty. See here for more information.logLevelLogLevel | 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.
tracksArray.<(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().videoboolean | CreateLocalTrackOptions <optional>
true Whether or not to get local video with
getUserMediawhentracksare not provided. -
CreateLocalTrackOptions
-
Create LocalTrack options.
Type:
- MediaTrackConstraints
Properties:
Name Type Argument Default Description logLevelLogLevel | LogLevels namestring <optional>
The LocalTrack's name; by default, it is set to the LocalTrack's ID.
workaroundWebKitBug180748boolean <optional>
false Only valid for LocalAudioTracks; setting this attempts to workaround WebKit Bug 180748, where, in Safari, getUserMedia may return a silent audio MediaStreamTrack.
-
CreateLocalTracksOptions
-
Create LocalTrack options. Apart from the properties listed here, you can also specify any of the MediaTrackConstraints properties.
Type:
- object
Properties:
Name Type Argument Default Description audioboolean | CreateLocalTrackOptions <optional>
true Whether or not to get local audio with
getUserMediawhentracksare not provided.logLevelLogLevel | 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.
videoboolean | CreateLocalTrackOptions <optional>
true Whether or not to get local video with
getUserMediawhentracksare not provided. -
DataTrack
-
A DataTrack is a LocalDataTrack or RemoteDataTrack.
Type:
- LocalDataTrack | RemoteDataTrack
-
DataTrackPublication
-
Type:
-
EncodingParameters
-
Outgoing media encoding parameters.
Type:
- object
Properties:
Name Type Argument Description maxAudioBitratenumber <optional>
<nullable>
Max outgoing audio bitrate (bps); If not specified, retains the existing bitrate limit; A
nullor a0value removes any previously set bitrate limit; This value is set as a hint for variable bitrate codecs, but will not take effect for fixed bitrate codecs; Based on our tests, Chrome, Firefox and Safari support a bitrate range of 12000 bps to 256000 bps for Opus codec; This parameter has no effect on iSAC, PCMU and PCMA codecsmaxVideoBitratenumber <optional>
<nullable>
Max outgoing video bitrate (bps); If not specified, retains the existing bitrate limit; A
nullor a0value removes any previously set bitrate limit; This value is set as a hint for variable bitrate codecs, but will not take effect for fixed bitrate codecs; Based on our tests, Chrome, Firefox and Safari all seem to support an average bitrate range of 20000 bps (20 kbps) to 8000000 bps (8 mbps) for a 720p VideoTrack -
LocalDataTrackOptions
-
LocalDataTrack options
Type:
Properties:
Name Type Argument Default Description maxPacketLifeTimenumber <optional>
<nullable>
null Set this to limit the time (in milliseconds) during which the LocalDataTrack will send or re-send data if not successfully delivered on the underlying RTCDataChannel(s). It is an error to specify both this and
maxRetransmits.maxRetransmitsnumber <optional>
<nullable>
null Set this to limit the number of times the LocalDataTrack will send or re-send data if not acknowledged on the underlying RTCDataChannel(s). It is an error to specify both this and
maxPacketLifeTime.orderedboolean <optional>
true Set this to false to allow data on the LocalDataTrack to be sent out-of-order.
-
LocalTrack
-
A LocalTrack is a LocalAudioTrack, LocalVideoTrack, or LocalDataTrack.
Type:
- LocalAudioTrack | LocalVideoTrack | LocalDataTrack
-
LocalTrackOptions
-
LocalTrack options
Type:
- object
Properties:
Name Type Argument Description logLevelLogLevel | LogLevels Log level for 'media' modules
namestring <optional>
The LocalTrack's name; by default, it is set to the LocalTrack's ID.
-
LogLevels
-
You may pass these levels to ConnectOptions to override log levels for individual components.
Type:
- object
Properties:
Name Type Argument Default Description defaultLogLevel <optional>
'warn' Log level for 'default' modules.
mediaLogLevel <optional>
'warn' Log level for 'media' modules.
signalingLogLevel <optional>
'warn' Log level for 'signaling' modules.
webrtcLogLevel <optional>
'warn' Log level for 'webrtc' modules.
-
NetworkQualityConfiguration
-
Configure verbosity levels for network quality information for LocalParticipant and RemoteParticipants.
Type:
- object
Properties:
Name Type Argument Default Description localNetworkQualityVerbosity <optional>
1 Verbosity level for LocalParticipant
remoteNetworkQualityVerbosity <optional>
0 Verbosity level for RemoteParticipants
-
NetworkQualityLevel
-
NetworkQualityLevel is a value from 0–5, inclusive, representing the quality of a network connection.
Type:
- number
-
RemoteTrack
-
A RemoteTrack is a RemoteAudioTrack, RemoteVideoTrack, or RemoteDataTrack.
Type:
-
RemoteTrackPublicationOptions
-
RemoteTrackPublication options
Type:
- object
-
TrackPublicationOptions
-
TrackPublication options
Type:
- object
-
VideoCodecSettings
-
Video codec settings.
Type:
- object
Properties:
Name Type Description codecVideoCodec Video codec name
-
VideoTrackPublication
-
Type:
-
VP8CodecSettings
-
VP8 codec settings.
Type:
Properties:
Name Type Argument Default Description nameVideoCodec "VP8"
simulcastboolean <optional>
false Enable/disable VP8 simulcast; if enabled, Twilio's Video SDK will send three video streams of different qualities