tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

MediaRecorder.webidl (1798B)


      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 */
     12 
     13 
     14 enum BitrateMode { "constant", "variable" };
     15 
     16 enum RecordingState { "inactive", "recording", "paused" };
     17 
     18 [Exposed=Window]
     19 interface MediaRecorder : EventTarget {
     20  [Throws]
     21  constructor(MediaStream stream, optional MediaRecorderOptions options = {});
     22  [Throws]
     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;
     36 
     37 
     38  [Throws]
     39  undefined start(optional unsigned long timeslice);
     40  [Throws]
     41  undefined stop();
     42  [Throws]
     43  undefined pause();
     44  [Throws]
     45  undefined resume();
     46  [Throws]
     47  undefined requestData();
     48 
     49  static boolean isTypeSupported(DOMString type);
     50 };
     51 
     52 dictionary MediaRecorderOptions {
     53  DOMString mimeType = "";
     54  unsigned long audioBitsPerSecond;
     55  unsigned long videoBitsPerSecond;
     56  unsigned long bitsPerSecond;
     57 };