-1

I need to read somehow stream from my shoutcast server containing VU meter data which looks like this

"0xa5 leftVal rightVal 0xa5 leftVal ..... etc"

Stream is continuous.

I'd like to receive this data and parse it in JavaScript(jQuery) to manage VU meters animations.

  • @Dom I think he's a little before the code stage. Mariusz, I don't have an answer, but I think what you need to be looking for is "AJAX Streaming" or "Javascript Streaming", it's not necessarily going to be a jQuery solution. – Snixtor Apr 04 '13 at 21:48
  • @Snixtor Well I found some stuff but just for creating streams with JS/jQuery not receiving them. I will test Nate's suggestion for now. – Mariusz Sołtys Apr 05 '13 at 13:00

1 Answers1

0

For continuous stream processing, maybe this answer will help: Process a continuous stream of JSON

For parsing the data use the built in javascript split function. You could then use the jQuery each function to iterate over the array.

var items = dataStream.split(" ");

$.each(items, function(index, value) {
  //Do stuff
});
Community
  • 1
  • 1
Nate
  • 651
  • 4
  • 7