2013-05-21 20:14:00 +04: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
|
|
|
|
* http://www.whatwg.org/specs/web-apps/current-work/#texttrackcue
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum AutoKeyword { "auto" };
|
|
|
|
|
2013-12-13 18:44:50 +04:00
|
|
|
enum AlignSetting {
|
2013-05-21 20:14:00 +04:00
|
|
|
"start",
|
|
|
|
"middle",
|
|
|
|
"end",
|
|
|
|
"left",
|
|
|
|
"right"
|
|
|
|
};
|
|
|
|
|
2013-09-12 18:07:14 +04:00
|
|
|
enum DirectionSetting {
|
|
|
|
"",
|
|
|
|
"rl",
|
|
|
|
"lr"
|
|
|
|
};
|
|
|
|
|
2013-05-21 20:14:00 +04:00
|
|
|
[Constructor(double startTime, double endTime, DOMString text),
|
|
|
|
Pref="media.webvtt.enabled"]
|
2013-08-28 00:07:00 +04:00
|
|
|
interface VTTCue : EventTarget {
|
2013-05-21 20:14:00 +04:00
|
|
|
readonly attribute TextTrack? track;
|
|
|
|
|
|
|
|
attribute DOMString id;
|
|
|
|
attribute double startTime;
|
|
|
|
attribute double endTime;
|
|
|
|
attribute boolean pauseOnExit;
|
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;
|
2014-01-15 20:04:00 +04:00
|
|
|
attribute (long or AutoKeyword) line;
|
2013-07-24 22:18:54 +04:00
|
|
|
[SetterThrows]
|
2013-12-13 18:29:15 +04:00
|
|
|
attribute AlignSetting lineAlign;
|
|
|
|
[SetterThrows]
|
2013-05-21 20:14:00 +04:00
|
|
|
attribute long position;
|
2013-07-24 22:18:54 +04:00
|
|
|
[SetterThrows]
|
2013-12-13 21:57:48 +04:00
|
|
|
attribute AlignSetting positionAlign;
|
|
|
|
[SetterThrows]
|
2013-05-21 20:14:00 +04:00
|
|
|
attribute long 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-09-17 15:01:28 +04:00
|
|
|
attribute EventHandler onenter;
|
2013-05-21 20:14:00 +04:00
|
|
|
|
2013-09-17 15:01:28 +04:00
|
|
|
attribute EventHandler onexit;
|
2013-05-21 20:14:00 +04:00
|
|
|
};
|
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;
|
2013-12-12 20:27:30 +04:00
|
|
|
};
|