Reputation: 495
How would you download an Audio object created dynamically?
var audioPlaying = new Audio();
audioPlaying.src = link;
audioPlaying.addEventListener("loadedmetadata", function(_event) {
audioPlaying.play();
});
Upvotes: 3
Views: 3479
Reputation: 46
you could, if the audio source is shown somewhere on the website, enable the controls.
audioPlaying.controls = true
after which you can right-click the audio (now having the player visible on the page) and select "Save Audio As..."
(tested using firefox)
Upvotes: 1