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/.
6 * The origin of this IDL file is
7 * http://www.whatwg.org/specs/web-apps/current-work/#texttrackcue
10 enum AutoKeyword { "auto" };
20 enum DirectionSetting {
26 [Constructor(double startTime, double endTime, DOMString text),
27 Pref="media.webvtt.enabled"]
28 interface VTTCue : EventTarget {
29 readonly attribute TextTrack? track;
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;
41 attribute AlignSetting lineAlign;
43 attribute long position;
45 attribute AlignSetting positionAlign;
48 attribute AlignSetting align;
49 attribute DOMString text;
50 DocumentFragment getCueAsHTML();
52 attribute EventHandler onenter;
54 attribute EventHandler onexit;
57 // Mozilla extensions.
58 partial interface VTTCue {
60 attribute HTMLDivElement? displayState;
62 readonly attribute boolean hasBeenReset;