zoukankan      html  css  js  c++  java
  • 直播播放案例

    <!DOCTYPE html>
    <html>
    <head>
        <title>监控测试</title>
        <script src="http://the5fireblog.b0.upaiyun.com/staticfile/swfobject.js"></script>
    </head>
    <body>
    <!--移动端-->
    <!-- <video class="vjs-tech" width="100%" height="100%"  
        controls="controls" autoplay="autoplay"  
        x-webkit-airplay="true" x5-video-player-fullscreen="true"  
        preload="auto" playsinline="true" webkit-playsinline  
        x5-video-player-typ="h5">  
        <source type="application/x-mpegURL" src="http://86/live/cameraid/1000006%240/substream/1.m3u8">  
    </video> -->
    <!--PC-->
       <script src="https://cdn.jsdelivr.net/hls.js/latest/hls.min.js"></script>
       <link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
       
    <video id="video" style=" 640px;height:480px;"></video>
    <script>

      if(Hls.isSupported()) {
        var video = document.getElementById('video');
        var hls = new Hls();
        hls.loadSource('http:///live/cameraid/1000006%240/substream/1.m3u8');
        hls.attachMedia(video);
        hls.on(Hls.Events.MANIFEST_PARSED,function() {
          video.play();
      });
     }
    </script>
    <!--PC-->
     <!--
    <div id="playercontainer"></div>
    <script type="text/javascript" src="http://resource.bcevod.com/player/cyberplayer.js"></script>
    <script type="text/javascript">
        var player = cyberplayer("playercontainer").setup({
            640,
            height: 480,
            file: "/hls/aktv2/aktv2_live.m3u8",
            image: "",
            autostart: true,
            stretching: "uniform",
            repeat: false,
            volume: 100,
            controls: true,
            ak: 'cc94de6803904f2ca7159eedeaced55d'
        });
        -->


    </body>
    </html

  • 相关阅读:
    2008年Web2.0峰会:发展是绝对的硬道理
    盖茨"接班人":微软产品为何总是挨批
    如何使用命令方式检测mx记录是否生效
    IBM公布未来5年将改变人类生活的五大科技
    谷歌李开复:我的传奇人生源于十句箴言
    VCL已死,RAD已死(3)
    VCL已死,RAD已死(2)
    主要程序设计语言范型综论与概要
    谷歌正式放弃与雅虎的广告合作计划
    模仿google分页代码
  • 原文地址:https://www.cnblogs.com/zhouwen2017/p/9015382.html
Copyright © 2011-2022 走看看