Bug 1526591 - Remove devtools.inspector.shapesHighlighter.enabled pref. r=rcaliman
[gecko.git] / dom / webidl / SourceBuffer.webidl
blob0e2eaa58f6ec19a7e7937f65215d13bd2619b786
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * http://dvcs.w3.org/hg/html-media/raw-file/default/media-source/media-source.html
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 enum SourceBufferAppendMode {
14     "segments",
15     "sequence"
18 [Func="mozilla::dom::MediaSource::Enabled"]
19 interface SourceBuffer : EventTarget {
20   [SetterThrows]
21   attribute SourceBufferAppendMode mode;
22   readonly attribute boolean updating;
23   [Throws]
24   readonly attribute TimeRanges buffered;
25   [SetterThrows]
26   attribute double timestampOffset;
27   //readonly attribute AudioTrackList audioTracks;
28   //readonly attribute VideoTrackList videoTracks;
29   //readonly attribute TextTrackList textTracks;
30   [SetterThrows]
31   attribute double appendWindowStart;
32   [SetterThrows]
33   attribute unrestricted double appendWindowEnd;
34   attribute EventHandler onupdatestart;
35   attribute EventHandler onupdate;
36   attribute EventHandler onupdateend;
37   attribute EventHandler onerror;
38   attribute EventHandler onabort;
39   [Throws]
40   void appendBuffer(ArrayBuffer data);
41   [Throws]
42   void appendBuffer(ArrayBufferView data);
43   // Experimental function as proposed in:
44   // https://github.com/w3c/media-source/issues/100 for promise proposal.
45   [Throws, Func="mozilla::dom::MediaSource::ExperimentalEnabled"]
46   Promise<void> appendBufferAsync(ArrayBuffer data);
47   [Throws, Func="mozilla::dom::MediaSource::ExperimentalEnabled"]
48   Promise<void> appendBufferAsync(ArrayBufferView data);
49   //[Throws]
50   //void appendStream(Stream stream, [EnforceRange] optional unsigned long long maxSize);
51   [Throws]
52   void abort();
53   [Throws]
54   void remove(double start, unrestricted double end);
55   // Experimental function as proposed in:
56   // https://github.com/w3c/media-source/issues/100 for promise proposal.
57   [Throws, Func="mozilla::dom::MediaSource::ExperimentalEnabled"]
58   Promise<void> removeAsync(double start, unrestricted double end);
59   // Experimental function as proposed in:
60   // https://github.com/w3c/media-source/issues/155
61   [Throws]
62   void changeType(DOMString type);