question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AudioPlaybackStatus gets fired multiple times even after invoking startAudio()

See original GitHub issue

Describe the bug

Im expecting audioPlaybackStatusChanged to not fire after calling room.startAudio() on user click. But audioPlaybackStatusChanged keeps firing on each new participant joined.

Reproduction

Happens in MS Edge Mobile on https://example.livekit.io/ whenever a new participant joins

Logs

chunk-vendors.d8055e62.js:316 room event {event: 'participantConnected', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'trackPublished', args: Array(2)}
chunk-vendors.d8055e62.js:316 room event {event: 'connectionQualityChanged', args: Array(2)}
chunk-vendors.d8055e62.js:316 received server offer {RTCSdpType: 'offer', signalingState: 'stable'}
chunk-vendors.d8055e62.js:316 room event {event: 'trackSubscriptionPermissionChanged', args: Array(3)}
chunk-vendors.d8055e62.js:316 room event {event: 'trackSubscribed', args: Array(3)}
app.a2ae327e.js:1 trackSubscribed Ba {_events: {…}, _eventsCount: 12, _maxListeners: undefined, audioLevel: 0, isSpeaking: false, …} Ha {_events: {…}, _eventsCount: 7, _maxListeners: undefined, metadataMuted: false, handleMuted: ƒ, …}
chunk-vendors.d8055e62.js:316 could not playback audio DOMException: play() can only be initiated by a user gesture.
Ns.handleAudioPlaybackFailed @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Promise.catch (async)
attach @ chunk-vendors.d8055e62.js:316
attach @ chunk-vendors.d8055e62.js:316
mounted @ app.a2ae327e.js:1
In @ chunk-vendors.d8055e62.js:63
Ni @ chunk-vendors.d8055e62.js:63
insert @ chunk-vendors.d8055e62.js:63
O @ chunk-vendors.d8055e62.js:63
(anonymous) @ chunk-vendors.d8055e62.js:63
Oi.e._update @ chunk-vendors.d8055e62.js:63
i @ chunk-vendors.d8055e62.js:63
e.get @ chunk-vendors.d8055e62.js:63
e.run @ chunk-vendors.d8055e62.js:63
Gi @ chunk-vendors.d8055e62.js:63
(anonymous) @ chunk-vendors.d8055e62.js:63
Vn @ chunk-vendors.d8055e62.js:63
Promise.then (async)
Hn @ chunk-vendors.d8055e62.js:63
Kn @ chunk-vendors.d8055e62.js:63
Xi @ chunk-vendors.d8055e62.js:63
e.update @ chunk-vendors.d8055e62.js:63
e.notify @ chunk-vendors.d8055e62.js:63
set @ chunk-vendors.d8055e62.js:63
(anonymous) @ app.a2ae327e.js:1
u @ chunk-vendors.d8055e62.js:216
(anonymous) @ chunk-vendors.d8055e62.js:216
(anonymous) @ chunk-vendors.d8055e62.js:216
a @ chunk-vendors.d8055e62.js:79
s @ chunk-vendors.d8055e62.js:79
(anonymous) @ chunk-vendors.d8055e62.js:79
t @ chunk-vendors.d8055e62.js:121
(anonymous) @ chunk-vendors.d8055e62.js:79
t @ app.a2ae327e.js:1
(anonymous) @ app.a2ae327e.js:1
r.emitEvent @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
setTrack @ chunk-vendors.d8055e62.js:316
addSubscribedMediaTrack @ chunk-vendors.d8055e62.js:316
onTrackAdded @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
cr.subscriber.pc.ontrack @ chunk-vendors.d8055e62.js:316
a @ chunk-vendors.d8055e62.js:316
a @ chunk-vendors.d8055e62.js:316
Show 23 more frames
chunk-vendors.d8055e62.js:316 room event {event: 'audioPlaybackChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 sending answer
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'audioPlaybackChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'trackMuted', args: Array(2)}
chunk-vendors.d8055e62.js:316 room event {event: 'participantConnected', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'trackPublished', args: Array(2)}
chunk-vendors.d8055e62.js:316 room event {event: 'connectionQualityChanged', args: Array(2)}
chunk-vendors.d8055e62.js:316 received server offer {RTCSdpType: 'offer', signalingState: 'stable'}
chunk-vendors.d8055e62.js:316 room event {event: 'trackSubscriptionPermissionChanged', args: Array(3)}
chunk-vendors.d8055e62.js:316 room event {event: 'trackSubscribed', args: Array(3)}
app.a2ae327e.js:1 trackSubscribed Ba {_events: {…}, _eventsCount: 12, _maxListeners: undefined, audioLevel: 0, isSpeaking: false, …} Ha {_events: {…}, _eventsCount: 7, _maxListeners: undefined, metadataMuted: false, handleMuted: ƒ, …}
chunk-vendors.d8055e62.js:316 could not playback audio DOMException: play() can only be initiated by a user gesture.
Ns.handleAudioPlaybackFailed @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Promise.catch (async)
attach @ chunk-vendors.d8055e62.js:316
attach @ chunk-vendors.d8055e62.js:316
mounted @ app.a2ae327e.js:1
In @ chunk-vendors.d8055e62.js:63
Ni @ chunk-vendors.d8055e62.js:63
insert @ chunk-vendors.d8055e62.js:63
O @ chunk-vendors.d8055e62.js:63
(anonymous) @ chunk-vendors.d8055e62.js:63
Oi.e._update @ chunk-vendors.d8055e62.js:63
i @ chunk-vendors.d8055e62.js:63
e.get @ chunk-vendors.d8055e62.js:63
e.run @ chunk-vendors.d8055e62.js:63
Gi @ chunk-vendors.d8055e62.js:63
(anonymous) @ chunk-vendors.d8055e62.js:63
Vn @ chunk-vendors.d8055e62.js:63
Promise.then (async)
Hn @ chunk-vendors.d8055e62.js:63
Kn @ chunk-vendors.d8055e62.js:63
Xi @ chunk-vendors.d8055e62.js:63
e.update @ chunk-vendors.d8055e62.js:63
e.notify @ chunk-vendors.d8055e62.js:63
set @ chunk-vendors.d8055e62.js:63
(anonymous) @ app.a2ae327e.js:1
u @ chunk-vendors.d8055e62.js:216
(anonymous) @ chunk-vendors.d8055e62.js:216
(anonymous) @ chunk-vendors.d8055e62.js:216
a @ chunk-vendors.d8055e62.js:79
s @ chunk-vendors.d8055e62.js:79
(anonymous) @ chunk-vendors.d8055e62.js:79
t @ chunk-vendors.d8055e62.js:121
(anonymous) @ chunk-vendors.d8055e62.js:79
t @ app.a2ae327e.js:1
(anonymous) @ app.a2ae327e.js:1
r.emitEvent @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
emit @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
setTrack @ chunk-vendors.d8055e62.js:316
addSubscribedMediaTrack @ chunk-vendors.d8055e62.js:316
onTrackAdded @ chunk-vendors.d8055e62.js:316
(anonymous) @ chunk-vendors.d8055e62.js:316
Or.emit @ chunk-vendors.d8055e62.js:316
cr.subscriber.pc.ontrack @ chunk-vendors.d8055e62.js:316
a @ chunk-vendors.d8055e62.js:316
a @ chunk-vendors.d8055e62.js:316
Show 23 more frames
chunk-vendors.d8055e62.js:316 room event {event: 'audioPlaybackChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 sending answer
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'audioPlaybackChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}
chunk-vendors.d8055e62.js:316 room event {event: 'activeSpeakersChanged', args: Array(1)}

System Info

Android 12, Microsoft edge

Severity

blocking all usage of LiveKit

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
karthikSirsikarcommented, Oct 10, 2022

Sorry, that was misinterpreted. I had disabled expWebAudioMix for IOS and had only enabled it for android devices.

0reactions
lukasIOcommented, Nov 30, 2022

expWebAudioMix does seem to solve the original issue for edge, feel free to open a new issue for the feedback loop in case this is still happening.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Backbonejs events fired multiple times - Stack Overflow
Well, the first thing you should know is that $ (this.el) is not necessary because backbone does it automatically and it gets like...
Read more >
form jquery events fired multiple times after using AJAX
I have tried with .once() and i am still getting 3 click events from one click. EDIT: this was my starting point jQuery( ......
Read more >
Add experimental option to pipe attached audio tracks through ...
AudioPlaybackStatus gets fired multiple times even after invoking startAudio() #447. Closed. lukasIO added 3 commits 2 months ago.
Read more >
Mouse click event firing multiple times - Ask Ubuntu
Because the Release event is being fired multiple times upon press of the mouse it confuses any code that makes use of the...
Read more >
Oracle Event Alert firing multiple times
Hi I have an Event Alert which needs to fired when the order gets" CANCELLED" but to my surprise it is firing multiple...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found