Need to find java script or php autoplay sound codes.

Asked By 30 points N/A Posted on -
qa-featured

Hi,

I have developed a web site and I want to add a video clip to auto play when opening of selected pages.

But it should happen once. I mean that sound should play once opening selected pages after entering the site.

Could you please give me JavaScript or PHP Autoplay sound cards to fulfill my requirement with necessary instructions? 

 

SHARE
Answered By 0 points N/A #159063

Need to find java script or php autoplay sound codes.

qa-featured

 

Hello  Bersh Roman,

Hope that my message finds you well.
To add a background sound in each page you should embed each of the following steps in all the pages you want to add
In them a certain sound, please follow the below steps:

Add this to your html page in the body part:
<bgsound src="yourmusicfile.mid" loop="infinite">

Then add this code also:
<embed src="musicfile.mid" autostart="true" loop="true"
width="2" height="0">
</embed>
<noembed>
<bgsound src="musicfile.mid" loop="infinite">
</noembed>

As I said before if you want to play sounds for specific pages, you should embed this code only
In the pages that you want to play with them a background sound.

Hope this solution will help you and please let me know if you need anything else.
Kind regards,

 

Related Questions