Package Exports
- videojs-flvjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (videojs-flvjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
videojs-flvjs
Video.js tech to use flv.js for FLV playback using MSE instead of Flash.
Check out the flv.js docs for details on its capabilities, browser support etc. Note that you need CORS headers if your video is being hosted at a different origin.
Installation
npm install --save videojs-flvjsUsage
To include videojs-flvjs on your website or web application, use any of the following methods.
<script> Tag
This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available. You also need to include flv.js.
<script src="//path/to/video.min.js"></script>
<script src="//path/to/flv.js"></script>
<script src="//path/to/videojs-flvjs.min.js"></script>
<script>
var player = videojs('my-video', {
techOrder: ['html5', 'flvjs']}
});
</script>You only need to set the techOrder in Video.js version 5. In version 6 techs add themselves to the default techorder. If you are using both the flash and flvjs techs, flvjs should come first.
Browserify
When using with Browserify, install videojs-flvjs via npm and require the plugin as you would any other module.
var videojs = require('video.js');
// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-flvjs');
var player = videojs('my-video');
player.flvjs();RequireJS/AMD
When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:
require(['video.js', 'videojs-flvjs'], function(videojs) {
var player = videojs('my-video');
player.flvjs();
});License
Apache-2.0. Copyright (c) mister-ben