Muted AudioElement test

This is an example to demonstrate a possible bug in Chrome.


AudioElement

Clicking the following button will play an audio file by using an audio element.

const $audio = document.getElementById('audio');

$audio.play();

AudioElement & MediaStreamAudioSourceNode

Clicking the following button will play an audio file by using an audio element as well. It will also pipe the audio through an AudioContext.

const $audio = document.getElementById('audio');

$audio.play();

const audioContext = new AudioContext();
const mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(
    audioContext,
    { mediaStream: $audio.captureStream() }
);

mediaStreamAudioSourceNode.connect(audioContext.destination);

AudioElement (muted) & MediaStreamAudioSourceNode

Clicking the following button will do the same as the button above. The only difference is that the audio element is muted and therefore the sound should only be audible through the AudioContext.

const $audio = document.getElementById('audio');

$audio.muted = true;
$audio.play();

const audioContext = new AudioContext();
const mediaStreamAudioSourceNode = new MediaStreamAudioSourceNode(
    audioContext,
    { mediaStream: $audio.captureStream() }
);

mediaStreamAudioSourceNode.connect(audioContext.destination);

The audio file used on this page is part of a release by Insanity Circle called "Itinerario Nocturno". It's licensed by a Creative Commons license.