zoukankan      html  css  js  c++  java
  • 浏览器视频倍速播放方法

    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

  • 相关阅读:
    学习第23天
    学习第22天
    学习第21天
    Servlet交互与JSP
    Cookie与Session
    servlet入门
    网络编程
    DOM4j
    xml文档对象模型doc
    反射
  • 原文地址:https://www.cnblogs.com/Amy-world/p/12867922.html
Copyright © 2011-2022 走看看