Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

Audio Play Speed Setting playbackRate Tutorial

Learn to add playback speed control to your HTML5 audio and video multimedia programs using JavaScript. <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <script> function initAudio(){ var audio = new Audio(); audio.src = "audio/Stoker.ogg"; audio.play(); var speedlist = document.getElementById("speedlist"); speedlist.addEventListener("change",changeSpeed); function changeSpeed(event){ audio.playbackRate = event.target.value; } } window.addEventListener("load", initAudio); </script> </head> <body> <select id="speedlist"> <option value="1">change speed</option> <option value=".5">.5</option> <option value="1">Normal</option> <option value="1.5">1.5</option> <option value="2">2</option> </select> </body> </html>
thumb

JavaScript Videos

Audio Programming

Button Sound Effects Tutorial Audible Menu SystemsAudio Play Pause Mute Buttons TutorialAudio Seek and Volume Range Slider TutorialAudio Time Update Position TutorialAudio Player Skins and CSS Graphics TutorialAudio OGG Files CheckAudio Play Speed Setting playbackRate TutorialAudio Playlist Play Buttons JavaScript Programming TutorialAudio Playlist Array TutorialAudio Song Select Track Playlist TutorialAnalyser Bars Animation HTML Audio API TutorialPlay Uninterrupted Background Music On Your WebsiteHow to Create Custom Sound Effects with FruityLoops