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 attribute VTTRegion? region;
45 attribute DirectionSetting vertical;
46 attribute boolean snapToLines;
47 attribute (double or AutoKeyword) line;
49 attribute LineAlignSetting lineAlign;
51 attribute (double or AutoKeyword) position;
53 attribute PositionAlignSetting positionAlign;
55 attribute double size;
56 attribute AlignSetting align;
57 attribute DOMString text;
58 DocumentFragment getCueAsHTML();
61 // Mozilla extensions.
62 partial interface VTTCue {
64 attribute HTMLDivElement? displayState;
66 readonly attribute boolean hasBeenReset;
68 readonly attribute double computedLine;
70 readonly attribute double computedPosition;
72 readonly attribute PositionAlignSetting computedPositionAlign;
74 readonly attribute boolean getActive;