dom/webidl/TextTrack.webidl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/webidl/TextTrack.webidl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,49 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.7 + * You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + *
     1.9 + * The origin of this IDL file is
    1.10 + * http://www.whatwg.org/specs/web-apps/current-work/#texttrack
    1.11 + */
    1.12 +
    1.13 +enum TextTrackKind {
    1.14 +  "subtitles",
    1.15 +  "captions",
    1.16 +  "descriptions",
    1.17 +  "chapters",
    1.18 +  "metadata"
    1.19 +};
    1.20 +
    1.21 +enum TextTrackMode {
    1.22 +  "disabled",
    1.23 +  "hidden",
    1.24 +  "showing"
    1.25 +};
    1.26 +
    1.27 +[Pref="media.webvtt.enabled"]
    1.28 +interface TextTrack : EventTarget {
    1.29 +  readonly attribute TextTrackKind kind;
    1.30 +  readonly attribute DOMString label;
    1.31 +  readonly attribute DOMString language;
    1.32 +
    1.33 +  readonly attribute DOMString id;
    1.34 +  readonly attribute DOMString inBandMetadataTrackDispatchType;
    1.35 +
    1.36 +           attribute TextTrackMode mode;
    1.37 +
    1.38 +  readonly attribute TextTrackCueList? cues;
    1.39 +  readonly attribute TextTrackCueList? activeCues;
    1.40 +
    1.41 +  void addCue(VTTCue cue);
    1.42 +  [Throws]
    1.43 +  void removeCue(VTTCue cue);
    1.44 +
    1.45 +           //(Not implemented)attribute EventHandler oncuechange;
    1.46 +};
    1.47 +
    1.48 +// Mozilla Extensions
    1.49 +partial interface TextTrack {
    1.50 +  [ChromeOnly]
    1.51 +  readonly attribute TextTrackList? textTrackList;
    1.52 +};

mercurial