為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Embedded sound plays in Firefox 3.6.15 for Linux (i586), but not in the same version for Linux (i686)

more options

The same embedded 10-sec0nd sound-clip within my Welcome page plays within the version running on my old, 450-MHz, AMD K6-III+ machine in openSUSE 10.2, but does not play within the exact same version running on my newer, 1.4-GHz, Pentium IV machine in openSUSE 11.2. This same page was opened from the same USB flash-drive on both machines, so there is no coding difference within the page itself, and neither it, nor the sound-file is corrupted.

I did not disable JavaScript within this browser on the newer machine, and I doubt this is a sound-configuration or plug-in problem on the newer machine, since randomly selected sound-effects from my JavaScript multiple-choice quiz app (located in the same directory on the flash-drive) plays on it in-response to user input (i.e., right or wrong answers).

The sound-related code within the Welcome page is as follows:

<span id="dummy"></span>
<script type="text/javascript">
<!--
 playSound();
//-->
</script>

The code within the linked JavaScript source-file is as follows:

/*Play truck sound on index page.*/
function playSound() {
 if(document.getElementById)//Test by function if browser is DOM 2-compliant.
  {
   document.getElementById("dummy").innerHTML="<embed src='sounds/18wheeler.wav' hidden='true' width='0'  height='0' autostart='true' loop='false' />";
  }
else
  {
    alert("Sorry! This browser does not have the DHTML capability required to play sound according to the JavaScript coding within this page. To enable sound, please update your browser.");

  }
 }


Any help in this matter would be greatly appreciated.

Karl

The same embedded 10-sec0nd sound-clip within my Welcome page plays within the version running on my old, 450-MHz, AMD K6-III+ machine in openSUSE 10.2, but does not play within the exact same version running on my newer, 1.4-GHz, Pentium IV machine in openSUSE 11.2. This same page was opened from the same USB flash-drive on both machines, so there is no coding difference within the page itself, and neither it, nor the sound-file is corrupted. I did not disable JavaScript within this browser on the newer machine, and I doubt this is a sound-configuration or plug-in problem on the newer machine, since randomly selected sound-effects from my JavaScript multiple-choice quiz app (located in the same directory on the flash-drive) plays on it in-response to user input (i.e., right or wrong answers). The sound-related code within the Welcome page is as follows: <pre><nowiki><span id="dummy"></span> <script type="text/javascript"> <!-- playSound(); //--> </script></nowiki></pre> The code within the linked JavaScript source-file is as follows: <pre><nowiki> /*Play truck sound on index page.*/ function playSound() { if(document.getElementById)//Test by function if browser is DOM 2-compliant. { document.getElementById("dummy").innerHTML="<embed src='sounds/18wheeler.wav' hidden='true' width='0' height='0' autostart='true' loop='false' />"; } else { alert("Sorry! This browser does not have the DHTML capability required to play sound according to the JavaScript coding within this page. To enable sound, please update your browser."); } } </nowiki></pre> Any help in this matter would be greatly appreciated. Karl

由 cor-el 於 修改

所有回覆 (5)

more options

Sorry, I thought I posted all of the sound-related code within the Welcome page, but apparently your system has problems displaying all of it. Here it is (with quotation marks added to the missing piece to enable it to display):

<span id="dummy"></span>
"<script type="text/javascript">
<!--
 playSound();
//-->
</script>"

由 cor-el 於 修改

more options

Let's try this again with escape characters added:

<span id="dummy"></span>
 <script type="text/javascript">
 <!--
  playSound();
  //-->
</script\>

由 cor-el 於 修改

more options

Please disregard my last reply; apparently, my previous replay displayed properly once I submitted it.

more options

I've edited your posts to show the code correctly.

Do you have a link to that web page?

To play .wav files you need a player like Gecko media player and MPlayer to play that sound. You can also try to unhide that player to see if the player shows.

more options

I am using the Xine plugin, which opens the Xine player. That information has been cut-and-pasted from within the Troubleshooting Information page. I will try unhiding the player now to see if it displays. . .

Yes, the Xine player is visible in the bottom-left corner of the screen. The screen capture file is attached. However, this page has not been uploaded to a web-server; I intend to distribute these pages on a CD instead.

Please note that the 3 seconds shown within the attached file is actually an instantaneous value; this is a countdown timer whose initial value is 10 seconds. Evidently, it took 7 seconds for me to capture this image.

由 pencilneck_geek 於 修改