Developer Documentation

OdinAudioDataReceivedEventPayload

export interface OdinAudioDataReceivedEventPayload

The payload for the AudioDataReceived event.

Properties

NameTypeDescription
mediaIdnumberThe ID of the media that sent the audio data.
peerIdnumberThe ID of the peer that sent the audio data.
samples16Uint8ArrayThe 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
samples32Uint8ArrayThe 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