MediaRecorder.stream
MediaRecorder.stream
は読み取り専用プロパティで、 MediaRecorder
を作成したときに MediaRecorder()
コンストラクターに渡したストリームを返します。
値
最初に MediaRecorder
を作成したとき MediaRecorde()
コンストラクターに渡した MediaStream
です。
例
js
if (navigator.getUserMedia) {
console.log("getUserMediaがサポートされています。");
navigator.getUserMedia(
// 制約 - このアプリに必要なのは音声のみ
{
audio: true,
},
// 成功コールバック
(stream) => {
const mediaRecorder = new MediaRecorder(stream);
const myStream = mediaRecorder.stream;
console.log(myStream);
},
);
}
仕様書
Specification |
---|
MediaStream Recording # dom-mediarecorder-stream |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
stream |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
関連情報
- MediaStream 収録 API の使用
- ウェブディクタフォン: MediaRecorder + getUserMedia + ウェブオーディオ API 可視化デモ、Chris Mills 著(GitHub のソース)。(英語)
- simpl.info の MediaStream Recording のデモ、Sam Dutton 著。(英語)
Navigator.getUserMedia