+
95
-

js如何控制视频播放及快进速度?

js如何控制视频播放及快进速度?


网友回复

+
15
-
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

</head>
<style>
    #durationBar{
        border:solid 1px #164900;
        width:100%;
        margin-bottom:5px;
    }

    #positionBar{
        height:20px;
        color:white;
        font-weight:bold;
        background:#2D9900;
        text-align:center;
    }
</style>

<script>
    //播放
    function play(){
        var video = document.getElementById("videoPlayer");
        video.play();
    }

    //暂停
    function pause(){
        var video = document.getElementById("videoPlayer");
        video.pause();
    }

    //停止
    function stop(){
        var video = document.getElementById("videoPlayer");
        video.pause();
        video.currentTime = 0;
    }

    //快放
    function speedUp(){
        var video = ...

点击查看剩余70%

我知道答案,我要回答