Buscar en Ayuda

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

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

Modificadas por cor-el el

Todas las respuestas (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>"

Modificadas por cor-el el

more options

Let's try this again with escape characters added:

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

Modificadas por cor-el 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.

Modificadas por pencilneck_geek el