<!DOCTYPE html>
<html>
<body>
<audio id="myAudio" controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio><br>
<button onclick="getPlaySpeed()" type="button">What is the default playback speed?</button>
<button onclick="setPlaySpeed()" type="button">Set video to be play in slow motion</button>
<script>
var x = document.getElementById("myAudio");
function getPlaySpeed() {
alert(x.defaultPlaybackRate);
}
function setPlaySpeed() {
x.defaultPlaybackRate = 0.5;
x.load();
}
</script>
</body>
</html>