html5播放器
主要標志是<video>,這種是最方便實現加速的,因為原生支持.
主要依靠這兩個屬性:
defaultPlaybackRate* (float): The playback speed at which the video should be played
playbackRate* (float): The current playback speed: 1.0 is normal, 2.0 is two times faster forward, -3.0 is three times faster backwards and so on
可以自己在console中修改實現
/* play video twice as fast */
document.querySelector('video').defaultPlaybackRate = 2.0; //默認兩倍速播放
document.querySelector('video').play();
/* now play three times as fast just for the heck of it */
document.querySelector('video').playbackRate = 3.0; //修改此值設置當前的播放倍數
測試firefox、chrome可以使用
轉自fairjm
