Closed Bug 1827684 Opened 2 years ago Closed 2 years ago

ORB is blocking an IceCast stream on www.mujrozhlas.cz, but it plays on Chrome and Safari

Categories

(Core :: Audio/Video, defect, P2)

defect

Tracking

()

VERIFIED FIXED
115 Branch
Webcompat Priority P2
Tracking Status
firefox-esr102 --- unaffected
firefox113 --- disabled
firefox114 --- disabled
firefox115 --- verified
firefox116 --- verified

People

(Reporter: twisniewski, Assigned: farre)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(1 file)

Opaque Request Blocking prevents the stream from playing at http://broniesradio.com/Bronies%20Radio%20Player.html on Firefox nightly and release, but not in Chrome 112 or Safari. (If ORB is disabled in about:config, the stream can play).

Interestingly, the stream also isn't playing for me on Chrome Canary 114, but since it gets a "connection closed" error after 30 seconds, I don't think it's related to ORB.

Severity: -- → S2
Priority: -- → P2

Valentin, who handles this kind of issues? Do we need to do something on the media side?

Flags: needinfo?(valentin.gosu)

I'm told it's :farre.

Flags: needinfo?(valentin.gosu) → needinfo?(afarre)

(In reply to Thomas Wisniewski [:twisniewski] from comment #0)

Opaque Request Blocking prevents the stream from playing at http://broniesradio.com/Bronies%20Radio%20Player.html on Firefox nightly and release,

FWIW ORB isn't enabled on release yet.
It works for me on Fx release 112, but not on nightly.

but not in Chrome 112 or Safari. (If ORB is disabled in about:config, the stream can play).

Interestingly, the stream also isn't playing for me on Chrome Canary 114, but since it gets a "connection closed" error after 30 seconds, I don't think it's related to ORB.

After investigation, this is caused by an invocation of nsMediaSniffer:::GetMIMETypeFromContent by the ORB logic, that has a draft readable here: https://whatpr.org/fetch/1442.html#orb-algorithm

Steps 9 does the blocking, but sniffing should succeed and allow it in step 8.

ORB calls the sniffing logic with a max size of 1024 bytes, but this is not necessary to sniff mp3 streams: 1445 bytes can be necessary, because here we're in the presence of a 320kbps stereo stream.

Filed an issue on the spec

Flags: needinfo?(afarre)
Assignee: nobody → afarre
Status: NEW → ASSIGNED

ORB calls the sniffing logic with a max size of 1024 bytes, but this is not necessary to sniff mp3 streams: 1445 bytes can be necessary, because here we're in the presence of a 320kbps stereo stream.

This is incorrect. What is happening is that the media element picks the right demuxer and decoder based on the content-type. This is not what we should do, per spec:

To determine the format of the media resource, the user agent must use the rules for sniffing audio and video specifically.

from https://html.spec.whatwg.org/#concept-media-load-resource.

But if we follow the spec, then this media shouldn't play, so we need to fix the spec once again, because it doesn't describe reality.

[...] picks the right demuxer and decoder based on the content-type [...]

This happens here: https://searchfox.org/mozilla-central/source/dom/html/HTMLMediaElement.cpp#4976-4979,5000,5024-5025

Keywords: regression
Regressed by: orb
See Also: → 1828375

This is also similarly breaking www.mujrozhlas.cz (a radio site).

Webcompat Priority: --- → ?

This will be fixed when bug 1828375 lands. We're going to add some of the exemptions to ORB that Chromium has, but where Chromium allows all MIME types beginning with audio/ and video/, we're opting for trying only making an exception for audio/mpeg. The reason for that is that audio/mpeg is the only MIME type we thing has a potential to be hard to sniff.

Webcompat Priority: ? → P2

It's possible for a streaming server to not start at an ADTS header
sync marker. We need a sliding window sniffer to be able to handle
this, until then we'll include audio/aac in the gradual ORB
transition.

In bug 1828375 we landed the exception for audio/mpeg aka MP3 that was the problem with http://broniesradio.com/Bronies%20Radio%20Player.html. www.mujrozhlas.cz has the same issue for AAC, which is landing in the patch in Comment 11.

Summary: ORB is blocking an IceCast stream on broniesradio.com, but it plays on Chrome and Safari → ORB is blocking an IceCast stream on www.mujrozhlas.cz, but it plays on Chrome and Safari
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f76409005dd4 Allow audio/aac. r=sefeng,necko-reviewers
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/495efbeb53a2 Allow audio/aac. r=sefeng,necko-reviewers
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

Reproducible on a 2023-04-12 Nightly build on macOS 12.
Verified as fixed on Firefox 115.0b4(build ID: 20230611180300) and Nightly 116.0a1(build ID: 20230611214645) on macOS 12, Windows 10, Ubuntu 22.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: