Closed Bug 1838208 Opened 1 year ago Closed 1 year ago

Add preference for controlling `audio/` and `video/` ORB exemptions

Categories

(Core :: DOM: Networking, task, P2)

task

Tracking

()

VERIFIED FIXED
116 Branch
Tracking Status
firefox115 --- verified
firefox116 --- verified

People

(Reporter: farre, Assigned: farre)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

In IsOpaqueSafeListedSpecBreakingMIMEType we want to extend the code that adds exceptions for media MIME types

Instead of doing:

  if (aContentType.EqualsLiteral(AUDIO_MP3) ||
      aContentType.EqualsLiteral(AUDIO_AAC)) {
    return true;
  }

I'd guess we'd want to do something like:

  switch (StaticPrefs::browser_opaqueResponseBlocking_mediaExceptionsStrategy() {
    case OpaqueResponseMediaException::NoExceptions:
      break;
    case OpaqueResponseMediaException::AllowSome:
      if (aContentType.EqualsLiteral(AUDIO_MP3) ||
        aContentType.EqualsLiteral(AUDIO_AAC)) {
        return true;
      }
      break;
    case OpaqueResponseMediaException::AllowAll:
      if (StringBeginsWith(aContentType, "audio/"_ns) ||
        StringBeginsWith(aContentType, "video/"_ns)) {
        return true;
      }
      break;
Assignee: nobody → afarre
Status: NEW → ASSIGNED

In IsOpaqueSafeListedSpecBreakingMIMEType we make it possible to
configure, with pref, what kind of exception strategy to use to handle
compatibility problems with MIME types starting with audio/ or
video/.

Summary: Add preference for controlling `audio/` and `video/` ORB exemptions + add nimbus toggles. → Add preference for controlling `audio/` and `video/` ORB exemptions
Priority: -- → P2
Whiteboard: [necko-triaged]
Severity: -- → S3
Severity: S3 → N/A
Attachment #9339024 - Attachment description: Bug 1838208 - Add pref to allow choosing exception strategy. r=sefeng! → Bug 1838208 - Part 1: Add pref to allow choosing exception strategy. r=sefeng!
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fe364999eb7b Part 1: Add pref to allow choosing exception strategy. r=sefeng,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/ccd60b2ac497 Part 2: Add opaqueResponseBlocking.mediaExceptionsStrategy to Nimbus. r=sefeng
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch

Comment on attachment 9339068 [details]
Bug 1838208 - Part 2: Add opaqueResponseBlocking.mediaExceptionsStrategy to Nimbus. r=sefeng!

Beta/Release Uplift Approval Request

  • User impact if declined: Delaying ORB rollout. browser.opaqueResponseBlocking.mediaExceptionsStrategy is needed for risk mitigation.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1) For all values of browser.opaqueResponseBlocking.mediaExceptionsStrategy (0, 1, and 2) do
    1.1) Visit https://www.radios.com.br/aovivo/radio-candeias-1069-fm/16177
    1.2) If browser.opaqueResponseBlocking.mediaExceptionsStrategy is 0 check that the audio is not playable, else check that it is playable.
  • List of other uplifts needed: Bug 1838052
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The default value of the pref is the current behaviour, pref values 0 and 2 aren't used.
  • String changes made/needed: None
  • Is Android affected?: Yes
Attachment #9339068 - Flags: approval-mozilla-beta?
Attachment #9339024 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9339024 [details]
Bug 1838208 - Part 1: Add pref to allow choosing exception strategy. r=sefeng!

Approved for 115.0b6.

Attachment #9339024 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Comment on attachment 9339068 [details]
Bug 1838208 - Part 2: Add opaqueResponseBlocking.mediaExceptionsStrategy to Nimbus. r=sefeng!

Approved for 115.0b6.

Attachment #9339068 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I have verified that the "browser.opaqueResponseBlocking.mediaExceptionsStrategy" pref has been successfully added with the default value of "1" on Beta 115.0b6 and Nightly 116.0a1 and that the audio is not playable on https://www.radios.com.br/aovivo/radio-candeias-1069-fm/16177 with it set to "0". I've done this across Windows 10, MacOS 11.6 and Ubuntu 20.04.

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: