WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 236439
Audio volume reduces on stopping and restarting audio track after enabling / disabling the mic capture
https://bugs.webkit.org/show_bug.cgi?id=236439
Summary
Audio volume reduces on stopping and restarting audio track after enabling / ...
asanand
Reported
2022-02-10 06:51:00 PST
Earlier issue - Audio Volume reduces considerably on accepting the mic permissions
https://bugs.webkit.org/show_bug.cgi?id=218012
From the 15.4 beta version the earlier issue got fixed. But it reproes again if we enable / disable the mic permission and then minimizing and then again maximize the safari. Steps :- a) Start the audio rendering of webRTC stream via HTML element in safari browser b) Enable the mic capture. Disable the mic capture. Minimize the page. c) Open the page again. Low audio volume issue reproes.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-02-14 19:55:06 PST
<
rdar://problem/88943506
>
asanand
Comment 2
2022-02-24 07:24:03 PST
Please use the below steps to to repro this issue on a standalone app Case 1 a) Open
https://ashishanand26cs.github.io/lowvolume
on safari b) Press "Start" button. Audio tone will play c) Press "MicAccess" button. Mic capture will start. d) Press "MicAccessStop" button. Mic capture will stop. e) Press "ResetAudio" button. Observer the audio tone volume reduces Case 2 a) Open
https://ashishanand26cs.github.io/lowvolume
on safari b) Press "Start" button. Audio tone will play c) Press "ResetAudio" button. Observer the audio tone volume remains same. If we enable/disable the mic access then the volume of audio track reduces considerably
youenn fablet
Comment 3
2022-03-11 06:50:44 PST
(In reply to asanand from
comment #2
)
> Please use the below steps to to repro this issue on a standalone app > Case 1 > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > b) Press "Start" button. Audio tone will play > c) Press "MicAccess" button. Mic capture will start. > d) Press "MicAccessStop" button. Mic capture will stop. > e) Press "ResetAudio" button. Observer the audio tone volume reduces > > Case 2 > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > b) Press "Start" button. Audio tone will play > c) Press "ResetAudio" button. Observer the audio tone volume remains same. > > > If we enable/disable the mic access then the volume of audio track reduces > considerably
On iOS, there are two audio levels that the user can tweak: an audio level when playing regular audio and an audio level when capturing audio. The audio level in use currently change when starting to capture. When stopping to capture, we keep using the same audio level until the audio is stopped. Can you try and make sure the same audio levels are roughly the same? If that solves the issue, your request might be that you would like the page to stick with one audio level throughout the audio rendering. Is that correct?
asanand
Comment 4
2022-03-16 06:24:28 PDT
(In reply to youenn fablet from
comment #3
)
> (In reply to asanand from
comment #2
) > > Please use the below steps to to repro this issue on a standalone app > > Case 1 > > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > > b) Press "Start" button. Audio tone will play > > c) Press "MicAccess" button. Mic capture will start. > > d) Press "MicAccessStop" button. Mic capture will stop. > > e) Press "ResetAudio" button. Observer the audio tone volume reduces > > > > Case 2 > > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > > b) Press "Start" button. Audio tone will play > > c) Press "ResetAudio" button. Observer the audio tone volume remains same. > > > > > > If we enable/disable the mic access then the volume of audio track reduces > > considerably > > On iOS, there are two audio levels that the user can tweak: an audio level > when playing regular audio and an audio level when capturing audio. > > The audio level in use currently change when starting to capture. > When stopping to capture, we keep using the same audio level until the audio > is stopped. > > Can you try and make sure the same audio levels are roughly the same? > If that solves the issue, your request might be that you would like the page > to stick with one audio level throughout the audio rendering. Is that > correct?
Yes that will be really helpful. We would want to stick to one audio level on a page thought the audio rendering
asanand
Comment 5
2022-08-07 22:31:50 PDT
(In reply to asanand from
comment #4
)
> (In reply to youenn fablet from
comment #3
) > > (In reply to asanand from
comment #2
) > > > Please use the below steps to to repro this issue on a standalone app > > > Case 1 > > > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > > > b) Press "Start" button. Audio tone will play > > > c) Press "MicAccess" button. Mic capture will start. > > > d) Press "MicAccessStop" button. Mic capture will stop. > > > e) Press "ResetAudio" button. Observer the audio tone volume reduces > > > > > > Case 2 > > > a) Open
https://ashishanand26cs.github.io/lowvolume
on safari > > > b) Press "Start" button. Audio tone will play > > > c) Press "ResetAudio" button. Observer the audio tone volume remains same. > > > > > > > > > If we enable/disable the mic access then the volume of audio track reduces > > > considerably > > > > On iOS, there are two audio levels that the user can tweak: an audio level > > when playing regular audio and an audio level when capturing audio. > > > > The audio level in use currently change when starting to capture. > > When stopping to capture, we keep using the same audio level until the audio > > is stopped. > > > > Can you try and make sure the same audio levels are roughly the same? > > If that solves the issue, your request might be that you would like the page > > to stick with one audio level throughout the audio rendering. Is that > > correct? > > Yes that will be really helpful. We would want to stick to one audio level > on a page thought the audio rendering
We are still seeing this issue repro on iOS 16 beta 3. Is this possible to keep the audio volume constant on a page?
Martin Bartlett
Comment 6
2024-06-25 00:08:59 PDT
> Earlier issue - Audio Volume reduces considerably on accepting the mic > permissions >
https://bugs.webkit.org/show_bug.cgi?id=218012
https://tinyfishing.world
> > From the 15.4 beta version the earlier issue got fixed. But it reproes again > if we enable / disable the mic permission and then minimizing and then again > maximize the safari. > > Steps :- > a) Start the audio rendering of webRTC stream via HTML element in safari > browser > b) Enable the mic capture. Disable the mic capture. Minimize the page. > c) Open the page again. Low audio volume issue reproes.
The issue you're encountering appears to be a regression in Safari where enabling and then disabling mic permissions followed by minimizing and restoring the page results in significantly reduced audio volume for WebRTC streams. This is similar to a previously reported bug that was fixed in Safari 15.4 beta but seems to have re-emerged under specific conditions. Steps to Reproduce: Start audio rendering of a WebRTC stream via an HTML element in Safari. Enable mic capture permissions. Disable mic capture permissions. Minimize the Safari window. Restore the Safari window. Observe that the audio volume is significantly reduced. Possible Workarounds: While waiting for a permanent fix from Apple, consider the following temporary workarounds: Programmatic Restart of Audio Stream: When the page is restored (using the visibilitychange event), programmatically stop and restart the audio stream. This can help reset the audio volume to the correct level. document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible') { const audioElement = document.getElementById('audioElement'); audioElement.pause(); audioElement.play(); } }); User Prompt: Prompt the user to manually toggle audio playback (pause and play) after restoring the window. This isn't ideal but can be a temporary user-driven fix. Microphone Handling: Avoid disabling the microphone if not necessary. If you need to toggle mic permissions, consider handling audio stream reinitialization more gracefully. Volume Reset: Manually reset the volume of the audio element when the page visibility changes. document.addEventListener('visibilitychange', () => { if (document.visibilityState === 'visible') { const audioElement = document.getElementById('audioElement'); audioElement.volume = 0; audioElement.volume = 1; } }); (In reply to asanand from
comment #0
)
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug