Bug 1362212 - Add chromeonly HTMLMediaElement.reportCanPlayTelemetry. r=bz draft
authorChris Pearce <cpearce@mozilla.com>
Wed, 10 May 2017 11:30:47 +1200
changeset 576583 72143eab27dd608723ef7eaa7700aa95ab10d3f5
parent 575154 7075d0a0e1fd88c51da23ab8ef5860a51bf4b2cd
child 576584 1b77046ebb7bb2d4ff1ba53afce904d3de45c335
push id58422
push userbmo:cpearce@mozilla.com
push dateThu, 11 May 2017 22:41:34 +0000
reviewersbz
bugs1362212
milestone55.0a1
Bug 1362212 - Add chromeonly HTMLMediaElement.reportCanPlayTelemetry. r=bz This enables the Firefox front end code to call into Gecko to direct it to report telemetry as to whether we have available platform decoders at an opportune moment where doing so is unlikely to cause jank. Gecko can then dispatch a task to collect this information on a non-main thread as in order to determine whether we have platform decoders requires us to load shared libraries from disk, which can cause jank. MozReview-Commit-ID: GkQEAqWc1aQ
dom/webidl/HTMLMediaElement.webidl
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -133,16 +133,19 @@ partial interface HTMLMediaElement {
   // player interfaces to display the song title, artist, etc.
   [Throws]
   object? mozGetMetadata();
 
   // Mozilla extension: provides access to the fragment end time if
   // the media element has a fragment URI for the currentSrc, otherwise
   // it is equal to the media duration.
   readonly attribute double mozFragmentEnd;
+
+  [ChromeOnly]
+  void reportCanPlayTelemetry();
 };
 
 // Encrypted Media Extensions
 partial interface HTMLMediaElement {
   readonly attribute MediaKeys? mediaKeys;
 
   // void, not any: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26457
   [NewObject]