Archive of https://github.com/drakmor/videojs-flashls — Videojs plugin for HLS support using the flashls plugin https://github.com/drakmor/videojs-flashls
  • JavaScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2015-08-13 10:40:52 -07:00
.gitignore First version of flashls plugin. 2015-08-03 12:58:34 -07:00
README.md Adding a todo item to the readme for "hls_*" config options 2015-08-05 12:10:58 -07:00
videojs.flashls.js Pinning down hls_startfromlevel turned out to be a bad default 2015-08-13 10:40:43 -07:00

videojs-flashls

Introduction

The flashls project brings HLS support to many video players (flowplayer, videojs, osmf, etc). It has support for videojs, but it takes some effort to wire it up. This plugin makes the integration easier.

Installation

  1. Download the fork of video-js.swf created for flashls: [https://github.com/mangui/video-js-swf/blob/master/dist/video-js.swf]

Why? For flashls to work with videojs, mangui has made a fork of the video-js.swf which adds in HLS support.

To see the flashls/videojs demo, go here

  1. Install the videojs.flashls.js script in your application.

Usage

All you need todo is call the flashls plugin and pass it the url for the video-js.swf asset.

Warning: you MUST initialize the flashls plugin before you initialize your video player, otherwise the plugin won't work. Why? When you initialize your video player, it examines your video sources and determines what player tech to use. The flashls plugin adds a tech adapter to videojs, so this must happen before the player determines what player tech to use.

// init the flashls plugin
videojs.flashls({swfUrl: "http://localhost:3000/path/to/flashls/video-js.swf"});

// init your player
videojs("video_id", {}).ready(function(){
	console.log("player is ready!");
});

TODO

  • Allow the user to pass in/override "hls_*" configuration options
  • Commonjs/browserify support
  • Automated tests: unit tests (karma + mocha) + integration (sauce + selenium + different versions of videojs)
  • npm and bower support