0

I can't seem to figure out how to capture events with FlowPlayer. I'm loading the scripts from the CDN. Below is what I've attempted to try to catch the onFinish event, but no luck. Any help would be greatly appreciated.

<!DOCTYPE html>
<html>

<head>
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="//releases.flowplayer.org/5.4.3/flowplayer.min.js"></script>
    <link rel="stylesheet" href="//releases.flowplayer.org/5.4.3/skin/minimalist.css">

    <script>
         flowplayer("flowplayer", "video.flv", {
             onFinish: function () {
                 alert("Click Player to start video again");
                 }
             });
    </script>

    <title>FlowPlayer Test</title>
</head>

<body>
    <div class="flowplayer">
        <video>
            <source type="video/flv" src="video.flv">
        </video>
        </div>
</body>

</html>
4

1 回答 1

0

从您的示例代码看来,您正在使用 flowplayer HTML5 视频播放器。据我所知,没有onFinish事件。但是finish,您可以绑定一个事件。就是这样:

例子

flowplayer(function (api, root) { 
    api.bind("finish", function () { 
        alert("Click Player to start video again"); 
    });

});

更多信息可以在 flowplayer API 文档中找到

于 2013-09-17T15:49:01.573 回答