MimeTypesBrowsersAndWhyInternetExplorerSucks
> m3u files worked fine for me under M$ ~WinDoze Internet Explorer. Is this > an MS specific trick (the m3u)?
This is not your fault, and the only reason it works on Windows IE is because its method of handling filetypes is wrong.
You see, when you get content over the web it is associated with a file type. It is the web server's job to tell your browser what kind of file it is sending. For example, if it is sennding you a PDF it says that the file is of type "application/pdf". This is called the files MIME type. All browsers let you specify what applications should be launched (if any) to process the different MIME types you might receive.
Anyway, the link you posted is being sent by its web server as "plain/text". Thus, your browser rightfully and correctly displays its content to the screen.
The m3u file should be sent as either "audio/mpegurl" or "audio/x-mpegurl". When your browser receives a file of this mime type it then does whatever you set it to do. For instance, I run Galeon and have my filehandler for "audio/x-mpegurl" set to "xmms -e". When I click on a m3u link from IceCast.org||http://www.icecast.org/] or |http://www.shoutcast.com/ or [[MP3.com], where the webservers are set correctly, XMMS starts up with the URL.
Try clicking on the play buttons here: http://yp.icecast.org/index.html and see what happens.
As I said before, the reason the link you posted works in WinIE is that it sucks and doesn't CARE what mime type a file is. All it does is look at the extension, the .m3u, and then does what it thinks it should. This is not right and completely ignores the whole PURPOSE of mime/types. A file's name and type are separate ideas. The people who set up the web page you went to obviously only teted the link in IE.
> My intention is to get streaming audio. Click the link, a WinAmp||http://www.winamp.com/] or [[XMMS] > player will crank up the mp3 and play it as it downloads. Can I do that > outside the world of MS Internet Explorer?
Definitely. As I said before. I have my system set to run "xmms -e" for mime type "audio/x-mpegurl" and can play anything off shoutcast, icecast, mp3.com, etc just fine. "xmms -e" adds the link to my playlist, if you just want it to start playing (and lose your current playlist) you can just say "xmms". FOr different browsers you might have to say things like "xmms %u" or "xmms %s". I run Galeon and don't use the percent arguments.
Hope that helps and that you have a little better understanding of how things are supposed to work.
Back to LinuxNotes
Last Edit: Thu, 21 Nov 2002 12:47:29 -0800 Revisions: 2