Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. MediaStreamAudioSourceNode
  4. mediaStream

MediaStreamAudioSourceNode: mediaStream property

Baseline Widely available

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

TheMediaStreamAudioSourceNode interface'sread-onlymediaStream property indicates theMediaStream that contains the audio track from which the node isreceiving audio.

This stream was specified when the node was first created,either using theMediaStreamAudioSourceNode()constructor or theAudioContext.createMediaStreamSource() method.

Value

AMediaStream representing the stream which contains theMediaStreamTrack serving as the source of audio for the node.

Theuser agent uses the first audio track it finds on the specifiedstream as the audio source for this node. However, there is no way to be certain whichtrack that will be on multi-track streams. If the specific track matters to you, or youneed to have access to the track itself, you should use aMediaStreamTrackAudioSourceNode instead.

Examples

js
const audioCtx = new window.AudioContext();let options = {  mediaStream: stream,};let source = new MediaStreamAudioSourceNode(audioCtx, options);console.log(source.mediaStream);

Specifications

Specification
Web Audio API
# dom-mediastreamaudiosourcenode-mediastream

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp