Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. MediaRecorder
  4. stream

MediaRecorder: stream property

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨April 2021⁩.

Thestream read-only property of theMediaRecorder interface returns the stream that was passed into theMediaRecorder() constructor when theMediaRecorder was created.

Value

TheMediaStream passed into theMediaRecorder() constructor when theMediaRecorder was originally created.

Examples

js
if (navigator.getUserMedia) {  console.log("getUserMedia supported.");  navigator.getUserMedia(    // constraints - only audio needed for this app    {      audio: true,    },    // Success callback    (stream) => {      const mediaRecorder = new MediaRecorder(stream);      const myStream = mediaRecorder.stream;      console.log(myStream);    },  );}

Specifications

Specification
MediaStream Recording
# dom-mediarecorder-stream

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp