Bug 1366975 - MediaElementWebidl. draft
authorbechen <bechen@mozilla.com>
Tue, 13 Jun 2017 18:44:35 +0800
changeset 593227 8ffe2cd238115bff718f86a6c889853665048301
parent 593223 a8235bd9cda7c9cba50eec19167220b9466d594c
child 593228 07614c9d333fc87948918c486cc98e0b3f969957
push id63642
push userbechen@mozilla.com
push dateTue, 13 Jun 2017 10:44:55 +0000
bugs1366975
milestone55.0a1
Bug 1366975 - MediaElementWebidl. MozReview-Commit-ID: HNPOLlvlcMP
dom/html/HTMLMediaElement.h
dom/webidl/HTMLMediaElement.webidl
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -51,16 +51,17 @@ class VideoFrameContainer;
 namespace dom {
 class MediaKeys;
 class TextTrack;
 class TimeRanges;
 class WakeLock;
 class MediaTrack;
 class MediaStreamTrack;
 class VideoStreamTrack;
+class MediaCacheStatus;
 } // namespace dom
 } // namespace mozilla
 
 class nsIChannel;
 class nsIHttpChannel;
 class nsILoadGroup;
 class nsIRunnable;
 class nsITimer;
--- a/dom/webidl/HTMLMediaElement.webidl
+++ b/dom/webidl/HTMLMediaElement.webidl
@@ -196,16 +196,21 @@ partial interface HTMLMediaElement {
  *     currentTime to the duration of the media source and dispatches a "seeked"
  *     event and an "ended" event.
  */
 partial interface HTMLMediaElement {
   [Throws, Pref="media.seekToNextFrame.enabled"]
   Promise<void> seekToNextFrame();
 };
 
+partial interface HTMLMediaElement {
+  [Func="mozilla::dom::MediaCacheStatus::Enabled", NewObject]
+  MediaCacheStatus getMediaCacheStatus();
+};
+
 /*
  * This is an API for simulating visibility changes to help debug and write
  * tests about suspend-video-decoding.
  *
  * - SetVisible() is for simulating visibility changes.
  * - HasSuspendTaint() is for querying that the element's decoder cannot suspend
  *   video decoding because it has been tainted by an operation, such as
  *   drawImage().