This library works fine, only web audio api (which means there are no users ie): https://github.com/higuma/web-audio-recorder-js
But we can use it with honor now: http://caniuse.com/#feat=audio-api
In any case, as you said, your sound is already in the audio context, so I think you're looking for how to use the AudioDestinationNode, the last node of the web audio api. As soon as you can play audio through a regular html audio player, you will get the recording function with the right mouse button, for example, playDataUri. You need to add the โcontrolsโ attribute to the player, or you can create a special link with the download attribute. I made a small improvement to the Mdn script to send data to the player, this should give you a good idea:
var audioCtx = new AudioContext(); var source = audioCtx.createMediaElementSource(myMediaElement); myMediaElement = document.createElement("audio"); myMediaElement.setAttribute("autoplay", true); myMediaElement.setAttribute("src", uri); myMediaElement.setAttribute("controls", "controls"); document.getElementById('player').appendChild(myMediaElement); source.connect(audioCtx.destination);
>The AudioDestinationNode interface is the final destination of audiographs in a specific context - usually the speakers of your device. There may also be a node that will โrecordโ audio data when used with stand-alone offline content.
https://developer.mozilla.org/en-US/docs/Web/API/AudioDestinationNode
source share