dom/webidl/VTTCue.webidl

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:8d0435a197b2
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 * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcue
8 */
9
10 enum AutoKeyword { "auto" };
11
12 enum AlignSetting {
13 "start",
14 "middle",
15 "end",
16 "left",
17 "right"
18 };
19
20 enum DirectionSetting {
21 "",
22 "rl",
23 "lr"
24 };
25
26 [Constructor(double startTime, double endTime, DOMString text),
27 Pref="media.webvtt.enabled"]
28 interface VTTCue : EventTarget {
29 readonly attribute TextTrack? track;
30
31 attribute DOMString id;
32 attribute double startTime;
33 attribute double endTime;
34 attribute boolean pauseOnExit;
35 [Pref="media.webvtt.regions.enabled"]
36 attribute VTTRegion? region;
37 attribute DirectionSetting vertical;
38 attribute boolean snapToLines;
39 attribute (long or AutoKeyword) line;
40 [SetterThrows]
41 attribute AlignSetting lineAlign;
42 [SetterThrows]
43 attribute long position;
44 [SetterThrows]
45 attribute AlignSetting positionAlign;
46 [SetterThrows]
47 attribute long size;
48 attribute AlignSetting align;
49 attribute DOMString text;
50 DocumentFragment getCueAsHTML();
51
52 attribute EventHandler onenter;
53
54 attribute EventHandler onexit;
55 };
56
57 // Mozilla extensions.
58 partial interface VTTCue {
59 [ChromeOnly]
60 attribute HTMLDivElement? displayState;
61 [ChromeOnly]
62 readonly attribute boolean hasBeenReset;
63 };

mercurial