Skip to content

tbbravo/hls.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hls.js

pc hls playback based on video.js

usage

<html>
  <head>
    <link rel="stylesheet" href="/dist/hls.css">
  </head>
  <body>
    <video id="my-video" class="video-js vjs-default-skin" width="640" height="360"></video>

    <script src="./dist/video.js"></script>

    <!--[if (gt IE 9) & (!IE)]>-->
      <script src="./dist/hls.js"></script>
    <!--<![endif]-->
    <script>

        var player = hls('my-video', {
            src: 'http://xxx.m3u8'
        });
    </script>
  </body>
</html>

step

  1. build
npm install
gulp build
  1. run
gulp server
  1. watch demo
(http://localhost:3000/example.html)[http://localhost:3000/example.html]
  1. no 4 step :)