2018-09-13 20:04:55 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2013-07-05 01:50:25 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
|
|
|
* You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* https://dvcs.w3.org/hg/dap/raw-file/default/media-stream-capture/MediaRecorder.html
|
|
|
|
*
|
|
|
|
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
|
|
|
|
* liability, trademark and document use rules apply.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum RecordingState { "inactive", "recording", "paused" };
|
|
|
|
|
2019-09-27 15:26:14 +00:00
|
|
|
[Exposed=Window]
|
2013-07-05 01:50:25 +00:00
|
|
|
interface MediaRecorder : EventTarget {
|
2019-09-12 11:01:17 +00:00
|
|
|
[Throws]
|
|
|
|
constructor(MediaStream stream, optional MediaRecorderOptions options = {});
|
|
|
|
[Throws]
|
|
|
|
constructor(AudioNode node, optional unsigned long output = 0,
|
|
|
|
optional MediaRecorderOptions options = {});
|
2013-07-05 01:50:25 +00:00
|
|
|
readonly attribute MediaStream stream;
|
2018-11-13 12:50:04 +00:00
|
|
|
readonly attribute DOMString mimeType;
|
2013-07-05 01:50:25 +00:00
|
|
|
readonly attribute RecordingState state;
|
2018-11-13 12:50:04 +00:00
|
|
|
attribute EventHandler onstart;
|
|
|
|
attribute EventHandler onstop;
|
2013-07-05 01:50:25 +00:00
|
|
|
attribute EventHandler ondataavailable;
|
2018-11-13 12:50:04 +00:00
|
|
|
attribute EventHandler onpause;
|
|
|
|
attribute EventHandler onresume;
|
|
|
|
attribute EventHandler onerror;
|
2019-10-04 08:53:36 +00:00
|
|
|
readonly attribute unsigned long videoBitsPerSecond;
|
|
|
|
readonly attribute unsigned long audioBitsPerSecond;
|
2013-07-05 01:50:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
[Throws]
|
2019-06-13 08:40:42 +00:00
|
|
|
void start(optional unsigned long timeslice);
|
2013-07-05 01:50:25 +00:00
|
|
|
[Throws]
|
|
|
|
void stop();
|
2013-07-14 07:31:59 +00:00
|
|
|
[Throws]
|
|
|
|
void pause();
|
|
|
|
[Throws]
|
|
|
|
void resume();
|
2013-07-05 01:50:25 +00:00
|
|
|
[Throws]
|
|
|
|
void requestData();
|
2016-03-07 03:48:16 +00:00
|
|
|
|
|
|
|
static boolean isTypeSupported(DOMString type);
|
2013-07-05 01:50:25 +00:00
|
|
|
};
|
|
|
|
|
2014-03-19 06:52:45 +00:00
|
|
|
dictionary MediaRecorderOptions {
|
2019-10-03 22:09:38 +00:00
|
|
|
DOMString mimeType = "";
|
2015-05-25 15:49:03 +00:00
|
|
|
unsigned long audioBitsPerSecond;
|
|
|
|
unsigned long videoBitsPerSecond;
|
|
|
|
unsigned long bitsPerSecond;
|
2014-03-19 06:52:45 +00:00
|
|
|
};
|