Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Build a Simple MP3 Player for Your Site
Subject:   This is supposed to work...but it doesn't. Why?
Date:   2005-04-13 23:33:33
From:   Gary_Burke
According to Apple's Quicktime website and several others, one solution to having an embedded streaming MP3 player that will work on Mac or PC is to use Quicktime as an embedded player. It certainly seems capable of it. Apple goes so far as to give you some sample code, and between that and a University of Colorado's website I was able to put together this code, which is supposed to work on Windows machines:


<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="content-type">
<title>Quicktime Player Test</title>
</head>
<body>




<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
codebase="http://www.apple.com/qtactivex/qtplugin.cab" height="144"
width="160">
<param name="src"
value="http://www.radiofreecolorado.net/RFC_Support_Files/RFC_Winamp_Listen.m3u"><param
name="autoplay" value="false">
<param name="controller" value="true"><param name="loop" value="false">
<param name="name" value="title of movie"><param name="qtsrc"
value="http://www.radiofreecolorado.net/RFC_Support_Files/RFC_Winamp_Listen.m3u">
<embed src="sample.mov" autoplay="false" type="audio/x-mpegurl"
controller="false"
pluginspage="http://www.apple.com/quicktime/download/" loop="false"
name="Radio Free Colorado 128k"
qtsrc="http://www.radiofreecolorado.net/RFC_Support_Files/RFC_Winamp_Listen.m3u"
height="144" width="160"></object>
</body>
</html>


Apple says their Quicktime player can handle .m3u playlist files, which in this case simply contains the URL of a SHOUTcast MP3 streaming server (http://66.90.78.124:8090). When this code is loaded on my webserver as an HTML file and launched, the embedded Quicktime player appears, and says "Loading"...but nothing happens. I tried messing around with the "Mime" type (audio/x-mpegurl) but several sources tell me this is the correct Mime type for streaming MP3's. I am at a loss here. In desperation I settled for putting my streaming versions of David's Javascript players on my website (http://radiofreecolorado.net) but they only work in Windows and only in Internet Explorer. I was looking to Quicktime to provide a cross-platform, cross-browser solution. According to Apple what I want to do is possible, and from within one website page. Anyone have any ideas? Fixes to the existing code from David so it will work on everything, or fixes to the Quicktime code I posted? Do we have to resort to "Flash"? Any and all assistance is appreciated! -Gary