paella-weblecture-plugin
v1.0.3
Published
Another plugin for Paella Player
Downloads
13
Maintainers
Readme
paella-weblecture-plugin
Another Paellaplayer plugin for timing control
Requirements
- node
- npm
Development
npm run dev
Open in your browser:
http://localhost:8080/?id=captions&time=3m8s,4m10s,420s
Production build
npm run build
Player config:
For automatic installation you would like to set up your package manifest:
Include your plugin in your package.json file:
"dependencies": {
"file-loader": "^6.2.0",
"paella-basic-plugins": "^1.0.0-beta.5",
"paella-core": "^1.0.0-beta.26",
...
"paella-weblecture-plugin": "^1.0.0-alfa.3"
}
Also in the index.js file:
import getweblecturePluginContext from 'paella-weblecture-plugin';
const initParams = {
customPluginContext: [
require.context("./plugins", true, /\.js/),
getBasicPluginContext(),
...
getweblecturePluginContext()
],
repositoryUrl: 'repository',
getVideoId: getMyVideoIdFunction
};
Do not forget to declare it in the config.json file, enabling it and defining the default values for the parameters:
"ch.cern.paella.cernPlugin": {
"enabled": true,
"order": 0,
"time": 0,
"stop": 0,
"auth": false,
"loop": false,
"mute": false,
"autoplay": true,
"showButtons": true,
"target": "presenter"
}
Valid parameters:
- time: a sigle value or multiple comma separate list of values, as numbers or hms formated. Ex: time=3000,01h12m,2000,3m8s,2500,800,45s. hms format will be coverted to seconds internally. The array will be ordered for time navigation: [0, 45, 188, 800, 2000, 2500, 3000, 4320]. Incorrect values will be transformed to numbers or removed: time=3000,01h12m,200000,3m8s,fail,45r2,gty,253j,h65m
- stop: automatic stopping when time arises to this value. Also acepted as a number or hms.
- mute: [true|false]. Sets the volume to 0 after loading.
Navigation buttons:
Should be enabled: "showButtons": true.
At least one value for the time parameter should be parsed. On the contrary, the navigation bar will be hidden.