Our new developer documentation is now available. Please check it out!
OdinAudioDataReceivedEventPayload
On this page
export interface OdinAudioDataReceivedEventPayload
The payload for the AudioDataReceived event.
Properties
Name | Type | Description |
---|---|---|
mediaId | number | The ID of the media that sent the audio data. |
peerId | number | The ID of the peer that sent the audio data. |
samples16 | Uint8Array | The audio data received from the peer as 16-bit PCM samples ranging from -32768 to 32767 as a byte array. Use const samplesArray = new Int16Array(samples16.buffer) to get an actual array |
samples32 | Uint8Array | The audio data received from the peer as 32-bit PCM samples ranging from -1 to 1. Use const floats = new Float32Array(samples32.buffer) to get an actual array |