# Have to click on the "startAudio button" twice in Linux/Chrome

**URL:** <https://devforum.zoom.us/t/have-to-click-on-the-startaudio-button-twice-in-linux-chrome/114852>\
**Category:** Web\
**Tags:** video-sdk\
**Created:** [August 2, 2024, 3:35am UTC](https://devforum.zoom.us/t/have-to-click-on-the-startaudio-button-twice-in-linux-chrome/114852 "2024-08-02T03:35:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![camille.drapier](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/camille.drapier/32/62046_2.png) [@camille.drapier](https://devforum.zoom.us/u/camille.drapier)\
**Post date:** [August 2, 2024, 3:35am UTC](https://devforum.zoom.us/t/have-to-click-on-the-startaudio-button-twice-in-linux-chrome/114852/1 "2024-08-02T03:35:56Z")

</div>

**Description**

I’m currently trying to migrate from Twilio to Zoom. While doing so, I realized that I now need to have a button that should be pressed after the user joined the zoom meeting so that audio is enabled.  
When clicking on this button, while using Chrome, the first time does not seem to enable the audio, but clicking on this button a second time afterwards seem to work as expected.

**Browser Console Error**

There are no errors from the `startAudio` function (it resolves quickly), but there is a call to the `auto-play-audio-failed` callback, with no parameters. If I use a `console.trace` in that callback, I have the following:

```auto
autoPlayAudioFailed	@	app.js:78607
(anonymous)	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
e.next	@	vendor.js:23623
t._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
t._execute	@	vendor.js:23623
t.execute	@	vendor.js:23623
push../node_modules/@zoom/videosdk/dist/index.umd.js.t.flush	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
Promise.then		
ue	@	vendor.js:23623
setImmediate	@	vendor.js:23623
t.requestAsyncId	@	vendor.js:23623
t.schedule	@	vendor.js:23623
e.schedule	@	vendor.js:23623
Le	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
t	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
emit	@	vendor.js:23623
Oc	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
m	@	vendor.js:23623
h	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
t._execute	@	vendor.js:23623
t.execute	@	vendor.js:23623
t.flush	@	vendor.js:23623
t.schedule	@	vendor.js:23623
e.schedule	@	vendor.js:23623
Le	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
a._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
k	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
Promise.catch		
(anonymous)	@	vendor.js:23623
e.next	@	vendor.js:23623
t._next	@	vendor.js:23623
t.next	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
t.unsubscribe	@	vendor.js:23623
a._complete	@	vendor.js:23623
t.complete	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
e._trySubscribe	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
k	@	vendor.js:23623
e.subscribe	@	vendor.js:23623
a	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
e._trySubscribe	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
k	@	vendor.js:23623
e.subscribe	@	vendor.js:23623
(anonymous)	@	vendor.js:23623
startAudio	@	vendor.js:23623
r.value	@	vendor.js:23623
n.value	@	vendor.js:23623
IR.o.value	@	vendor.js:23623
value	@	vendor.js:23623
onClick._cache.<computed>._cache.<computed>

```

**Which Web Video SDK version?**  
1.11.10

**Video SDK Code Snippets**  
The following code is called from the click event of a button.

```auto
export const startAudio = (mute: boolean, callback: () => void) => {
  stream
    ?.startAudio({ mute })
    .then(callback)
    .catch(() => {
      // Do nothing
    });
};

```

**To Reproduce**  
Steps to reproduce the behavior:

1. Start a zoom meeting
2. Click on the button tied to the “start audio” method

**Troubleshooting Routes**

- I tried to search for “startAudio” related problems in the “VideoSDK web” of the forum without finding much matches to this specific problem.
- When trying this with Firefox on the same computer, it did not have problems
- When trying the same code of my application on a “Mac”, it didn’t present this problem (neither on Chrome nor Firefox)

**Device (please complete the following information):**

- Device: Dell Precision 5540
- OS: Linux: KDE Neon 6.0; KDE plasma 6.1.3 (I tried both on the “wayland” version as well as on the legacy “X11” version with the same result); KDE Frameworks 6.4.0; Kernel: 6.5.0-45-generic
- Browser: Chrome
- Browser Version 127.0.6533.88 (Official Build) (64-bit)
- Please note that I am using the VideoSDK inside a VueJs (3.4.31) application

---

<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:** [August 7, 2024, 1:05pm UTC](https://devforum.zoom.us/t/have-to-click-on-the-startaudio-button-twice-in-linux-chrome/114852/2 "2024-08-07T13:05:36Z")

</div>

Hey @camille.drapier

Thanks for your feedback.

Regarding the `auto-play-audio-failed` event, it might be due to browser limitations. As for Linux Chrome, there are no special considerations.

> **[Autoplay policy in Chrome  |  Blog  |  Chrome for Developers](https://developer.chrome.com/blog/autoplay)**
>
> Learn best practices for good user experiences with the new autoplay policies in Chrome.

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:** [September 6, 2024, 11:06pm UTC](https://devforum.zoom.us/t/have-to-click-on-the-startaudio-button-twice-in-linux-chrome/114852/3 "2024-09-06T23:06:10Z")

</div>

Closed on September 6, 2024, 11:06pm UTC

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