A Typescript library that simplifies vidaoo browser session handling.
Vidaoo's video sessions are based on native WebRTC and allows the integration with any technology capable of using this protocol.
vidaoo-browser is a Typescript library that greatly simplifies the management of Vidaoo sessions in the browser and allows the integration with Vidaoo backend hiding the native WebRTC complexity.
The library documentation is available here.
A basic understanding of how RxJS's Subject works is needed.
Knowledge about retrieving devices' Ids using browser API is needed if you want to use non-default devices or you want to change them during the session.
Using NPM:
npm install vidaoo-browser
Import required packages:
import { Subscription } from 'rxjs';
import * as Vidaoo from 'vidaoo-browser';
Joining a meeting:
// Create the Session
const session = new Vidaoo.Session();
// Subscribe to events emmited by Session
const sessionSubscription = session.emitter.subscribe((data: Vidaoo.ISessionEmittedData) => {
// Handle data coming from Session
// A list of all data types coming from Session is available in the documentation
});
// Join the meeting
session.joinMeeting({
meetingId: meetingId, // mettingId obtained from Vidaoo API
webSocketUrl: 'https://vidaoo-url.com/meetings' // Vidaoo base url + '/meetings'
});
After leaving a meeting:
sessionSubscription.unsubscribe();
session.dispose();