Table of Contents

Class MediaStreamAudioSourceNode

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The MediaStreamAudioSourceNode interface is a type of AudioNode which operates as an audio source whose media is received from a MediaStream obtained using the WebRTC or Media Capture and Streams APIs.

[Value("MediaStreamAudioSourceNode")]
public class MediaStreamAudioSourceNode : AudioNode
Inheritance
MediaStreamAudioSourceNode
Inherited Members

Remarks

This media could be from a microphone (through GetUserMedia(MediaStreamConstraints)) or from a remote peer on a WebRTC call (using the RTCPeerConnection's audio tracks).

A MediaStreamAudioSourceNode has no inputs and exactly one output, and is created using the CreateMediaStreamSource(MediaStream) method.

The MediaStreamAudioSourceNode takes the audio from the first MediaStreamTrack whose Kind attribute's value is audio. See Track ordering for more information about the order of tracks.

The number of channels output by the node matches the number of tracks found in the selected audio track.

-Using the Web Audio API
-WebRTC API
-Media Capture and Streams API (Media Streams)
-MediaStreamTrackAudioSourceNode

See also on MDN

Constructors

MediaStreamAudioSourceNode()

public MediaStreamAudioSourceNode()

MediaStreamAudioSourceNode(AudioContext, MediaStreamAudioSourceOptions)

The Web Audio API's MediaStreamAudioSourceNode() constructor
creates and returns a new MediaStreamAudioSourceNode object which uses
the first audio track of a given MediaStream as its source.

public MediaStreamAudioSourceNode(AudioContext context, MediaStreamAudioSourceOptions options)

Parameters

context AudioContext
options MediaStreamAudioSourceOptions

Remarks

NOTE

Another way to create a
MediaStreamAudioSourceNode is to call
the CreateMediaStreamSource(MediaStream) method, specifying the stream
from which you want to obtain audio.

See also on MDN

Properties

MediaStream

The MediaStreamAudioSourceNode interface's
read-only mediaStream property indicates the
MediaStream that contains the audio track from which the node is
receiving audio.

[Value("mediaStream")]
public MediaStream MediaStream { get; }

Property Value

MediaStream

A MediaStream representing the stream which contains the
MediaStreamTrack serving as the source of audio for the node.The user agent uses the first audio track it finds on the specified
stream as the audio source for this node. However, there is no way to be certain which
track that will be on multi-track streams. If the specific track matters to you, or you
need to have access to the track itself, you should use a
MediaStreamTrackAudioSourceNode instead.

Remarks

This stream was specified when the node was first created,
either using the MediaStreamAudioSourceNode(AudioContext, MediaStreamAudioSourceOptions)
constructor or the CreateMediaStreamSource(MediaStream) method.

See also on MDN