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

**URL:** <https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444>\
**Category:** Video SDK\
**Created:** [September 13, 2024, 6:19pm UTC](https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444 "2024-09-13T18:19:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fidel](https://avatars.discourse-cdn.com/v4/letter/f/a8b319/32.png) [@fidel](https://devforum.zoom.us/u/fidel)\
**Post date:** [September 13, 2024, 6:19pm UTC](https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444/1 "2024-09-13T18:19:31Z")

</div>

**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:

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

```

---

<div class="post-metadata">

**Author:** ![vic.yang](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/vic.yang/32/24656_2.png) [@vic.yang](https://devforum.zoom.us/u/vic.yang)\
**Post date:** [September 14, 2024, 6:04am UTC](https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444/2 "2024-09-14T06:04:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fidel](https://avatars.discourse-cdn.com/v4/letter/f/a8b319/32.png) [@fidel](https://devforum.zoom.us/u/fidel)\
**Post date:** [September 17, 2024, 2:54pm UTC](https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444/3 "2024-09-17T14:54:24Z")

</div>

Thanks Vic.

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

---

<div class="post-metadata">

**Author:** ![kellyjandrews](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kellyjandrews/32/51599_2.png) [@kellyjandrews](https://devforum.zoom.us/u/kellyjandrews)\
**Post date:** [September 18, 2024, 4:33pm UTC](https://devforum.zoom.us/t/media-sdk-change-event-never-raised-with-audio-encode-decode-values-on-ios/117444/4 "2024-09-18T16:33:18Z")

</div>

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