@phenixrts/video-js-plugin

2023.0.0 • Public • Published

Phenix RTS SDK VideoJs plugin

This project demonstrates the integration of the popular web video player video.js with the PheixRTS SDK.

Setup

  1. Install phenix RTS SDK VideoJs plugin
    npm i @phenixrts/video-js-plugin
  2. Install phenix RTS SDK
    npm i @phenixrts/sdk
  3. Initialize videojs with phenix RTS SDK VideoJs plugin
        import videojs from 'video.js';
        import PhenixRtsVideoJsPlugin from '@phenixrts/video-js-plugin';
        ...
        videojs.registerPlugin('PhenixRtsSdkPlugin', PhenixRtsVideoJsPlugin);
        videojs('my-video', {...}, function onPlayerReady() {
          const phenixrts = this.PhenixRtsSdkPlugin({
              token: 'DIGEST:....' // PhenixRTS edge token
          });
          ...
        });

Run the example

  1. Publish a stream via Phenix RTS Portal.
  2. Make sure you are in the examples folder.
  3. Start the example with:
    npm run start
  4. Create a viewing token using the Phenix RTS Portal.
    • Go to Channels
    • Select the channel in which the stream was published
    • Go to the EdgeAuth tab
    • Copy the viewing token
  5. Open the locally served URL and add a 'token' query parameter and the previously generated token at the end: http://127.0.0.1:5173/phenixrts-sdk-plugin-for-real-time.html?token=<viewToken>.

Readme

Keywords

none

Package Sidebar

Install

npm i @phenixrts/video-js-plugin

Weekly Downloads

419

Version

2023.0.0

License

See in LICENSE file

Unpacked Size

4.92 kB

Total Files

4

Last publish

Collaborators

  • stefan.birrer