vidaoo-browser

A Typescript client library that make the creation of a Vidaoo WebRTC session simple

Usage no npm install needed!

<script type="module">
  import vidaooBrowser from 'https://cdn.skypack.dev/vidaoo-browser';
</script>

README

img

vidaoo-browser

A Typescript library that simplifies vidaoo browser session handling.

Features

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.

Documentation

The library documentation is available here.

Prerequisites

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.

Installation

Using NPM:

npm install vidaoo-browser

Basic usage

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();