Skip to main content

Class: AudioInput

Enhanced EventTarget, support with Odin Event Generics.

Extends

Constructors

new AudioInput()

new AudioInput(device, _settings, _capture): AudioInput

Parameters

device: Device

_settings: InputSettings

_capture: AudioCapture

Returns

AudioInput

Overrides

OdinEventTarget.constructor

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:18

Properties

device

device: Device

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:11


kind

readonly kind: "audio-input" = "audio-input"

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:15


onAudioActivity()?

optional onAudioActivity: (payload) => void

Parameters

payload: AudioActivityPayload

Returns

void

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:16


onPowerLevel()?

optional onPowerLevel: (payload) => void

Parameters

payload: AudioActivityPayload

Returns

void

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:17

Accessors

active

get active(): boolean

Returns

boolean

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:22


capture

get capture(): AudioCapture

Returns

AudioCapture

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:19


rmsDBFS

get rmsDBFS(): number

Returns

number

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:24


volume

get volume(): Volume

Returns

Volume

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:20

Methods

addEventListener()

addEventListener<OdinEventType>(eventName, handler, options?): void

Type Parameters

OdinEventType extends keyof MediaEventHandlers

Parameters

eventName: OdinEventType

handler: MediaEventHandlers[OdinEventType]

options?: boolean | AddEventListenerOptions

Returns

void

Inherited from

OdinEventTarget.addEventListener

Defined in

Odin/odin-typescript/lib/utils/odin-event-target.d.ts:22


dispatchActivity()

dispatchActivity(peer): void

Parameters

peer: Peer

Returns

void

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:26


dispatchEvent()

dispatchEvent<T>(event): void

Type Parameters

T extends OdinEvent<any>

Parameters

event: T

Returns

void

Inherited from

OdinEventTarget.dispatchEvent

Defined in

Odin/odin-typescript/lib/utils/odin-event-target.d.ts:23


dispatchPowerLvl()

dispatchPowerLvl(peer): void

Parameters

peer: Peer

Returns

void

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:27


removeEventListener()

removeEventListener<OdinEventType>(type, callback): void

Type Parameters

OdinEventType extends keyof MediaEventHandlers

Parameters

type: string | OdinEventType

callback: EventListenerOrEventListenerObject | MediaEventHandlers[OdinEventType]

Returns

void

Inherited from

OdinEventTarget.removeEventListener

Defined in

Odin/odin-typescript/lib/utils/odin-event-target.d.ts:24


setDevice()

setDevice(device): Promise<void>

Parameters

device: DeviceParameters

Returns

Promise<void>

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:23


setInputSettings()

setInputSettings(settings): Promise<void>

Parameters

settings: InputSettings

Returns

Promise<void>

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:25


setVolume()

setVolume(value): Promise<void>

Parameters

value: Volume

Returns

Promise<void>

Defined in

Odin/odin-typescript/lib/api/media/audio-input.d.ts:21