@scorum/clappr-flvjs-playback
v3.4.0
Published
clappr flv playback based on flv.js
Downloads
2
Keywords
Readme
FLVJSPlayback
A clappr FLV playback based on flv.js
Usage
Add Clappr, flv.js and the plugin scripts to your HTML:
<head>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr@latest/dist/clappr.min.js"></script>
<!--
THIS PLUGIN IS ALSO COMPATIBLE WITH CLAPPR-CORE
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@clappr/core@latest/dist/clappr-core.min.js"></script>
--->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/flv.js@latest/dist/flv.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/clappr-flvjs-playback@latest/dist/clappr-flvjs-playback.min.js"></script>
</head>
Then just add FLVJSPlayback
into the list of plugins of your player instance, and the options for the plugin go in the flvjsConfig
property as shown below.
var player = new Clappr.Player({
source: "http://your.flv.video",
mimeType: 'video/flv',
plugins: [ FLVJSPlayback ],
playback: {
flvjsConfig: {
enableLogging: true, // default is "false"
// Params from flv.js
}
}
});
Configuration
The parameters of flvjsConfig
are completely equal to the parameters of flv.js
enableLogging
- enable or disable flv.js logging
Development
Install dependencies:
npm install
Start HTTP dev server http://localhost:8080
:
npm start
Build
Minified version of plugin will be placed at dist/clappr-flvjs-playback.min.js
npm run build
Lint
Run linter:
npm run lint
Fix lint errors:
npm run lint:fix
Issues
Feel free to submit issues and enhancement requests.