问题
I'm working on an HTML5 radio player in Meteorjs. See http://radio.meteor.com/ or http://github.com/guaka/radio-meteor
I want to display the song that's currently playing. How can I do that?
I'm not sure if resorting to server side would be a great idea as the server would have to fetch metadata for a growing number of streams (I want to allow people to add more channels).
Browsers compatibility is not that much of an issue, as long as it will work in Phonegap. I don't care about all browsers (i.e. IE) as long as I can make it fails gracefully.
I think Pulling Track Info From an Audio Stream Using PHP might be an answer than can work for Meteor (server side).
回答1:
It should be possible via filereader on the client end, browser compatibility would be a bit of trouble.
Have a look at: http://ericbidelman.tumblr.com/post/8343485440/reading-mp3-id3-tags-in-javascript
回答2:
Maybe not actual now, but can help somebody else. I use this one package to getting metadata about streaming audio
来源:https://stackoverflow.com/questions/15444262/show-current-song-information-from-html5-audio-stream-in-meteor-app