Options
Menu

Interface IExtendedDeviceOptions

Options that may be passed to the Device constructor for internal testing.

Hierarchy

Indexable

[key: string]: any

Options that may be passed to the Device constructor for internal testing.

Index

Properties

Optional AudioHelper

AudioHelper: any

Custom AudioHelper constructor

Optional Publisher

Publisher: IPublisher

Custom Publisher constructor

Optional RTCPeerConnection

RTCPeerConnection: any

Overrides the native RTCPeerConnection class.

Optional allowIncomingWhileBusy

allowIncomingWhileBusy: undefined | false | true

Whether the Device should raise the incomingEvent event when a new call invite is received while already on an active call. Default behavior is false.

Optional appName

appName: undefined | string

A name for the application that is instantiating the Device. This is used to improve logging in Insights by associating Insights data with a specific application, particularly in the case where one account may be connected to by multiple applications.

Optional appVersion

appVersion: undefined | string

A version for the application that is instantiating the Device. This is used to improve logging in Insights by associating Insights data with a specific version of the given application. This can help track down when application-level bugs were introduced.

Optional audioConstraints

audioConstraints: MediaTrackConstraints | boolean

Audio Constraints to pass to getUserMedia when making or accepting a Call. This is placed directly under audio of the MediaStreamConstraints object.

Optional chunderw

chunderw: undefined | string

Hostname of the signaling gateway to connect to.

Optional closeProtection

closeProtection: boolean | string

Whether to enable close protection, to prevent users from accidentally navigating away from the page during a call. If string, the value will be used as a custom message.

Optional codecPreferences

codecPreferences: Codec[]

An ordered array of codec names, from most to least preferred.

Optional connectionFactory

connectionFactory: Connection

Custom Connection constructor

Optional debug

debug: undefined | false | true

Whether to enable debug logging.

Optional disableAudioContextSounds

disableAudioContextSounds: undefined | false | true

Whether AudioContext sounds should be disabled. Useful for trouble shooting sound issues that may be caused by AudioContext-specific sounds. If set to true, will fall back to HTMLAudioElement sounds.

Optional dscp

dscp: undefined | false | true

Whether to use googDscp in RTC constraints.

Optional edge

edge: string[] | string

The edge value corresponds to the geographic location that the client will use to connect to Twilio infrastructure. The default value is "roaming" which automatically selects an edge based on the latency of the client relative to available edges. You may not specify both edge and region in the Device options. Specifying both edge and region will result in an InvalidArgumentException.

Optional enableIceRestart

enableIceRestart: undefined | false | true

Whether to automatically restart ICE when media connection fails

Optional enableRingingState

enableRingingState: undefined | false | true

Whether the ringing state should be enabled on Connection objects. This is required to enable answerOnBridge functionality.

Optional enumerateDevices

enumerateDevices: any

Overrides the native MediaDevices.enumerateDevices API.

Optional eventgw

eventgw: undefined | string

Hostname of the event gateway to connect to.

Optional fakeLocalDTMF

fakeLocalDTMF: undefined | false | true

Whether or not to override the local DTMF sounds with fake dialtones. This won't affect the DTMF tone sent over the connection, but will prevent double-send issues caused by using real DTMF tones for user interface. In 2.0, this will be enabled by default.

Optional fileInputStream

fileInputStream: MediaStream

File input stream to use instead of reading from mic

Optional forceAggressiveIceNomination

forceAggressiveIceNomination: undefined | false | true

Experimental feature. Whether to use ICE Aggressive nomination.

Optional getUserMedia

getUserMedia: any

Overrides the native MediaDevices.getUserMedia API.

Optional iceServers

iceServers: Object[]

A list of specific ICE servers to use. Overridden by Device.Options.rtcConfiguration.

deprecated

Optional ignoreBrowserSupport

ignoreBrowserSupport: undefined | false | true

Ignore browser support, disabling the exception that is thrown when neither WebRTC nor ORTC are supported.

Optional maxAverageBitrate

maxAverageBitrate: undefined | number

The maximum average audio bitrate to use, in bits per second (bps) based on RFC-7587 7.1. By default, the setting is not used. If you specify 0, then the setting is not used. Any positive integer is allowed, but values outside the range 6000 to 510000 are ignored and treated as 0. The recommended bitrate for speech is between 8000 and 40000 bps as noted in RFC-7587 3.1.1.

Optional noRegister

noRegister: undefined | false | true

Whether to disable audio flag in MediaPresence (rrowland: Do we need this?)

Optional pStreamFactory

pStreamFactory: IPStream

Custom PStream constructor

Optional preflight

preflight: undefined | false | true

Whether this is a preflight call or not

Optional publishEvents

publishEvents: undefined | false | true

Whether Insights events should be published

Optional region

region: undefined | string

The region code of the region to connect to.

deprecated

CLIENT-7519 This parameter is deprecated in favor of the edge parameter. You may not specify both edge and region in the Device options.

This parameter will be removed in the next major version release.

The following table lists the new edge names to region name mappings. Instead of passing the region value in options.region, please pass the following edge value in options.edge.

Region Value Edge Value
au1 sydney
br1 sao-paulo
ie1 dublin
de1 frankfurt
jp1 tokyo
sg1 singapore
us1 ashburn
us2 umatilla
gll roaming
us1-ix ashburn-ix
us2-ix san-jose-ix
ie1-ix london-ix
de1-ix frankfurt-ix
sg1-ix singapore-ix

Optional rtcConfiguration

rtcConfiguration: RTCConfiguration

An RTCConfiguration to pass to the RTCPeerConnection constructor.

Optional rtcConstraints

rtcConstraints: Object

RTC Constraints to pass to getUserMedia when making or accepting a Call. The format of this object depends on browser.

Optional soundFactory

soundFactory: ISound

Custom Sound constructor

Optional sounds

sounds: Partial<Record<SoundName, string>>

A mapping of custom sound URLs by sound name.

Optional warnings

warnings: undefined | false | true

Whether to enable warn logging.

Generated using TypeDoc