2013-05-21 16:14:00 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
2015-07-29 10:41:00 +00:00
|
|
|
* http://dev.w3.org/html5/webvtt/#the-vttcue-interface
|
2013-05-21 16:14:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum AutoKeyword { "auto" };
|
|
|
|
|
2016-06-06 01:53:16 +00:00
|
|
|
enum LineAlignSetting {
|
|
|
|
"start",
|
|
|
|
"center",
|
|
|
|
"end"
|
|
|
|
};
|
|
|
|
|
2016-06-02 02:40:23 +00:00
|
|
|
enum PositionAlignSetting {
|
|
|
|
"line-left",
|
|
|
|
"center",
|
|
|
|
"line-right",
|
|
|
|
"auto"
|
|
|
|
};
|
|
|
|
|
2013-12-13 14:44:50 +00:00
|
|
|
enum AlignSetting {
|
2013-05-21 16:14:00 +00:00
|
|
|
"start",
|
2016-06-14 13:39:29 +00:00
|
|
|
"center",
|
2013-05-21 16:14:00 +00:00
|
|
|
"end",
|
|
|
|
"left",
|
|
|
|
"right"
|
|
|
|
};
|
|
|
|
|
2013-09-12 14:07:14 +00:00
|
|
|
enum DirectionSetting {
|
|
|
|
"",
|
|
|
|
"rl",
|
|
|
|
"lr"
|
|
|
|
};
|
|
|
|
|
2016-09-15 21:10:17 +00:00
|
|
|
[Constructor(double startTime, double endTime, DOMString text)]
|
2015-07-29 10:41:00 +00:00
|
|
|
interface VTTCue : TextTrackCue {
|
2014-03-12 17:55:45 +00:00
|
|
|
[Pref="media.webvtt.regions.enabled"]
|
2014-03-11 17:33:58 +00:00
|
|
|
attribute VTTRegion? region;
|
2013-09-12 14:07:14 +00:00
|
|
|
attribute DirectionSetting vertical;
|
2013-05-21 16:14:00 +00:00
|
|
|
attribute boolean snapToLines;
|
2016-06-14 10:47:32 +00:00
|
|
|
attribute (double or AutoKeyword) line;
|
2013-07-24 18:18:54 +00:00
|
|
|
[SetterThrows]
|
2016-06-06 01:53:16 +00:00
|
|
|
attribute LineAlignSetting lineAlign;
|
2013-12-13 14:29:15 +00:00
|
|
|
[SetterThrows]
|
2016-06-15 15:51:17 +00:00
|
|
|
attribute (double or AutoKeyword) position;
|
2013-07-24 18:18:54 +00:00
|
|
|
[SetterThrows]
|
2016-06-02 02:40:23 +00:00
|
|
|
attribute PositionAlignSetting positionAlign;
|
2013-12-13 17:57:48 +00:00
|
|
|
[SetterThrows]
|
2016-06-14 10:51:40 +00:00
|
|
|
attribute double size;
|
2013-12-13 14:44:50 +00:00
|
|
|
attribute AlignSetting align;
|
2013-05-21 16:14:00 +00:00
|
|
|
attribute DOMString text;
|
|
|
|
DocumentFragment getCueAsHTML();
|
|
|
|
};
|
2013-12-12 16:27:30 +00:00
|
|
|
|
|
|
|
// Mozilla extensions.
|
|
|
|
partial interface VTTCue {
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute HTMLDivElement? displayState;
|
2013-12-12 18:13:38 +00:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean hasBeenReset;
|
2016-06-02 02:40:23 +00:00
|
|
|
[ChromeOnly]
|
2016-06-14 10:47:32 +00:00
|
|
|
readonly attribute double computedLine;
|
|
|
|
[ChromeOnly]
|
2016-06-15 15:51:17 +00:00
|
|
|
readonly attribute double computedPosition;
|
|
|
|
[ChromeOnly]
|
2016-06-02 02:40:23 +00:00
|
|
|
readonly attribute PositionAlignSetting computedPositionAlign;
|
2017-05-18 03:02:25 +00:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean getActive;
|
2013-12-12 16:27:30 +00:00
|
|
|
};
|