i need add audio file homepage, need audio doesn't stop when move title/page. need audio .mp3 file playing in background. i'm working microsoft expression web 4. can me? thanks!!!
this i've used now:
<audio id="myaudio" <source src="audiofile.mp3" type='audio/mp3'> <source src="http://media.w3.org/2010/07/bunny/04-death_becomes_fur.oga" type='audio/ogg; codecs=vorbis'> user agent not support html5 audio element. </audio> <button type="button" onclick="aud_play_pause()" style="width: 296px; height: 35px"> <span class="auto-style1"> <strong>if want listen - click this!</strong></span></button> <script> function aud_play_pause() { var myaudio = document.getelementbyid("myaudio"); if (myaudio.paused) { myaudio.play(); } else { myaudio.pause(); }
}
i put in .php file use navigate. @ point i'm not sure if it's correct code or in correct place!
try :
<audio src="/music/your_file.mp3" autoplay> <p>if reading this, because browser not support audio element. </p> <embed src="/music/your_file.mp3" width="180" height="90" hidden="true" /> </audio>
update
if navigate pages stop track , start again on new page.
there 3 ways make track playing continuously in pages :
- open audio player in popup
- frames
- change page content dynamical javascript without reloading page
Comments
Post a Comment