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/.
6 * The origin of this IDL file is
7 * https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
9 * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
10 * liability, trademark and document use rules apply.
14 enum BitrateMode { "constant", "variable" };
16 enum RecordingState { "inactive", "recording", "paused" };
19 interface MediaRecorder : EventTarget {
21 constructor(MediaStream stream, optional MediaRecorderOptions options = {});
23 constructor(AudioNode node, optional unsigned long output = 0,
24 optional MediaRecorderOptions options = {});
25 readonly attribute MediaStream stream;
26 readonly attribute DOMString mimeType;
27 readonly attribute RecordingState state;
28 attribute EventHandler onstart;
29 attribute EventHandler onstop;
30 attribute EventHandler ondataavailable;
31 attribute EventHandler onpause;
32 attribute EventHandler onresume;
33 attribute EventHandler onerror;
34 readonly attribute unsigned long videoBitsPerSecond;
35 readonly attribute unsigned long audioBitsPerSecond;
39 undefined start(optional unsigned long timeslice);
47 undefined requestData();
49 static boolean isTypeSupported(DOMString type);
52 dictionary MediaRecorderOptions {
53 DOMString mimeType = "";
54 unsigned long audioBitsPerSecond;
55 unsigned long videoBitsPerSecond;
56 unsigned long bitsPerSecond;