VideoJS m3u8 example

Here is an example of how to use video.js with HTTP Live Streaming (HLS) with an m3u8 playlist file:

< !doctype html>
<html>
  <head>
    <link rel="nofollow" href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet"/>
    <script src="http://vjs.zencdn.net/c/video.js"></script>
  </head>
  <body>
    <video id="my_video_1" class="video-js vjs-default-skin" controls
        preload="auto" width="640" height="264" poster="my_video_poster.png"
        data-setup="{}">
        <source src="http://server.name.tld/HLS/path.m3u8" type='application/vnd.apple.mpegurl'/>
    </video>
  </body>
</html>

via

Related Posts:

  • No Related Posts
This entry was posted in Web Development and tagged , , , . Bookmark the permalink.

3 Responses to VideoJS m3u8 example

  1. Helder Barg√£o Robalo says:

    There’s a plugin to support HLS (apple m3u8).

    Search in github to this repo: videojs/videojs-contrib-hls

  2. David Oshiro says:

    Firefox and Chrome do not natively support m3u8.

  3. Joshua Hanks says:

    Yes, this works great in Safari but not in Firefox nor in Chrome. Any idea why? Thanks for your article. JH

Leave a Reply

Your email address will not be published. Required fields are marked *