运行 ❯
获取您的
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!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 fast</button> <script> var x = document.getElementById("myAudio"); function getPlaySpeed() { alert(x.defaultPlaybackRate); } function setPlaySpeed() { x.defaultPlaybackRate = 2; x.load(); } </script> </body> </html>