dom/webidl/VTTCue.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/VTTCue.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + *
     1.9 + * The origin of this IDL file is
    1.10 + * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcue
    1.11 + */
    1.12 +
    1.13 +enum AutoKeyword { "auto" };
    1.14 +
    1.15 +enum AlignSetting {
    1.16 +  "start",
    1.17 +  "middle",
    1.18 +  "end",
    1.19 +  "left",
    1.20 +  "right"
    1.21 +};
    1.22 +
    1.23 +enum DirectionSetting {
    1.24 +  "",
    1.25 +  "rl",
    1.26 +  "lr"
    1.27 +};
    1.28 +
    1.29 +[Constructor(double startTime, double endTime, DOMString text),
    1.30 + Pref="media.webvtt.enabled"]
    1.31 +interface VTTCue : EventTarget {
    1.32 +  readonly attribute TextTrack? track;
    1.33 +
    1.34 +  attribute DOMString id;
    1.35 +  attribute double startTime;
    1.36 +  attribute double endTime;
    1.37 +  attribute boolean pauseOnExit;
    1.38 +  [Pref="media.webvtt.regions.enabled"]
    1.39 +  attribute VTTRegion? region;
    1.40 +  attribute DirectionSetting vertical;
    1.41 +  attribute boolean snapToLines;
    1.42 +  attribute (long or AutoKeyword) line;
    1.43 +  [SetterThrows]
    1.44 +  attribute AlignSetting lineAlign;
    1.45 +  [SetterThrows]
    1.46 +  attribute long position;
    1.47 +  [SetterThrows]
    1.48 +  attribute AlignSetting positionAlign;
    1.49 +  [SetterThrows]
    1.50 +  attribute long size;
    1.51 +  attribute AlignSetting align;
    1.52 +  attribute DOMString text;
    1.53 +  DocumentFragment getCueAsHTML();
    1.54 +
    1.55 +  attribute EventHandler onenter;
    1.56 +
    1.57 +  attribute EventHandler onexit;
    1.58 +};
    1.59 +
    1.60 +// Mozilla extensions.
    1.61 +partial interface VTTCue {
    1.62 +  [ChromeOnly]
    1.63 +  attribute HTMLDivElement? displayState;
    1.64 +  [ChromeOnly]
    1.65 +  readonly attribute boolean hasBeenReset;
    1.66 +};

mercurial