This project demonstrates the integration of the popular web video player Bitmovin with the PhenixRTS SDK.
- Install the Bitmovin web-x player
npm i @bitmovin/player-web-x
- Install the Phenix RTS SDK Bitmovin plugin
npm i @phenixrts/bitmovin-plugin
- Install the Phenix RTS SDK
npm i @phenixrts/sdk
- Initialize the web-x player with the Phenix RTS SDK Bitmovin plugin
import { Player } from '@bitmovin/player-web-x/bundles/playerx-core'; ... import { PhenixSdkApi } from '@phenixrts/bitmovin-plugin'; import { PhenixSdkPlugin } from '@phenixrts/bitmovin-plugin/dist/phenix-sdk-plugin'; ... const player = Player({ key: <bitmovin_key>, ui: false }); player.packages.add(PhenixSdkApi); player.packages.add(PhenixSdkPlugin); ... const channel = player.phenixrts.createChannel(<token>)
- Publish a stream via Phenix RTS Portal.
- Make sure you are in the
examples
folder and run:npm install
- 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 at the end add a 'token' query parameter and the previously generated token:
http://127.0.0.1:5173/phenixrts-sdk-plugin-for-real-time.html?token=<viewToken>
.