Class: AudioInput
A generic event target class designed for strongly-typed event handling. OdinEventTarget extends the functionality of the standard EventTarget to allow interactions with predefined event types and handlers.
Extends
Constructors
new AudioInput()
new AudioInput(
settings,capture):AudioInput
Parameters
• settings: InputSettings
• capture: AudioCapture
Returns
Overrides
Defined in
ari/lib/api/media/audio-input.d.ts:25
Properties
kind
readonlykind:"audio-input"="audio-input"
Defined in
ari/lib/api/media/audio-input.d.ts:10
onAudioActivity()?
optionalonAudioActivity: (payload) =>void
A callback function invoked when audio activity occurs and voice activity detection (VAD) was set to true.
Parameters
• payload: AudioActivityPayload
An object containing the AudioMedia.
Returns
void
Defined in
ari/lib/api/media/audio-input.d.ts:16
onPowerLevel()?
optionalonPowerLevel: (payload) =>void
A callback function invoked when there is an update to the audio power level in rmsDBFS. This function can be used to handle or process audio activity, such as monitoring sound levels or visualizing audio input.
Parameters
• payload: AudioActivityPayload
An object containing the AudioMedia.
Returns
void
Defined in
ari/lib/api/media/audio-input.d.ts:24
Accessors
capture
getcapture():AudioCapture
The AudioCapture that is provided by the underling plugin.
Returns
The AudioCapture of the underling plugin.
Defined in
ari/lib/api/media/audio-input.d.ts:31
customType
getcustomType():string
Retrieves the customType that was set when the AudioInput was created. Remote peers can use this to identify the purpose of the stream.
Returns
string
Defined in
ari/lib/api/media/audio-input.d.ts:43
isActive
getisActive():boolean
Whether the AudioInput is currently active or not. Only works when voice activity detection was enabled.
Returns
boolean
True if the instance is active, false otherwise.
Defined in
ari/lib/api/media/audio-input.d.ts:59
powerLevel
getpowerLevel():number
Retrieves the Root Mean Square (RMS) in decibels relative to full scale (dBFS) for the captured audio activity. This is a measure of the average power level of the audio signal.
Returns
number
The RMS value expressed in dBFS.
Defined in
ari/lib/api/media/audio-input.d.ts:74
volume
getvolume():InputVolume
Retrieves the current volume. Is the Volume 'muted', the associated Device was stopped.
Returns
The current volume level.
Defined in
ari/lib/api/media/audio-input.d.ts:38