久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      html5 video無法快進怎么辦

      html5 video無法快進的解決辦法:1、創(chuàng)建鍵盤事件“document.onkeyup = function (event){…}”;2、打印出request中傳遞的所有參數(shù)名稱;3、根據(jù)Range屬性值來獲取到需要將視頻定位的位置;4、在catch中將異常屏蔽掉即可。

      html5 video無法快進怎么辦

      本教程操作環(huán)境:Windows10系統(tǒng)、HTML5版、Dell G3電腦。

      html5 video無法快進怎么辦?

      <video> 標(biāo)簽快進不生效的解決:

      在H5項目中,使用<video>標(biāo)簽來播放視頻,跳不過視頻的快進播放,按照原生提供的方法,來進行如下監(jiān)聽設(shè)置:

      var vol = 0.1;  //1代表100%音量,每次增減0.1 var time = 2; //單位秒,每次增減10秒     function listenKeyboard() {     var videoElement = document.getElementById("video");     document.onkeyup = function (event) {//鍵盤事件           var e = event || window.event || arguments.callee.caller.arguments[0];           //鼠標(biāo)上下鍵控制視頻音量         if (e && e.keyCode === 38) {             console.log("音量加1");             // 按 向上鍵             videoElement.volume !== 1 ? videoElement.volume += vol : 1;             return false;           } else if (e && e.keyCode === 40) {             console.log("音量減1");             // 按 向下鍵             videoElement.volume !== 0 ? videoElement.volume -= vol : 1;             return false;           } else if (e && e.keyCode === 37) {             console.log("倒退1秒");             // 按 向左鍵             videoElement.currentTime !== 0 ? videoElement.currentTime = videoElement.currentTime -= time : 1;             return false;           } else if (e && e.keyCode === 39) {             console.log("前進2秒,當(dāng)前時間是:"+videoElement.currentTime+",視頻長度是:"+videoElement.duration);             // 按 向右鍵             var currPlayTime = videoElement.currentTime ;             if (currPlayTime !== videoElement.duration){                 var afterSetTime = currPlayTime + time ;                 console.log('afterSetTime should be :'+afterSetTime) ;                 videoElement.currentTime = afterSetTime ;                 console.log('afterSetTime is :'+videoElement.currentTime) ;             }else {                 videoElement.currentTime = videoElement.currentTime + 1;             }             console.log("快進后的時間是:"+videoElement.currentTime);             return false;         } else if (e && e.keyCode === 32) {             console.log("暫停");             // 按空格鍵 判斷當(dāng)前是否暫停             videoElement.paused === true ? videoElement.play() : videoElement.pause();             return false;           }       } }
      登錄后復(fù)制

      每次快進時,視頻會跳動到開始,重新進行播放。

      后在想,視頻每次播放,讀取的文件流肯定不同,需要從文件對應(yīng)的位置進行截取,類似于翻頁一樣,需要傳遞一個起始邊界值,于是打印出request中傳遞的所有參數(shù)名稱,但除了業(yè)務(wù)參數(shù)外,并沒有其他

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號