# Issue with audio on Safari

**URL:** <https://devforum.zoom.us/t/issue-with-audio-on-safari/102370>\
**Category:** Web\
**Created:** [January 23, 2024, 4:58pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370 "2024-01-23T16:58:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit\_zoom](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rohit\_zoom](https://devforum.zoom.us/u/rohit_zoom)\
**Post date:** [January 23, 2024, 4:58pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/1 "2024-01-23T16:58:58Z")

</div>

Two issue i noticed with audio on Safari.

**Safari Desktop Mac:**  
startAudio is throwing exception on safari not regularly but 4/10 times. startAudio operation is performed when both encode and decode are returned with success in mediasdkchange event.  
await this.zoomMediaStream.startAudio({ autoStartAudioInSafari: true });  
It throws OPERATION\_TIMEOUT.

To me it looks like OEPRATION\_TIMEOUT happens due to websocket connection i think not sure. But this only happens on safari.

**Safari IPHONE:**  
muteUserAudioLocally does not work on iphone safari it works on iphone chrome correctly.  
await this.zoomMediaStream.muteUserAudioLocally(userId);

It does not throw any exception.  
Even when i periodically check local volume status using **getUserVolumeLocally(userId)** for that user it correctly shows 0 volume. But voice can still be heard. No effect of **muteUserAudioLocally** this only happens on safari iphone.

Also on safari preloadDependentAssets does not work properly, it always try to fetch from two sites one some cloudfront site for which it throws 403 error everytime, and another provided url from which it gets assets successfully.  
both preloadDependentAssets and zoomClient.init has same dependent assets url.

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 23, 2024, 6:30pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/2 "2024-01-23T18:30:41Z")

</div>

@rohit_zoom ,

Thank you for posting in the Zoom Developer Forum. To begin, can you please share the following details :

Description

Which Video SDK Platform?

Which Video SDK version?

Exact Steps To reproduce

Device Crash logs

---

<div class="post-metadata">

**Author:** ![rohit\_zoom](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rohit\_zoom](https://devforum.zoom.us/u/rohit_zoom)\
**Post date:** [January 23, 2024, 7:44pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/3 "2024-01-23T19:44:35Z")

</div>

Hi @donte.zoom,

Using Zoom video SDK web 1.9.0

There were no crashes for muteUserAudioLocally as mentioned above. Even getUserVolumeLocally was returning volume 0 for that userid. muteUserAudioLocally function returned success. This issue was only occurring on ios safari. It happens all the time.

For desktop safari macbook pro no matter the version, OPERATION\_TIMEOUT occures for only audio, video was working ok. This was only on safari. Steps was when startAudio was called on after audio encode and decode were return with success, exception was thrown with OPERATION\_TIMEOUT. But if i mute and unmute the user audio starts working. This does not happen all the time. It occurs randomly.

[https://d1cdksi819e9z7.cloudfront.net/sourcemap/js\_media.min.js-cfed67d893df2692a654.map](https://d1cdksi819e9z7.cloudfront.net/sourcemap/js_media.min.js-cfed67d893df2692a654.map)  
Failed to load resource: the server responded with a status of 403 ()

[https://d1cdksi819e9z7.cloudfront.net/sourcemap/audio\_simd.min.js-129cc1e2e7f2ba4021da.map](https://d1cdksi819e9z7.cloudfront.net/sourcemap/audio_simd.min.js-129cc1e2e7f2ba4021da.map)  
Failed to load resource: the server responded with a status of 403 ()

[https://d1cdksi819e9z7.cloudfront.net/sourcemap/sharing\_simd.min.js-129cc1e2e7f2ba4021da.map](https://d1cdksi819e9z7.cloudfront.net/sourcemap/sharing_simd.min.js-129cc1e2e7f2ba4021da.map)  
Failed to load resource: the server responded with a status of 403 ()

[https://d1cdksi819e9z7.cloudfront.net/sourcemap/video\_simd.min.js-129cc1e2e7f2ba4021da.map](https://d1cdksi819e9z7.cloudfront.net/sourcemap/video_simd.min.js-129cc1e2e7f2ba4021da.map)  
Failed to load resource: the server responded with a status of 403 ()

This i am getting for dependent assets but in network logs i can see they were loaded with predefined custom assets url using preloadDependentAssets. Why is it trying to get those when preloadedAssets is called with a url. Only occurs in safari.

---

<div class="post-metadata">

**Author:** ![rohit\_zoom](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@rohit\_zoom](https://devforum.zoom.us/u/rohit_zoom)\
**Post date:** [January 23, 2024, 7:46pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/4 "2024-01-23T19:46:31Z")

</div>

Also on IOS with every IOS version and both chrome and safari browser , when tab is inactive and audio is played on other apps. Returning to tab requires audio restart. Is there any better way of handling this.

---

<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:** [January 24, 2024, 2:53am UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/5 "2024-01-24T02:53:26Z")

</div>

Hey @rohit_zoom

Thanks for your feedback.

> **Safari Desktop Mac:**

It’s quite likely that after calling `stream.startAudio({ autoStartAudioInSafari: true })`, the user didn’t interact with the page.

Due to browser privacy policies, automatic audio joining is not allowed on Safari. Internally, in the Video SDK, we wait for user interaction after calling this method. If there is no interaction within 40 seconds, we return `OPERATION_TIMEOUT`.

> **Safari IPHONE:**

Due to browser capability limitations, `muteUserAudioLocally` is currently not available on iOS. We will improve the prompt message for this method call in the future.

> **[HTMLMediaElement: volume property - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume#browser_compatibility)**
>
> The HTMLMediaElement.volume property sets the volume at
> which the media will be played.

> Dependent assets 403

These are the sourcemap resources for our Video SDK library, used only when troubleshooting. They have no impact on functionality.

> Audio interrupt when back

This is a limitation on iOS browsers. When the session is switched to the background and audio is played in another app, the audio in the session will be interrupted, and you need to manually start the audio again, you can listen to `current-audio-change` event to catch the change.

Starting from Video SDK 1.10.5, we provide the audio leave reason in the `current-audio-change` event.

> **[Video SDK - web - 1.10.5](https://developers.zoom.us/changelog/video-sdk/web/1.10.5/)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

Thanks  
Vic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 23, 2024, 12:53pm UTC](https://devforum.zoom.us/t/issue-with-audio-on-safari/102370/6 "2024-02-23T12:53:32Z")

</div>

Closed on February 23, 2024, 12:53pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
