fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head> <body> <audio id="myAudio" controls> <source src="horse.ogg" type="audio/ogg"> <source src="horse.mp3" type="audio/mpeg"> 您的浏览器不支持 audio 元素。 </audio><br> <button onclick="getPlaySpeed()" type="button">默认的播放速度?</button> <button onclick="setPlaySpeed()" type="button">设置音频快速播放</button> <script> var x = document.getElementById("myAudio"); function getPlaySpeed(){ alert(x.defaultPlaybackRate); } function setPlaySpeed(){ x.defaultPlaybackRate = 2; x.load(); } </script> </body> </html>
运行结果