HLS Streaming Examples

VideoJs player with Nuevo theme and plugin HLS streaming tests
Demo 1 Demo 2 Demo 3
HTTP Live Streaming (HLS) has become a de-facto standard for streaming video on desktop and on mobile devices thanks to its native support on iOS and Android.
Video example above is HLS adaptive bitrate streaming based on m3u8 manifest file. Nuevo plugin for videojs has built in HLS stream quality selector, which appears automatically for desktop PC. Changing quality is not immediate, as it can be changed only from video fragment to fragment.

videojs HLS streaming supports a bunch of HLS features. Here are some highlights:
  • video-on-demand and live playback modes.
  • backup or redundant streams.
  • mid-segment quality switching.
  • AES-128 segment encryption.
  • CEA-608 captions are automatically translated into standard HTML5 caption text tracks.
  • Timed ID3 Metadata is automatically translated into HTML5 metedata text tracks.
  • Highly customizable adaptive bitrate selection.
  • Automatic bandwidth tracking.
  • Cross-domain credentials support with CORS.
  • Tight integration with video.js and a philosophy of exposing as much as possible with standard HTML APIs.
  • Stream with multiple audio tracks and switching to those audio tracks.
  • Media content in fragmented MP4s instead of the MPEG2-TS container format.

<script type=text/javascript" src="//domain.com/video-js/video.min.js"></script>
// For videojs 7 version do not load videojs-contrib-hls.min.js plugin 
<script type=text/javascript" src="//domain.com/video-js/plugins/videojs-contrib-hls.min.js"></script>
<script type=text/javascript" src="//domain.com/video-js/nuevo.min.js"></script>

<video id="myplayer" class="video-js vjs-default-skin" poster="//domain.com/path/to/poster.jpg" controls preload="auto">
  <source src="//domain.com/path/to/playlist.m3u8" type="application/x-mpegURL">

// Optionally override HTML native playback
videojs.options.hls.overrideNative = true;
videojs.options.html5.nativeAudioTracks = false;
videojs.options.html5.nativeTextTracks = false;

//Initialize videojs player
var player = videojs('myplayer',{},function(){ 
		logo: "//domain.com/path/to/logo.png",
		logourl: "/domain.com",
		nextoption: option_value