@playkit-js/playkit-js-downloads
v1.4.8
Published
[](https://github.com/kaltura/playkit-js-downloads/actions/workflows/run_canary.yaml) [;
var config = {
...
targetId: 'player-placeholder',
plugins: {
uiManagers: {},
download: {
flavorParamId: null, // id of the flavor type to be downloaded. optional.
flavorId: null, // id of the specific flavor type for a specific entry. optional.
preDownloadHook: null // function to be called before download is initiated. optional.
}
},
ui: {
translations: { // for local development
en: {
download: {
download: "Download",
downloads: "Downloads",
"download_has_started": "Download has started",
"download_has_failed": "Download has failed"
}
}
}
}
...
};
var player = KalturaPlayer.setup(config);
player.loadMedia(...);
</script>
</div>Configuation Example
- You may enable the download plugin just by adding it without any specific plugin config to the plugins config section or also add your own preferred config
plugins: {
download: {}
}plugins: {
download: {
flavorParamId: null, // id of the flavor type to be downloaded. optional.
flavorId: null, // id of the specific flavor type for a specific entry. optional.
preDownloadHook: null, // function to be called before download is initiated. optional.
displayFlavors: boolean, // a flag indicating whether to display flavors to download. optional. default is true.
displayCaptions: boolean, // a flag indicating whether to display captions to download. optional. default is true.
displayAttachments: boolean // a flag indicating whether to display attachments to download. optional. default is true.
displaySources: boolean // a flag indicating whether to display media sources to download. optional. default is true.
}
}And coding style tests
We use ESLint recommended set with some additions for enforcing [Flow] types and other rules.
See ESLint config for full configuration.
We also use .editorconfig to maintain consistent coding styles and settings, please make sure you comply with the styling.
Compatibility
TBD test test test !!! test test ?!
Contributing
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
License
This project is licensed under the AGPL-3.0 License - see the LICENSE.md file for details
