Skip to content

Commit

Permalink
2517: disable Media Capabilities API (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thorin-Oakenpants authored Nov 13, 2018
1 parent 8fd6061 commit f214e4b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions user.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,11 @@ user_pref("dom.webaudio.enabled", false);
/* 2516: disable PointerEvents
* [1] https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent ***/
user_pref("dom.w3c_pointer_events.enabled", false);
/* 2517: disable Media Capabilities API (FF63+)
[WARNING] This *may* affect media performance if disabled, no one is sure
[1] https://github.com/WICG/media-capabilities
[2] https://wicg.github.io/media-capabilities/#security-privacy-considerations ***/
user_pref("media.media-capabilities.enabled", false);

/*** 2600: MISCELLANEOUS ***/
user_pref("_user.js.parrot", "2600 syntax error: the parrot's run down the curtain!");
Expand Down

2 comments on commit f214e4b

@crssi
Copy link

@crssi crssi commented on f214e4b Nov 13, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried some media with true and false and I haven't noticed any differences in a user feel perspective and also by the CPU consumption.
To my self: Maybe FF must be restarted on this pref change?

@earthlng
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe FF must be restarted on this pref change?

nope, simply reloading a tab after (en/dis)abling is enough. source: just tested with a scratchpad script

I really don't think we need/should disable this because

  1. it doesn't expose that much atm (ie with the "screen" capabilities default false)
  • it has 2 functions decodingInfo and encodingInfo
  • decodingInfo can test for video and/or audio (combinations) and will return 3 booleans, supported, smooth and powerEfficient
  1. you might get served shitty quality vids
  2. disabling it is easily detectable and makes us stand out for no good reason because (almost?) the same information can be gathered by other means, see fe. https://bugzilla.mozilla.org/show_bug.cgi?id=1409664#c9

The information returned is identical to
1- canPlayType() for file
2- MediaSource.isTypeSupported for media-source
3- MediaRecorder.isTypeRecorder() for recordings.

canPlayType() demo/test page: http://www.leanbackplayer.com/test/h5mt.html

tldr: If someone is pretty unique because they can or can't play certain formats then that information can most likely be gathered even with MC disabled but having it disabled adds another bit of FP-ing info.

Please sign in to comment.