赞
踩
以下是实现JavaScript视频倍速播放的代码示例:
<video id="myVideo" width="320" height="240" controls> <source src="myVideo.mp4" type="video/mp4"> </video> <button οnclick="playSlow()">Slow</button> <button οnclick="playNormal()">Normal</button> <button οnclick="playFast()">Fast</button> <script> var myVideo = document.getElementById("myVideo"); function playSlow() { myVideo.playbackRate = 0.5; myVideo.play(); } function playNormal() { myVideo.playbackRate = 1; myVideo.play() } function playFast() { myVideo.playbackRate =
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。