[Webkit-unassigned] [Bug 226922] New: Safari 15 breaks all Web Audio content using WebM Opus

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jun 11 08:32:47 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=226922

            Bug ID: 226922
           Summary: Safari 15 breaks all Web Audio content using WebM Opus
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: Web Audio
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ashley at scirra.com
                CC: cdumez at apple.com

Thanks for adding WebM Opus support in Safari 15! We've been waiting for this for a long time. However currently it is supported only for the HTML <audio> element. Web Audio's decodeAudioData() still fails to decode WebM Opus. This breaks all existing web content using Web Audio with support for WebM Opus, which includes all content published with Construct 3 (www.construct.net) since 2017.

The reason for this is there is no API to feature detect which audio formats are supported by Web Audio specifically. So in practice all web content uses HTMLMediaElement.canPlayType() to detect which formats are supported for Web Audio. This has worked for years since in all other browsers decodeAudioData() has always supported the same formats as <audio>. However in Safari 15 canPlayType() indicates WebM Opus is playable, but that misleads existing web content in to trying to decode WebM Opus with decodeAudioData(), which doesn't work.

In our case if WebM Opus is detected as not playable, we fall back to a WebAssembly decoder. But since Safari 15 indicates support for WebM Opus, our code skips the WebAssembly decoder and tries to use decodeAudioData() directly, which fails. Since no feature detection API exists for Web Audio, it's also difficult to detect this case.

Minimal repro: https://downloads.scirra.com/labs/audioCodecTests/
Look under the "WebM Opus" section. <audio> support is indicated via "HTML5 audio support: probably". However decodeAudioData support is missing via "Web Audio API decodeAudioData() support: No (error: null)".

Real-world example: https://downloads.scirra.com/labs/kiwistory/
In Safari 14.x and older, both music and sound effects play fine. In Safari 15, the music plays (as it uses <audio>), but no sound effects play (as those use Web Audio). The console logs decoding errors as it has attempted to use decodeAudioData() with WebM Opus, which failed.

Therefore users upgrading to Safari 15 will find Web Audio content regresses and stops playing sound.

Even if we deploy a workaround in our engine, as noted there is years of content already published, and much of it is unlikely to be updated, so many Safari 15 users will still find audio regresses and stops working. So it's important this is fixed before Safari 15 is fully released.

In general, Safari must support all the same formats with <audio> and decodeAudioData() in order to be compatible with existing Web Audio content, since canPlayType() is also the de-facto feature detection API for decodeAudioData().

-- 
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/20210611/90d440c2/attachment.htm>


More information about the webkit-unassigned mailing list