Video SDK Type and Version: Zoom web SDK v1.12.5
Description
In a react app, trying to start audio on iOS devices (iPhone and iPad) waiting for the media-sdk-change event to notify audio encode and decode ready but this never happen so the audio is not started. If I try to start the audio (calling stream.startAudio method) it fails with: Computer audio has been loading, please wait
The event media-sdk-change is raised 3 times (2 for video and 1 for share) but never for audio.
Tested on Safari v17.6.1 and Chrome v129
This logic is based on the startAudio documentation for Safari:
let audioDecode, audioEncode;
// wait until the encoding and decoding process is ready for the audio
client.on("media-sdk-change", (payload) => {
const { action, type, result } = payload;
if (type === "audio" && result === "success") {
if (action === "encode") {
audioEncode = true;
} else if (action === "decode") {
audioDecode = true;
}
if (audioDecode && audioEncode) {
try {
// start audio automatically in Safari
stream.startAudio({ autoStartAudioInSafari: true });
} catch (err) {
console.warn(err);
}
}
}
});