Here's the deal: On our website we use wordpress to host our podcast of audio sermons. We've tried to make the sermons as universally accessible as possible by using the BatmoAudioPop.js file. You can read more about that here: http://www.oreillynet.com/pub/a/ore...1/build-a-better-web-audio-player.html?page=2.
Anyhow, the problem is that for some odd reason the sermons will not play on Windows. Basically if the user does NOT have Quicktime and uses the latest version of Firefox (or the latest version of IE) some sermons will play and others won't. For example try this out: Go to http://www.summitnorthwest.org/sermonaudio/ with a windows computer on Firefox (or IE) without quicktime installed. Try playing the most recent post (July 19). It will pretend like it'd loading or something, but wont play. Next try to play the 2nd most recent post (July 12). This one should work. And then the next most recent (June 28) does not work. I've tested this on my MBP running windows using Firefox and IE, and on another HP computer using Firefox and IE and I get the same results. My MBP has Windows Media Player v9 and the HP had Windows Media Player v11.
Why the heck is it not working?
If you're interested, here is the exact code copy&pasted from the most recent post that does NOT work (July 19):
And from the 2nd most recent post that DOES work (July 12):
Also here is batmoaudiopop.js which is included at the top of the page via
BatmoAudioPop.js:
Thanks for taking the time to help me out
Anyhow, the problem is that for some odd reason the sermons will not play on Windows. Basically if the user does NOT have Quicktime and uses the latest version of Firefox (or the latest version of IE) some sermons will play and others won't. For example try this out: Go to http://www.summitnorthwest.org/sermonaudio/ with a windows computer on Firefox (or IE) without quicktime installed. Try playing the most recent post (July 19). It will pretend like it'd loading or something, but wont play. Next try to play the 2nd most recent post (July 12). This one should work. And then the next most recent (June 28) does not work. I've tested this on my MBP running windows using Firefox and IE, and on another HP computer using Firefox and IE and I get the same results. My MBP has Windows Media Player v9 and the HP had Windows Media Player v11.
Why the heck is it not working?
If you're interested, here is the exact code copy&pasted from the most recent post that does NOT work (July 19):
Code:
Speaker: Amy Heald <br />
Date: 7/19/08 <br />
Comments: <br />
<table><tr><td><img src="http://www.summitnorthwest.org/sermons/mp3.png" width="30" /></td><td valign="middle"><a href="http://www.summitnorthwest.org/sermons/2008/07.19.08.mp3" onclick="javascript:BatmoAudioPop('The Story',this.href,'1'); return false" target="_blank">Listen to Sermon</a></td></tr></table>
And from the 2nd most recent post that DOES work (July 12):
Code:
Speaker: Ron Hessel <br />
Date: 7/12/08 <br />
Comments: <br />
<table><tr><td><img src="http://www.summitnorthwest.org/sermons/mp3.png" width="30" /></td><td valign="middle"><a href="http://www.summitnorthwest.org/sermons/2008/07.12.08.mp3" onclick="javascript:BatmoAudioPop('There is no good title for this sermon: It\'s just ugly',this.href,'1'); return false" target="_blank">Listen to Sermon</a></td></tr></table>
Also here is batmoaudiopop.js which is included at the top of the page via
Code:
<script src="http://www.summitnorthwest.org/sermons/BatmoAudioPop.js" type="text/javascript"></script>
BatmoAudioPop.js:
Code:
// Pop-Up Embedder Script by David Battino, www.batmosphere.com
// Version 2006-05-31
// OK to use if this notice is included
function BatmoAudioPop(filedesc,filepath,WindowNumber)
{
// Get Operating System
var isWin = navigator.userAgent.toLowerCase().indexOf("windows") != -1
if (isWin) {
// Use MIME type = "application/x-mplayer2";
visitorOS="Windows";
} else {
// Use MIME type = "audio/mpeg"; // or audio/x-wav or audio/x-ms-wma, etc.
visitorOS="Other";
}
// Get the MIME type of the audio file from its extension (for non-Windows browsers)
var mimeType = "audio/mpeg"; // assume MP3/M3U
var objTypeTag = "application/x-mplayer2"; // The Windows MIME type to load the WMP plug-in in Firefox, etc.
var theExtension = filepath.substr(filepath.lastIndexOf('.')+1, 3); // truncates .aiff to aif
if (theExtension.toLowerCase() == "wav") { mimeType = "audio/x-wav"};
if (theExtension.toLowerCase() == "aif") { mimeType = "audio/x-aiff"};
if (theExtension.toLowerCase() == "wma") { mimeType = "audio/x-ms-wma"};
if (theExtension.toLowerCase() == "mid") { mimeType = "audio/mid"};
// Add additional MIME types as desired
if (visitorOS != "Windows") {
objTypeTag = mimeType; // audio/mpeg, audio/x-wav, audio/x-ms-wma, etc.
};
PlayerWin = window.open('',WindowNumber,'width=320,height=217,top=75,left=75,screenX=75,screenY=75,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0');
PlayerWin.focus();
PlayerWin.document.writeln("<html><head><title>" + filedesc + "</title></head>");
PlayerWin.document.writeln("<body bgcolor='#7D87BC'>"); // specify background img if desired
PlayerWin.document.writeln("<div align='center'>");
PlayerWin.document.writeln("<b style ='font-size:18px;font-family:Lucida,sans-serif;line-height:1.6'>" + filedesc + "</b><br />");
PlayerWin.document.writeln("<object width='280' height='69'>");
PlayerWin.document.writeln("<param name='src' value='" + filepath + "'>");
PlayerWin.document.writeln("<param name='type' value='" + objTypeTag + "'>");
PlayerWin.document.writeln("<param name='autostart' value='1'>");
PlayerWin.document.writeln("<param name='showcontrols' value='1'>");
PlayerWin.document.writeln("<param name='showstatusbar' value='1'>");
PlayerWin.document.writeln("<embed src ='" + filepath + "' type='" + objTypeTag + "' autoplay='true' width='280' height='69' controller='1' showstatusbar='1' bgcolor='#7D87BC' kioskmode='true'>");
PlayerWin.document.writeln("</embed></object></div>");
PlayerWin.document.writeln("<p style='font-size:12px;font-family:Lucida,sans-serif;text-align:center'><a href='" + filepath +"'>Download this Sermon</a> <span style='font-size:10px'>(right-click)</span></p>");
PlayerWin.document.writeln("<form><div align='center'><input type='button' value='Close this window' onclick='javascript:window.close();'></div></form>");
PlayerWin.document.writeln("</body></html>");
PlayerWin.document.close(); // "Finalizes" new window
}
Thanks for taking the time to help me out