前端 videojs测试 直播 可用于视频监控直播

官网:http://videojs.com
github:https://github.com/videojs/video.js
各版本下载地址:https://github.com/videojs/video.js/releases

原文:https://www.52pojie.cn/thread-750154-1-1.html
这是ivi直播源地址
中央1,http://ivi.bupt.edu.cn/hls/cctv1.m3u8
中央2,http://ivi.bupt.edu.cn/hls/cctv2.m3u8
中央3,http://ivi.bupt.edu.cn/hls/cctv3.m3u8
中央4,http://ivi.bupt.edu.cn/hls/cctv4.m3u8
中央5,http://ivi.bupt.edu.cn/hls/cctv5.m3u8
中央6,http://ivi.bupt.edu.cn/hls/cctv6.m3u8
中央7,http://ivi.bupt.edu.cn/hls/cctv7.m3u8
中央8,http://ivi.bupt.edu.cn/hls/cctv8.m3u8
中央9,http://ivi.bupt.edu.cn/hls/cctv9.m3u8
中央10,http://ivi.bupt.edu.cn/hls/cctv10.m3u8
中央11,http://ivi.bupt.edu.cn/hls/cctv11.m3u8
中央12,http://ivi.bupt.edu.cn/hls/cctv12.m3u8
中央13,http://ivi.bupt.edu.cn/hls/cctv13.m3u8
中央14,http://ivi.bupt.edu.cn/hls/cctv14.m3u8
中央15,http://ivi.bupt.edu.cn/hls/cctv15.m3u8

这两个直播源还是比较流畅的:
http://nclive.grtn.cn/ggpd/sd/live.m3u8
http://nclive.grtn.cn/gdws/sd/live.m3u8


<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>


    <div margin-top: 10px;>
        <div style="padding-left: 11px;">
            <div style="height: 425px; 525px;">
                <video class="video-js vjs-default-skin vjs-fluid vjs-big-play-centered"
                       id="myPlayer"
                       controls playsinline webkit-playsinline autoplay></video>
            </div>
        </div>
    </div>

    <script src="jquery-1.12.0.min.js"></script>
    <link href="video-js.min.css" rel="stylesheet">
    <script src="video.min.js"></script>


    <script type="text/javascript">

        function play(src) {
            var option = {};
            videojs('myPlayer', option, function onPlayerReady() {
                var myPlayer = this;
                myPlayer.src({ src: src, type: "application/x-mpegURL" });
                this.play();
            });
        }

        function initialVideo() {
            var url = 'http://nclive.grtn.cn/ggpd/sd/live.m3u8';
            url = 'http://nclive.grtn.cn/gdws/sd/live.m3u8';
            play(url);
        }

        $(function () {
            initialVideo();
        });

    </script>



</body>
</html>

原文地址:https://www.cnblogs.com/guxingy/p/12598535.html