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://dev.w3.org/html5/webvtt/#the-vttcue-interface
10 enum AutoKeyword { "auto" };
12 enum LineAlignSetting {
18 enum PositionAlignSetting {
33 enum DirectionSetting {
40 interface VTTCue : TextTrackCue {
42 constructor(double startTime, double endTime, DOMString text);
44 [Pref="media.webvtt.regions.enabled"]
45 attribute VTTRegion? region;
46 attribute DirectionSetting vertical;
47 attribute boolean snapToLines;
48 attribute (double or AutoKeyword) line;
50 attribute LineAlignSetting lineAlign;
52 attribute (double or AutoKeyword) position;
54 attribute PositionAlignSetting positionAlign;
56 attribute double size;
57 attribute AlignSetting align;
58 attribute DOMString text;
59 DocumentFragment getCueAsHTML();
62 // Mozilla extensions.
63 partial interface VTTCue {
65 attribute HTMLDivElement? displayState;
67 readonly attribute boolean hasBeenReset;
69 readonly attribute double computedLine;
71 readonly attribute double computedPosition;
73 readonly attribute PositionAlignSetting computedPositionAlign;
75 readonly attribute boolean getActive;