Class: AudioOutput
Enhanced EventTarget, support with Odin Event Generics.
Extends
Constructors
new AudioOutput()
new AudioOutput(
playback
,_mediaData
,peer
,room
):AudioOutput
Parameters
• playback: AudioPlayback
• _mediaData
• _mediaData.id: number
• _mediaData.paused: boolean
• _mediaData.properties: object
| object
• peer: Peer
• room: Room
Returns
Overrides
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:18
Properties
kind
readonly
kind:"audio-output"
="audio-output"
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:12
onAudioActivity()?
optional
onAudioActivity: (payload
) =>void
Parameters
• payload: AudioActivityPayload
Returns
void
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:16
onPowerLevel()?
optional
onPowerLevel: (payload
) =>void
Parameters
• payload: AudioActivityPayload
Returns
void
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:17
peer
readonly
peer:Peer
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:10
playback
readonly
playback:AudioPlayback
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:8
room
readonly
room:Room
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:11
Accessors
active
get
active():boolean
Returns
boolean
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:21
activity
get
activity():Activity
Indicates whether the media is currently sending/receiving data.
Returns
Activity
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:26
customType
get
customType():string
Returns
string
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:22
mediaId
get
mediaId():number
Returns
number
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:20
paused
get
paused():boolean
Returns
boolean
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:41
rmsDBFS
get
rmsDBFS():number
Returns
number
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:42
uid
get
uid():string
Returns
string
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:19
volume
get
volume():Volume
Gets the latest volume that was applied.
Returns
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:30
volumeAggregated
get
volumeAggregated():number
Gets the aggregated volume (room * peer * audioOutput) that is currently active.
Returns
number
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:34
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():
void
Returns
void
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:45
dispatchEvent()
dispatchEvent<
T
>(event
):void
Type Parameters
• T extends OdinEvent
<any
>
Parameters
• event: T
Returns
void
Inherited from
Defined in
Odin/odin-typescript/lib/utils/odin-event-target.d.ts:23
dispatchPowerLvl()
dispatchPowerLvl():
void
Returns
void
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:46
pause()
pause():
Promise
<void
>
Returns
Promise
<void
>
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:43
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
resume()
resume():
Promise
<void
>
Returns
Promise
<void
>
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:44
setVolume()
setVolume(
value
?):Promise
<void
>
If no value was given, the Volume of the peer or the room changed but not the value of the Media itself.
Parameters
• value?: Volume
Returns
Promise
<void
>
Defined in
Odin/odin-typescript/lib/api/media/audio-output.d.ts:40