Sound created with a remote webrtc stream track does not seem to work

https://stackoverflow.com/questions/41784137/webrtc-doesnt-work-with-audiocontext - i think this is the exact issue here.

The second implementation from https://stackoverflow.com/questions/41784137/webrtc-doesnt-work-with-audiocontext could be a solution. Since, the first implementation (similar to Sound) did not work for the author.

Solution:

var ctx = new AudioContext();
var audio = new Audio();
audio.srcObject = stream;
var gainNode = ctx.createGain();
gainNode.gain.value = .5;   
audio.onloadedmetadata = function() {
    var source = ctx.createMediaStreamSource(audio.srcObject);
    audio.play();
    audio.muted = true;
    source.connect(gainNode);
    gainNode.connect(ctx.destination);
}