The callback function to invoke
true if the callback was set successfully
rtms.onAudioData((buffer, size, timestamp, metadata) => {
console.log(`Received ${size} bytes of audio from ${metadata.userName}`);
// Process the audio data
// buffer - Raw audio data (Buffer)
// size - Size of the audio data in bytes
// timestamp - Timestamp of the audio data
// metadata - Information about the sender
});
Sets a callback for receiving audio data on the global client
This function is part of the singleton API. The callback is triggered when audio data is received from the meeting.