Loading ...
Sorry, an error occurred while loading the content.
 

Not able to play mp3 in FireFox

Expand Messages
  • javediq_143
    Hi All, I ve created an html page where I will present a list of mp3 tracks which user can listen to. When a user clicks on any track, a pop-up will get open
    Message 1 of 1 , Jul 29, 2009
      Hi All,
      I've created an html page where I will present a list of mp3 tracks
      which user can listen to. When a user clicks on any track,
      a pop-up will get open which will play that track. The url of this
      pop-up, which is partly completed is,
      http://go2bollywood.tv/satam/sound.asp
      <http://go2bollywood.tv/satam/sound.asp> .

      For this I've googled around and found a solution. But this is working
      fine in IE but not in FF. This solution uses a "m3u" file for the
      purpose. And I've got this from here:
      http://www.scriptwell.net/howtoplaysound.htm
      <http://www.scriptwell.net/howtoplaysound.htm> (please scroll down).

      In FF, it says to download a plugin but when I click, it searches for
      the plugin and displayes error message as "No suitable plugins found
      Unknow plugin(audio/x-mpegurl)"

      I want to commit that I do not have quicktime installed on my system but
      window media player which is getting used when page is viewd in IE.

      Can anybody help me as how to make this work. I've also set the MIME
      type under HTTP Header in IIS 6.0. The header set are:
      .m3u; Mime type: audio/x-mpegurl and mp3; Mime type: audio/mpeg

      Kindly reply me soon as I need to complete this project soon. Though the
      page is an ASP page but it is just for a sake

      Code for sound.asp file
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML>
      <HEAD>
      <script language="JavaScript" type="text/javascript">
      function setEmbed(ID, dir)
      {
      var element = document.getElementById(ID);
      var inn = '<embed src="http://go2bollywood.tv/satam/' + dir + ID +
      '.m3u" autostart="0" loop="0" height="45" width="239" ';
      inn+= 'type="' + getMimeType() + '"></embed>';
      element.innerHTML=inn;
      }// end function setEmbed

      function getMimeType(){
      var mimeType = "application/x-mplayer2"; //default NOTE:I've also
      changed this to 'audio/x-mpegurl'
      var agt=navigator.userAgent.toLowerCase();
      if (navigator.mimeTypes && agt.indexOf("windows")==-1) {
      //non-IE, no-Windows
      var plugin=navigator.mimeTypes["audio/mpeg"].enabledPlugin;
      if (plugin) mimeType="audio/mpeg" //Mac/Safari & Linux/FFox
      }//end no-Windows

      return mimeType
      }//end function getMimeType
      </script>
      </HEAD>

      <BODY onload="setEmbed('music', 'sound/')">
      <span id="music">Finding plugin...</span>
      </BODY>
      </HTML>

      Code for m3u file
      Idea.mp3


      Thanks & Regards,
      Javed


      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.