UNPKG

@playkit-js/kwebcast-ended-message

Version:

Allows administrators to configure a message that will will be displayed at the end of a kWebcast event.

85 lines (54 loc) 2.14 kB
[![](https://img.shields.io/npm/v/@playkit-js/kwebcast-ended-message/latest.svg)](https://www.npmjs.com/package/@playkit-js/kwebcast-ended-message) [![](https://img.shields.io/npm/v/@playkit-js/kwebcast-ended-message/canary.svg)](https://www.npmjs.com/package/@playkit-js/kwebcast-ended-message/v/canary) # playkit-js-kwebcast-ended-message This player plugin shows a configurable message at the end of a kWebcast (Kaltura Webcast) event. You can configure a different message if the broadcast ended early (early = at least 10 minutes ahead of the scheduled end time), such as "This event has ended earlier than scheduled, enjoy the free time!" ## Features Note: this plugin only works with live entries created by the kWebcast module. When a live broadcast has been watched by the user and the stream goes offline, show the "webcast ended" message (configured). ## Config ``` /** The message that shows up at the end of the broadcast */ message: string; /** (Optional) The title */ title: string; /** (Optional) If the broadcast ends early (10 minutes or more before the scheduled end time), show this message */ endedEarlyMessage: string; ``` ## Getting started with development ```sh # First, checkout the repository and install the required dependencies git clone https://github.com/kaltura/playkit-js-kwebcast-ended-message.git # Navigate to the repo dir cd playkit-js-kwebcast-ended-message # Run dev-server for demo page (recompiles on file-watch, and write to actual dist fs artifacts) yarn serve The dev server will host files on port 8000. Once started, the demo can be found running at http://localhost:8000/. ``` npm run lint:check ``` Run linter with auto-fix mode: ``` npm run lint:fix ``` ### Formatting Code Run prettier to format code ``` npm run prettier:fix ``` ### Type Check Run type-check to verify TypeScript types ``` npm run types:check ``` ### Automated tests (Mocha/Karma) Run all tests at once: ``` npm test ``` Run unit tests in watch mode: ``` npm run test:watch ``` ## License This project is licensed under the AGPL-3.0 License - see the [LICENSE](LICENSE) file for details