I was reading about the new <audio> element in HTML 5 ([dev.w3.org ]) but I can not understand if the source can be a live feed from a microphone attached to the PC, or can the osurce only be a file that is server-side?
Thanks a lot
Demaestro
4:58 pm on May 17, 2010 (gmt 0)
I don't think it cares what the source file is, you just have to define a source file.
I am not sure what the supported formats are but for a live stream it would be something like .asx or .pls
You just have to look into creating a streaming file for your microphone input.
Hugene
3:37 pm on May 18, 2010 (gmt 0)
Thanks Demaestro.
What I am wondering is, does the browser handle the I/O with the microphone input? Maybe this isn't implemented yet?
Demaestro
3:54 pm on May 18, 2010 (gmt 0)
Hugene,
What you need to do is take the mic I/O and use a streaming type of solution with your server. There has to be a file, you can't connect directly to the mic output.
There is a program called icecast, it will do the work of taking input from a mic and creating a streaming file. Then all you have to do is point your audio tag to the streamer file.
Also if you have a control panel on your site check if there is a something called "Darwin Streamer" that you can install. That will also work for doing steaming and I have noticed a lot more hosting companies offer it in their control panel.
Post back with questions.
Samizdata
7:21 pm on May 18, 2010 (gmt 0)
As mentioned by Demaestro, you need streaming server software to create the stream from your microphone (or other) input - IceCast, Darwin and VLC are free examples.
However, two problems immediately arise:
1. Bandwidth - dividing your actual upstream bandwidth by the bitrate you choose will determine how many simultaneous listeners you can have - for serious broadcasting a relay server at a remote location is generally used. Note also that some ISPs explicitly prohibit running servers from domestic accounts.
2. Compatibility - the Firefox and Opera implementations of HTML5 currently only support OGG streams, while most other browsers only support MP3 streams - so you would need to offer both, which is probably not practical in the domestic setup you describe.
Live streams are certainly supported in the HTML5 audio tag but I don't use it myself at the moment due to the compatibility issues.