JSPM

@playkit-js/transcript

2.1.5-canary.21-e28422e
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 247
  • Score
    100M100P100Q128843F
  • License AGPL-3.0

Package Exports

  • @playkit-js/transcript
  • @playkit-js/transcript/dist/playkit-transcript.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@playkit-js/transcript) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

PlayKit JS Transcript - plugin for the [PlayKit JS Player]

PlayKit JS Transcript is written in ECMAScript6, statically analysed using Typescript and transpiled in ECMAScript5 using Babel.

Getting Started

Prerequisites

The plugin requires Kaltura Player to be loaded first.

Installing

First, clone and run yarn to install dependencies:

git clone https://github.com/kaltura/playkit-js-transcript.git
cd playkit-js-transcript
yarn install

Building

Then, build the player

yarn run build

Embed the library in your test page

Finally, add the bundle as a script tag in your page, and initialize the player

<script type="text/javascript" src="/PATH/TO/FILE/kaltura-player.js"></script>
<!--Kaltura player-->
<script type="text/javascript" src="/PATH/TO/FILE/playkit-transcript.js"></script>
<!--PlayKit transcript plugin-->
<div id="player-placeholder" style="height:360px; width:640px">
  <script type="text/javascript">
    var playerContainer = document.querySelector("#player-placeholder");
    var config = {
     ...
     targetId: 'player-placeholder',
     plugins: {
       transcript: { ... },
       kalturaCuepoints: {}
     }
     ...
    };
    var player = KalturaPlayer.setup(config);
    player.loadMedia(...);
  </script>
</div>

Documentation

TBD

Running the tests

Tests can be run locally via Karma, which will run on Chrome, Firefox and Safari

yarn run test

You can test individual browsers:

yarn run test:chrome
yarn run test:firefox
yarn run test:safari

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

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

Commands

Run dev server: npm run serve;
Update contrib: npm run infra:latest;
Bump version: npm run deploy:prepare;

Configuration

Plugin configuration:
> expandOnFirstPlay: boolean - if plugin should automatically opens on first play (default true);
> forceChaptersThumb: boolean - force to use chapters thumbnails (default false);
> expandMode: string - expand mode of kitchensink (AlongSideTheVideo|OverTheVideo, default "AlongSideTheVideo");
> userRole: string - use session userId as identificator of user (anonymousRole|unmoderatedAdminRole, default "anonymousRole");
> itemsOrder: object< string, number > - define order of Tabs (min value at the left) and Items inside group (min value at the top).
itemsOrder also uses as tabs filter (all items that not included in "itemsOrder" object will be filtered out) (default: { "All": 0, "Chapter": 1, "Slide": 2, "Hotspot": 3, "AnswerOnAir": 4, } );

Troubleshooting

Dev env

Node version: up to 14.18.1
If nvm installed: nvm use change version of current terminal to required.

ARM Architecture support

Install dependencies with npm install --target_arch=x64 set target arch for running it through Rosetta (requires Rosetta installation).