Jump to content

Recommended Posts

Hi Guys,

 

I currently have a method of getting a users attention by injecting a flash file in an ajax response and placing it in a div.

However, Newer security measures from browsers mean that the file doesnt play on certain versions of certain browsers..

 

Anyway.

Is there another method of achieving this?

I see that facebook play a sound when a new message comes in, so it must be possible? ( Html5? )

 

Essentially I need a website (javascript?) to query playsound.php If playsound.php responds with "1" ( ie it just replies with an output of 1 ) then id like it to play a sound.

 

I would then use a JS timer to run the ajax query every so often to check if it needs to play a sound.

 

Does anyone have any ideas on how I can do this? As it appears my original method of using ajax to fill a div with a flash element is fastly becoming outdated.

 

Thanks in advance

Graham

Link to comment
https://forums.phpfreaks.com/topic/257446-play-sound-if-my-ajax-response-1/
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.