我是靠谱客的博主 爱笑皮带,这篇文章主要介绍jq用videojs实现m38u格式,现在分享给大家,希望可以做个参考。

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>videoJs</title>
 
          <link href="css/video-js.css" rel="stylesheet" />
        
          <!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
          <script src="js/videojs-ie8.min.js"></script>
    </head>
    <body>
        <section id="videoPlayer">
            <video id="my-video" width="600" height="300" class="video-js vjs-default-skin vjs-big-play-centered" poster="">
                <source src="M3U8格式" type="application/x-mpegURL" id="target"> 
 
            </video>
        </section>
          <script src="js/video.js"></script>
        <script type="text/javascript">
            var player = videojs('my-video', { "poster": "", "controls": "true" }, function() {
                this.on('play', function() {
                    console.log('正播放');
                });
                //暂停--播放完毕后也会暂停
                this.on('pause', function() {
                    console.log("暂停")
                });
                // 结束
                this.on('ended', function() {
                    console.log('结束');
                })
 
            });
        </script>
    </body>
</html>

最后

以上就是爱笑皮带最近收集整理的关于jq用videojs实现m38u格式的全部内容,更多相关jq用videojs实现m38u格式内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(105)

评论列表共有 0 条评论

立即
投稿
返回
顶部