Bug 245428
Summary: | Safari 16 cannot play WebM Opus from blob URL (breaks Construct 3) | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ashley Gullen <ashley> |
Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, brad, cdumez, guhenke, jean-yves.avenard, jer.noble, jgomez, mustafa.0x, randalllhall, rniwa, tomac, webkit-bug-importer |
Priority: | P2 | Keywords: | BrowserCompat, InRadar |
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=258713 https://bugs.webkit.org/show_bug.cgi?id=270772 https://bugs.webkit.org/show_bug.cgi?id=272502 |
Ashley Gullen
Safari 16 on macOS appears to have support for playback of WebM Opus in the HTML <audio> element. However it does not work if passed a blob: URL.
Minimal repro: https://downloads.scirra.com/labs/bugs/webmblob/
Click "Play normally" and it will play from a normal filename. Click "Play from blob URL" and it will play from fetching the same file as a blob, calling URL.createObjectURL(blob), and playing that URL.
Observed result: clicking "Play from blob URL" does not play any audio. It also logs an error event in the console.
Expected result: it should still support playing from a blob URL. It works in Chrome, and it also works in Safari 16 if playing an MP4 (AAC) audio file. It appears only WebM Opus playback is broken when using a blob URL.
Our commercial web app Construct (www.construct.net) relies on playing audio from blob URLs in several places (especially when the user previews their project). Based on feature-detection for WebM Opus it has switched over to using built-in playback in Safari 16, but playback is now broken. Please fix it ASAP.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Ahmad Saleem
I am able to reproduce this issue in Safari 16 and Safari Technical Preview 153 does not play audio from blob URL based on Comment 0 test case.
Although, I know there are fixes in Webkit ToT recently, will this be fixed? Appreciate if someone can look into it. Thanks!
Alexey Proskuryakov
The behavior on this test case appears to be identical on Safari 15.6.1, so this isn't a Safari 16 regression AFAICT.
Radar WebKit Bug Importer
<rdar://problem/100205028>
Ashley Gullen
It's not really clear to me at the moment to what extent Safari is supposed to support WebM Opus - for example support appears to be inconsistent between macOS and iOS (see issue 238546). Perhaps there are other device specific requirements? I haven't seen any documentation covering this so it's hard to know if or where WebM Opus playback is meant to work in the first place.
We have a WebAssembly WebM Opus decoder as backup if canPlayType("audio/webm;codecs=opus") returns an empty string, so the result of calling that will affect whether our code switches over to built-in support and gets affected by this bug. Perhaps this regressed in an earlier release and I didn't notice yet.
mustafa.0x
Same or similar bug: fails with caf opus files, but only on iOS. It works fine on macOS. This bit me hard.
The same file plays fine via URL.
Ashley Gullen
This still reproduces for me in Safari 17.
Ashley Gullen
This still reproduces in Safari 17.4 which is meant to now have full support for WebM, but this issue still blocks us using WebM in Safari.
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/25820
Jean-Yves Avenard [:jya]
Pull request: https://github.com/WebKit/WebKit/pull/25883
EWS
Committed 276136@main (a7b863a49945): <https://commits.webkit.org/276136@main>
Reviewed commits have been landed. Closing PR #25820 and removing active labels.
Jean-Yves Avenard [:jya]
*** Bug 270772 has been marked as a duplicate of this bug. ***
Jean-Yves Avenard [:jya]
*** Bug 272502 has been marked as a duplicate of this bug. ***