Emitted when the available set of Devices changes.
An array containing any Devices that were previously active that were lost as a result of this deviceChange event.
Emitted on requestAnimationFrame
(up to 60fps, depending on browser) with
the current input and output volumes, as a percentage of maximum
volume, between -100dB and -30dB. Represented by a floating point
number.
A floating point number between 0.0 and 1.0 inclusive.
A Map of all audio input devices currently available to the browser by their device ID.
A Map of all audio output devices currently available to the browser by their device ID.
False if the browser does not support HTMLAudioElement.setSinkId()
or
MediaDevices.enumerateDevices()
and Twilio cannot facilitate output selection functionality.
False if the browser does not support AudioContext and Twilio can not analyse the volume in real-time.
The current set of output devices that incoming ringtone audio is routed through. These are the sounds that may play while the user is away from the machine or not wearing their headset. It is important that this audio is heard. If all specified devices lost, this Set will revert to contain only the "default" device.
The current set of output devices that call audio ([voice, outgoing, disconnect, dtmf]
)
is routed through. These are the sounds that are initiated by the user, or played while
the user is otherwise present at the endpoint. If all specified devices are lost,
this Set will revert to contain only the "default" device.
The currently set audio constraints set by setAudioConstraints(). Starts as null.
The active input device. Having no inputDevice specified by setInputDevice()
will disable input selection related functionality.
The current input stream.
Start polling volume if it's supported and there's an input stream to poll.
Stop polling volume if it's currently polling and there are no listeners.
Unbind the listeners from mediaDevices.
Update the available input and output devices
Set the MediaTrackConstraints to be applied on every getUserMedia call for new input device audio. Any deviceId specified here will be ignored. Instead, device IDs should be specified using {@link AudioHelper#setInputDevice}. The returned Promise resolves when the media is successfully reacquired, or immediately if no input device is set.
The MediaTrackConstraints to apply.
Replace the current input device with a new device by ID.
An ID of a device to replace the existing input device with.
Unset the MediaTrackConstraints to be applied on every getUserMedia call for new input device audio. The returned Promise resolves when the media is successfully reacquired, or immediately if no input device is set.
Unset the input device, stopping the tracks. This should only be called when not in a connection, and will not allow removal of the input device during a live call.
Generated using TypeDoc
Provides input and output audio-based functionality in one convenient class.