0

I have installed a custom lighting system in my house (one of those rgb strip things) that has a webserver websocket on it. The only problem that remains is how to stream music through it so it can light up reacting to the music.

i would like to capture the audio coming out the speaker of an iOS device in html so i could then do some processing in html/javascript which in turn throw the processed data to the lighting system.

The browser can be chrome or safari. The music will be played by something like spotify. I understand that the browser must be active to continuely stream audio data, this is a comprimise im okay with.

What html / javascript / CSS APIs should i use to do this?

DrakeJest
  • 225
  • 3
  • 13
  • Does this answer your question? [HTML5 record audio to file](https://stackoverflow.com/questions/16413063/html5-record-audio-to-file) – brandonscript Oct 15 '21 at 18:27
  • @brandonscript no, i do not want to record auido, i want to grab, listen, or evesdrop (im not sure whats the appropriate word) the music that is playing on the phones speaker. So i can then display some spectrum analyzer on the browser. This is on the same iOS device there is no secondary phone that is doing the listening. – DrakeJest Oct 15 '21 at 19:32
  • Right, but the sound needs to play out of the speakers first right? And then you capture it from the browser? You would use the same HTML5 recording tools as this answer. – brandonscript Oct 15 '21 at 20:20
  • @brandonscript but that would not work with headphones or earpieces. – DrakeJest Oct 15 '21 at 21:28
  • But that's not what you asked for? "i would like to capture the audio coming out the speaker of an iOS device" ... – brandonscript Oct 15 '21 at 22:38

1 Answers1

2

This isn't possible. A website (or even an app) can't eavesdrop on audio like that.

Jack Lawrence
  • 10,664
  • 1
  • 47
  • 61