Audio.js, how to add support for formats and stream types

194 views Asked by At

i'm making radio database and i'm using audio.js to play m3u streams. How i add support for acc,ogg,wma,mms streams and shoutcast stream type?

Thanks for answers:)

1

There are 1 answers

0
Brad On

i'm making radio database and i'm using audio.js to play m3u streams

M3U isn't a stream nor media itself. It's a playlist. That's all. You need to parse that playlist.

At the simple level, it's just a list of line-delimited URLs. There are comment lines that contain other information though.

http://en.wikipedia.org/wiki/M3U

How i add support for acc,ogg,wma,mms streams and shoutcast stream type?

AAC is a codec. Ogg is a container format. WMA is a codec. MMS is a protocol. SHOUTcast is a modified version of the HTTP protocol, but also with its own metadata wrapper. As you can see, you are comparing apples to trees to cars to trucks.

In any case, support for codecs, containers, and protocols is dependent on the client. You cannot add support for these in JavaScript. There are some extremely experimental JS decoders for some codecs but they're not quite ready for production use. In the mean time, the browser has to support what you want to play, and if it doesn't there isn't anything you can do about it.