[Webkit-unassigned] [Bug 258864] New: Web Audio becomes distorted after switching to Bluetooth speaker

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 4 20:44:05 PDT 2023


            Bug ID: 258864
           Summary: Web Audio becomes distorted after switching to
                    Bluetooth speaker
           Product: WebKit
           Version: Safari 16
          Hardware: iPhone / iPad
                OS: iOS 16
            Status: NEW
          Severity: Major
          Priority: P2
         Component: Web Audio
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: peter.woods at gmail.com
                CC: cdumez at apple.com

If you open a web page in Safari on iOS or iPadOS that uses Web Audio for audio playback then switch to external Bluetooth speakers, the audio becomes distorted and played at the wrong speed.

Demo URL: https://d2aweagde7jntk.cloudfront.net/webaudio.html

Steps to reproduce:
1. On an iPhone or iPad, disconnect all external Bluetooth devices, remove headphones, make sure device is not muted and set audio output of device to internal speakers.

2. Open this page in Safari: https://d2aweagde7jntk.cloudfront.net/webaudio.html

3. Click / tap on the "Init" button.
An alert is shown giving the AudioContext sampleRate. This is likely to be 48000.

4. Click / tap on the "Play" button.
The audio will play through the internal speakers

5. Click / tap on the "Stop" button.
The audio will stop. Leave this page open.

6. Switch to the Settings app and connect to an external Bluetooth speaker.

7. Switch back to Safari

8. Click / tap on the "Play" button.
The audio will play but is very likely to be badly distorted and play at the wrong speed.
Once the page is in this state, using the "Init" button again does not fix the audio.
Refreshing may fix the problem (but may require several refreshes)

9. With the external Bluetooth speaker still connected, close the page then reopen it.
Follow steps 3 and 4 and the audio will play ok (with the sampleRate showing as 41000).

The problem seems to affect any web page that plays audio using Web Audio.
Audio played using the HTML <audio> element is not affected by this.
I've managed to reproduce the problem on iOS 16 and iOS 17 beta 2 (21A5268h) on an iPhone XS with a MIFA A20 Bluetooth Speaker.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230705/3e0141f0/attachment.htm>

More information about the webkit-unassigned mailing list