3

我正在尝试按照本教程制作视频按钮的控件,并且就我现在正在寻找按钮而言,一切正常。下面的代码在 Safari 和 Opera 上运行良好,但 Firefox 和 Chrome 什么也没做。

function initVideoDirectionStepButtons() {

    var _stepSize = 10.0;

    /* Add Code For Stepping Backward */


    $('.rewind_button a').each(function() {
        /*This code finds the video element and binds it to a click event.*/

        var $_video=findVideoForElement(this);


        $(this).click(function(e) {

             e.preventDefault();

             $_video.each(function(index, _video) {

                 _video.currentTime=_video.currentTime-_stepSize;

             });

        });

    });

这只是代码的开始。它只是在函数关闭之前对 fast_forward 重复相同的操作。然后在 html 准备好时调用它。

Firefox 和 chrome 在控制台中没有为我显示任何错误,与 safari 相比,它什么也不做,它会前后跳动。我环顾四周,看到许多其他示例也这样做,并且对他们有用。是在 Firefox 和 chrome 中设置 currentTime 无效,还是它不支持 webm 格式?

4

0 回答 0