Prerequisite: AudioContext baseLatency Property
The HTML AudioContext.createMediaStreamTrackSource() is used to create an instance of MediaStreamAudioSourceNode object which can be used by the user to manipulate the stream feed in the
AudioContext.createMediaStreamTrackSource() method. The MediaStreamAudioSourceNode is used in audio processing graph for use and manipulation.
audioSourceNode = audioContext.createMediaStreamSource(stream)
Parameter: This method accepts single parameter stream that holds the ediaStream(stream) to serve as an audio source.
Return Value: This method returns the MediaStreamAudioSourceNode object.
When some Error Occurs
Explanation: In this example, we grab a media (audio + video) stream from navigator.getUserMedia, feed the media into a video element to play then mute the audio, but then also feed the audio into a MediaStreamAudioSourceNode.
- Google Chrome
- Microsoft Edge