Engine for Kaltura Player that supports document type sources
npm install @playkit-js/document-player


playkit-js-document-player is a [kaltura player] engine enabling [kaltura player] to play an Doc
playkit-js-document-player is written in [ECMAScript6] (.js) and [TypeScript] (.ts) (strongly typed superset of ES6),
and transpiled in ECMAScript5 using Babel and the [TypeScript compiler].
[Webpack] is used to build the distro bundle and serve the local development environment.
[kaltura player]: https://github.com/kaltura/kaltura-player-js.
[ecmascript6]: https://github.com/ericdouglas/ES6-Learning#articles--tutorials
[typescript]: https://www.typescriptlang.org/
[typescript compiler]: https://www.typescriptlang.org/docs/handbook/compiler-options.html
[webpack]: https://webpack.js.org/
There are two modes an Doc playback can be played in the Kaltura player
Doc can be played as one of the following modes
- Non-Durational Doc
- Durational Doc
Non-Durational Docs will be displayed by the player without a seek bar and the standard player controls (except the full-screen button)
Durational Docs will be played by the player as if it is a video,
with seek bar and all standard player controls
In fact it will behave just like a video for everything
If the Doc is played as part of a playlist, it will automatically play as a Durational Doc with a default duration of 5 seconds
The Doc mode will be determined according to the duration configured with the entry
``shFirst, checkout the repository and install the required dependencies
git clone https://github.com/kaltura/playkit-js-document-player.git
The dev server will host files on port 8000. Once started, the demo can be found running at http://localhost:8000/.
Before submitting a PR, please see our contribution guidelines.
$3
Run linter:
`
npm run lint
`Run linter with auto-fix mode:
`
npm run lint:fix
`$3
Run prettier to format code
`
npm run prettier
`$3
Run type-check to verify TypeScript types
`
npm run type-check
`$3
Then, build the plugin
`javascript
yarn run build
`$3
The plugin uses
cypress tool for e2e tests`javascript
yarn run test
`UI conf file (
cypress/public/ui-conf.js) contains Kaltura player and plugin dependencies.
Keep Kaltura player and dependency versinos aligned to currently released versions.$3
Finally, add the bundle as a script tag in your page, and initialize the player
`html
`#### Configuration Structure
`js
//Default configuration
"playkit-js-document-player" = {};
//Plugin params
"playkit-js-document-player" = {
basePreviewUrl?: string, // optional
downloadDisabled?: boolean // optional
}
`
##> ### config.basePreviewUrl
>
> ##### Type:
string
>
> ##### Default: "";
>##
> ### config.downloadDisabled
>
> ##### Type:
boolean
>
> ##### Default: true`playkit-js-document-player is supported on:
- Chrome 39+ for Android
- Chrome 39+ for Desktop
- Firefox 41+ for Android
- Firefox 42+ for Desktop
- IE11 for Windows 8.1+
- Edge for Windows 10+
- Safari 8+ for MacOS 10.10+
- Safari for ipadOS 13+
playkit-js-document-player is released under Apache 2.0 License