bigbluebutton-Github/bigbluebutton-html5/imports/ui/services/audio-manager
prlanzarin 1e53140a00 fix(audio): prevent permission check loop in Safari
Safari may enter a microphone permission check loop due to buggy behavior
in the Permissions API. When permission isn't permanently denied, gUM
requests fail with a NotAllowedError for a few seconds. During this time,
the permission state remains 'prompt' instead of transitioning to 'denied'
and back to 'prompt' after the timeout.

This leads to an issue where, on retrying while in 'prompt' + blocked,
the client loops through gUM checks via: 1) checking permission in the API,
2) receiving 'prompt', so trying gUM, 3) gUM fails, 4) returning to the
modal and checking permission again because the API still says 'prompt'.

Additionally, the `isUsingAudio` flag incorrectly counts the local echo
test/audio settings modal as "using audio," which toggles the flag on/off,
triggering the useEffect that causes the loop more frequently.

To fix this, remove the unnecessary AudioModal permission check that
causes the loop. Also, exclude "isEchoTest" from the `isUsingAudio` flag.
2024-08-20 19:19:08 +00:00
..
error-codes.js fix(audio): handle NotAllowedError in skipCheck:true scenarios 2024-05-03 21:15:58 +00:00
index.js fix(audio): prevent permission check loop in Safari 2024-08-20 19:19:08 +00:00