tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

HTMLVideoElement.webidl (4203B)


      1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
      2 /* This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
      4 * You can obtain one at http://mozilla.org/MPL/2.0/.
      5 *
      6 * The origin of this IDL file is
      7 * https://html.spec.whatwg.org/multipage/media.html#the-video-element
      8 * https://wicg.github.io/video-rvfc/
      9 *
     10 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
     11 * Opera Software ASA. You are granted a license to use, reproduce
     12 * and create derivative works of this document.
     13 */
     14 
     15 dictionary VideoFrameCallbackMetadata {
     16  required DOMHighResTimeStamp presentationTime;
     17  required DOMHighResTimeStamp expectedDisplayTime;
     18 
     19  required unsigned long width;
     20  required unsigned long height;
     21  required double mediaTime;
     22 
     23  required unsigned long presentedFrames;
     24 
     25  double processingDuration;
     26  DOMHighResTimeStamp captureTime;
     27  DOMHighResTimeStamp receiveTime;
     28  unsigned long rtpTimestamp;
     29 };
     30 
     31 callback VideoFrameRequestCallback =
     32    undefined(DOMHighResTimeStamp now, VideoFrameCallbackMetadata metadata);
     33 
     34 [Exposed=Window]
     35 interface HTMLVideoElement : HTMLMediaElement {
     36  [HTMLConstructor] constructor();
     37 
     38  [CEReactions, SetterThrows]
     39           attribute unsigned long width;
     40  [CEReactions, SetterThrows]
     41           attribute unsigned long height;
     42  readonly attribute unsigned long videoWidth;
     43  readonly attribute unsigned long videoHeight;
     44  [CEReactions, SetterThrows]
     45           attribute DOMString poster;
     46 };
     47 
     48 partial interface HTMLVideoElement {
     49  // A count of the number of video frames that have demuxed from the media
     50  // resource. If we were playing perfectly, we'd be able to paint this many
     51  // frames.
     52  readonly attribute unsigned long mozParsedFrames;
     53 
     54  // A count of the number of frames that have been decoded. We may drop
     55  // frames if the decode is taking too much time.
     56  readonly attribute unsigned long mozDecodedFrames;
     57 
     58  // A count of the number of frames that have been presented to the rendering
     59  // pipeline. We may drop frames if they arrive late at the renderer.
     60  readonly attribute unsigned long mozPresentedFrames;
     61 
     62  // Number of presented frames which were painted on screen.
     63  readonly attribute unsigned long mozPaintedFrames;
     64 
     65  // Time which the last painted video frame was late by, in seconds.
     66  readonly attribute double mozFrameDelay;
     67 
     68  // True if the video has an audio track available.
     69  readonly attribute boolean mozHasAudio;
     70 
     71  // Clones the frames playing in this <video> to the target. Cloning ends
     72  // when either node is removed from their DOM trees. Throws if one or
     73  // both <video> elements are not attached to a DOM tree.
     74  // Returns a promise that resolves when the target's ImageContainer has been
     75  // installed in this <video>'s MediaDecoder, or selected video
     76  // MediaStreamTrack, whichever is available first. Note that it might never
     77  // resolve.
     78  [NewObject, Func="IsChromeOrUAWidget"]
     79    Promise<undefined> cloneElementVisually(HTMLVideoElement target);
     80 
     81  // Stops a <video> from cloning visually. Does nothing if the <video>
     82  // wasn't cloning in the first place.
     83  [Func="IsChromeOrUAWidget"]
     84    undefined stopCloningElementVisually();
     85 
     86  // Returns true if the <video> is being cloned visually to another
     87  // <video> element (see cloneElementVisually).
     88  [Func="IsChromeOrUAWidget"]
     89    readonly attribute boolean isCloningElementVisually;
     90 };
     91 
     92 // https://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html#idl-def-HTMLVideoElement
     93 partial interface HTMLVideoElement {
     94  [Pref="media.mediasource.enabled", NewObject]
     95  VideoPlaybackQuality getVideoPlaybackQuality();
     96 };
     97 
     98 // https://w3c.github.io/picture-in-picture/#htmlvideoelement-extensions
     99 partial interface HTMLVideoElement {
    100  [CEReactions, SetterThrows] attribute boolean disablePictureInPicture;
    101 };
    102 
    103 // https://wicg.github.io/video-rvfc
    104 partial interface HTMLVideoElement {
    105  [Pref="media.rvfc.enabled", Throws]
    106  unsigned long requestVideoFrameCallback(VideoFrameRequestCallback callback);
    107 
    108  [Pref="media.rvfc.enabled"]
    109  undefined cancelVideoFrameCallback(unsigned long handle);
    110 };