Search code examples
htmlgoogle-chromeaudio

Is there a way to get the data of currently playing audio on the computer/browser with Web Audio API?


I was wondering if it is possible to get audio that is currently playing on the computer, or the browser (Chrome) using the Web Audio API, or does the API have access to any microphone on the computer? This way I can make a music visualizer for what ever is playing on the computer, which would be pretty neat.


Solution

  • It would be a security hole if a web app could get the playing audio outside of itself. There's no way for it to access the system's audio unless the the web app is playing the music (either using or the Web Audio API).

    One day it will be possible to pipe in microphone data to the Web Audio API, but that's not implemented yet.