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.
13 enum RecordingState { "inactive", "recording", "paused" };
16 interface MediaRecorder : EventTarget {
18 constructor(MediaStream stream, optional MediaRecorderOptions options = {});
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;
36 undefined start(optional unsigned long timeslice);
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;