lisovaccaro
lisovaccaro

Reputation: 33956

Start playing audio after 10 seconds, possible with javascript?

I need an audio file to start playing after 10 seconds. Is there a way to do it with javascript?

This is the code of the sounds I want to play:

<embed src="sound.mp3" width="300" height="200" width="400" autoplay="true" loop="true" volume="100"></embed>

<BGSOUND SRC="sound.wav" LOOP="2" AUTOSTART="true">

I'm sure whether the code is cross-browser that's why I'm playing the sound twice.

Thanks

Upvotes: 0

Views: 444

Answers (1)

Jatin Ganhotra
Jatin Ganhotra

Reputation: 7025

Look for setTimeOut function in javascript.

Upvotes: 1

Related Questions