Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / MediaRecorder.webidl
blobd106d5978c145593a32d4d489912a220b2988fc0
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  * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
8  *
9  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10  * liability, trademark and document use rules apply.
11  */
13 enum RecordingState { "inactive", "recording", "paused" };
15 [Exposed=Window]
16 interface MediaRecorder : EventTarget {
17   [Throws]
18   constructor(MediaStream stream, optional MediaRecorderOptions options = {});
19   [Throws]
20   constructor(AudioNode node, optional unsigned long output = 0,
21               optional MediaRecorderOptions options = {});
22   readonly attribute MediaStream stream;
23   readonly attribute DOMString mimeType;
24   readonly attribute RecordingState state;
25   attribute EventHandler onstart;
26   attribute EventHandler onstop;
27   attribute EventHandler ondataavailable;
28   attribute EventHandler onpause;
29   attribute EventHandler onresume;
30   attribute EventHandler onerror;
31   readonly attribute unsigned long videoBitsPerSecond;
32   readonly attribute unsigned long audioBitsPerSecond;
35   [Throws]
36   undefined start(optional unsigned long timeslice);
37   [Throws]
38   undefined stop();
39   [Throws]
40   undefined pause();
41   [Throws]
42   undefined resume();
43   [Throws]
44   undefined requestData();
46   static boolean isTypeSupported(DOMString type);
49 dictionary MediaRecorderOptions {
50   DOMString mimeType = "";
51   unsigned long audioBitsPerSecond;
52   unsigned long videoBitsPerSecond;
53   unsigned long bitsPerSecond;