Media-sdk-change event never raised with audio (encode/decode) values on iOS

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);
       }
     }
   }
 });

Hey @fidel

Thanks for your feedback.

It’s unnecessary to listen to the media-sdk-change event on the mobile platform. I apologize for the misleading information in the documentation.

Computer audio has been loading, please wait

This error occurs because the previous startAudio has not yet been resolved or rejected.

Thanks
Vic

Thanks Vic.

This is definitely something that should be added to the documentation.

1 Like

Passing this along to our docs team - thanks for the feedback!

1 Like