Audio Player

<!--------------------Begin Audio Player Script-----------------------------> window.onload = function(){ //get references to the elements var player = document.getElementById("player"); var btn = document.getElementById("audio_player"); var image_btn = document.getElementById("image_button"); /*var curtime = document.getElementById("curtime"); var duration = document.getElementById("duration"); duration.innerHTML = player.duration; */ //attach event handler to button EventUtil.addHandler(btn, "click", function(event){ if (player.paused){; /*btn.value = "Pause";*/ image_btn.src = "/payloads/images/pauseButton04.png"; } else { player.pause(); /*btn.value = "Play";*/ image_btn.src = "/payloads/images/playButton04.png"; } }); }; <!--------------------End Audio Player Script----------------------------->
Javascript audio player

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.