michael@0: /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: * michael@0: * The origin of this IDL file is michael@0: * http://www.whatwg.org/specs/web-apps/current-work/#texttrack michael@0: */ michael@0: michael@0: enum TextTrackKind { michael@0: "subtitles", michael@0: "captions", michael@0: "descriptions", michael@0: "chapters", michael@0: "metadata" michael@0: }; michael@0: michael@0: enum TextTrackMode { michael@0: "disabled", michael@0: "hidden", michael@0: "showing" michael@0: }; michael@0: michael@0: [Pref="media.webvtt.enabled"] michael@0: interface TextTrack : EventTarget { michael@0: readonly attribute TextTrackKind kind; michael@0: readonly attribute DOMString label; michael@0: readonly attribute DOMString language; michael@0: michael@0: readonly attribute DOMString id; michael@0: readonly attribute DOMString inBandMetadataTrackDispatchType; michael@0: michael@0: attribute TextTrackMode mode; michael@0: michael@0: readonly attribute TextTrackCueList? cues; michael@0: readonly attribute TextTrackCueList? activeCues; michael@0: michael@0: void addCue(VTTCue cue); michael@0: [Throws] michael@0: void removeCue(VTTCue cue); michael@0: michael@0: //(Not implemented)attribute EventHandler oncuechange; michael@0: }; michael@0: michael@0: // Mozilla Extensions michael@0: partial interface TextTrack { michael@0: [ChromeOnly] michael@0: readonly attribute TextTrackList? textTrackList; michael@0: };