This example was tested in Chrome v115.
The following shows how to use the Web player. You can find all the source codes at https://github.com/visionular/example-auroralive-player-web.
-
Download the latest js file
curl -O https://auroralive-player.s3.amazonaws.com/vX.Y.Z/auroralive-player.js
. -
Import the js library.
import { AuroraLivePlayer } from './auroralive-player';
-
Get the element of video.
const video = document.querySelector('video');
-
Create an instance of player, passing some params:
let player: AuroraLivePlayer; if (video) { player = new AuroraLivePlayer({ video: video, iceServers: iceServers, debug: true, statsTypeFilter: '^candidate-*|^inbound-rtp', retry: 0 }); }
-
start the player.
await player.load(new URL(url), token.value);
This example needs node v18+.
npm ci
npm run serve
- open browerser at localhost:2345
- visit
player.visionular.com
- disable
chrome://flags/#block-insecure-private-network-requests
if you are using a non-https endpoint url. - fill url and token
- click play