Jump to content

[SOLVED] Sound breaks things in certain browsers.


Michdd

Recommended Posts

I have a simple thing that plays a sound during certain times. However in browsers (or with users..) that don't have quicktime installed it seems to just break the javascript function completely. Is there a way to check if a user has quicktime installed?

Link to comment
Share on other sites

Or possibly a more universal way to play sound. Currently the way that I'm doing which is causing problems in certain browsers (especially Opera) is:

 

<embed src="recv_4.wav" autostart=false width=0 height=0 id="sound1"
enablejavascript="true">

function EvalSound(soundobj) 
{
     var thissound=document.getElementById(soundobj);
     thissound.Play();
}

 

Then a call like EvalSound('sound1');

Link to comment
Share on other sites

Well get creative, make it autoplay, add it to the document when ajax does whatever you have it doing, then remove it x seconds later when it's done.

How does that help me in making it work in other browsers?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.