@phenixrts/video-js-plugin
v2024.2.1
Published
Phenix Real Time Solutions VideoJs plugin
Downloads
15
Readme
Phenix RTS SDK VideoJs plugin
This project demonstrates the integration of the popular web video player video.js with the PheixRTS SDK.
Setup
Install phenix RTS SDK VideoJs plugin
npm i @phenixrts/video-js-plugin
Install phenix RTS SDK
npm i @phenixrts/sdk
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
Publish a stream via Phenix RTS Portal.
Make sure you are in the
examples
folder.Start the example with:
npm run start
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
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>
.