2013-05-21 09:14:00 -07: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 06:44:50 -08:00
|
|
|
enum AlignSetting {
|
2013-05-21 09:14:00 -07:00
|
|
|
"start",
|
|
|
|
"middle",
|
|
|
|
"end",
|
|
|
|
"left",
|
|
|
|
"right"
|
|
|
|
};
|
|
|
|
|
2013-09-12 07:07:14 -07:00
|
|
|
enum DirectionSetting {
|
|
|
|
"",
|
|
|
|
"rl",
|
|
|
|
"lr"
|
|
|
|
};
|
|
|
|
|
2013-05-21 09:14:00 -07:00
|
|
|
[Constructor(double startTime, double endTime, DOMString text),
|
|
|
|
Pref="media.webvtt.enabled"]
|
2013-08-27 13:07:00 -07:00
|
|
|
interface VTTCue : EventTarget {
|
2013-05-21 09:14:00 -07:00
|
|
|
readonly attribute TextTrack? track;
|
|
|
|
|
|
|
|
attribute DOMString id;
|
|
|
|
attribute double startTime;
|
|
|
|
attribute double endTime;
|
|
|
|
attribute boolean pauseOnExit;
|
2013-09-18 10:29:20 -07:00
|
|
|
attribute DOMString regionId;
|
2013-09-12 07:07:14 -07:00
|
|
|
attribute DirectionSetting vertical;
|
2013-05-21 09:14:00 -07:00
|
|
|
attribute boolean snapToLines;
|
2014-01-15 08:04:00 -08:00
|
|
|
attribute (long or AutoKeyword) line;
|
2013-07-24 11:18:54 -07:00
|
|
|
[SetterThrows]
|
2013-12-13 06:29:15 -08:00
|
|
|
attribute AlignSetting lineAlign;
|
|
|
|
[SetterThrows]
|
2013-05-21 09:14:00 -07:00
|
|
|
attribute long position;
|
2013-07-24 11:18:54 -07:00
|
|
|
[SetterThrows]
|
2013-12-13 09:57:48 -08:00
|
|
|
attribute AlignSetting positionAlign;
|
|
|
|
[SetterThrows]
|
2013-05-21 09:14:00 -07:00
|
|
|
attribute long size;
|
2013-12-13 06:44:50 -08:00
|
|
|
attribute AlignSetting align;
|
2013-05-21 09:14:00 -07:00
|
|
|
attribute DOMString text;
|
|
|
|
DocumentFragment getCueAsHTML();
|
|
|
|
|
2013-09-17 04:01:28 -07:00
|
|
|
attribute EventHandler onenter;
|
2013-05-21 09:14:00 -07:00
|
|
|
|
2013-09-17 04:01:28 -07:00
|
|
|
attribute EventHandler onexit;
|
2013-05-21 09:14:00 -07:00
|
|
|
};
|
2013-12-12 08:27:30 -08:00
|
|
|
|
|
|
|
// Mozilla extensions.
|
|
|
|
partial interface VTTCue {
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute HTMLDivElement? displayState;
|
2013-12-12 10:13:38 -08:00
|
|
|
[ChromeOnly]
|
|
|
|
readonly attribute boolean hasBeenReset;
|
2013-12-12 08:27:30 -08:00
|
|
|
};
|