2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-05-21 20:14:00 +04:00
|
|
|
/* 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 13:41:00 +03:00
|
|
|
* http://dev.w3.org/html5/webvtt/#the-vttcue-interface
|
2013-05-21 20:14:00 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum AutoKeyword { "auto" };
|
|
|
|
|
2016-06-06 04:53:16 +03:00
|
|
|
enum LineAlignSetting {
|
|
|
|
"start",
|
|
|
|
"center",
|
|
|
|
"end"
|
|
|
|
};
|
|
|
|
|
2016-06-02 05:40:23 +03:00
|
|
|
enum PositionAlignSetting {
|
|
|
|
"line-left",
|
|
|
|
"center",
|
|
|
|
"line-right",
|
|
|
|
"auto"
|
|
|
|
};
|
|
|
|
|
2013-12-13 18:44:50 +04:00
|
|
|
enum AlignSetting {
|
2013-05-21 20:14:00 +04:00
|
|
|
"start",
|
2016-06-14 16:39:29 +03:00
|
|
|
"center",
|
2013-05-21 20:14:00 +04:00
|
|
|
"end",
|
|
|
|
"left",
|
|
|
|
"right"
|
|
|
|
};
|
|
|
|
|
2013-09-12 18:07:14 +04:00
|
|
|
enum DirectionSetting {
|
|
|
|
"",
|
|
|
|
"rl",
|
|
|
|
"lr"
|
|
|
|
};
|
|
|
|
|
2015-07-29 13:41:00 +03:00
|
|
|
interface VTTCue : TextTrackCue {
|
2019-09-12 14:01:17 +03:00
|
|
|
[Throws]
|
|
|
|
constructor(double startTime, double endTime, DOMString text);
|
|
|
|
|
2014-03-12 21:55:45 +04:00
|
|
|
[Pref="media.webvtt.regions.enabled"]
|
2014-03-11 21:33:58 +04:00
|
|
|
attribute VTTRegion? region;
|
2013-09-12 18:07:14 +04:00
|
|
|
attribute DirectionSetting vertical;
|
2013-05-21 20:14:00 +04:00
|
|
|
attribute boolean snapToLines;
|
2016-06-14 13:47:32 +03:00
|
|
|
attribute (double or AutoKeyword) line;
|
2013-07-24 22:18:54 +04:00
|
|
|
[SetterThrows]
|
2016-06-06 04:53:16 +03:00
|
|
|
attribute LineAlignSetting lineAlign;
|
2013-12-13 18:29:15 +04:00
|
|
|
[SetterThrows]
|
2016-06-15 18:51:17 +03:00
|
|
|
attribute (double or AutoKeyword) position;
|
2013-07-24 22:18:54 +04:00
|
|
|
[SetterThrows]
|
2016-06-02 05:40:23 +03:00
|
|
|
attribute PositionAlignSetting positionAlign;
|
2013-12-13 21:57:48 +04:00
|
|
|
[SetterThrows]
|
2016-06-14 13:51:40 +03:00
|
|
|
attribute double size;
|
2013-12-13 18:44:50 +04:00
|
|
|
attribute AlignSetting align;
|
2013-05-21 20:14:00 +04:00
|
|
|
attribute DOMString text;
|
|
|
|
DocumentFragment getCueAsHTML();
|
|
|
|
};
|
2013-12-12 20:27:30 +04:00
|
|
|
|
|
|
|
// Mozilla extensions.
|
|
|
|
partial interface VTTCue {
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute HTMLDivElement? displayState;
|
2013-12-12 22:13:38 +04:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean hasBeenReset;
|
2016-06-02 05:40:23 +03:00
|
|
|
[ChromeOnly]
|
2016-06-14 13:47:32 +03:00
|
|
|
readonly attribute double computedLine;
|
|
|
|
[ChromeOnly]
|
2016-06-15 18:51:17 +03:00
|
|
|
readonly attribute double computedPosition;
|
|
|
|
[ChromeOnly]
|
2016-06-02 05:40:23 +03:00
|
|
|
readonly attribute PositionAlignSetting computedPositionAlign;
|
2017-05-18 06:02:25 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean getActive;
|
2013-12-12 20:27:30 +04:00
|
|
|
};
|