List of supported providers
- daily.co
- twilio
- Jitsi (In progress)
npm install --save video-provider-interface
import VideoProvider from 'video-provider-interface';
const VP = new VideoProvider(VideoProviderLibrary, 'videoProverName');
daily co:
import DailyIframe from '@daily-co/daily-js';
import VideoProvider from 'video-provider-interface';
...
const newCallObject = DailyIframe.createCallObject();
const VP = new VideoProvider(newCallObject, 'dailyco');
twilio:
const Video = require('twilio-video');
import VideoProvider from 'video-provider-interface';
...
const VP = new VideoProvider(Video, 'twilio');
for a custom provider you can always import VideoInterface
import { VideoInterface } from 'video-provider-interface';
class MyCustomProvider extends VideoInterface {}
- join(config: any): void; // VP.join({url: dailyCoURL})
- leave(): void;
- destroy(): void;
- startScreenShare(): void;
- stopScreenShare(): void;
- participants(): Participant[];
- meetingState(): string;
- cycleCamera(): void;
dailyco:
VP.join({ url: 'urlToRoom' });
twilio:
VP.join({ token: 'token', roomName: 'roomName' });
To listen an event you must use
VP.on('event-name', callback);
VP.once('event-name-only-once', callback);
supported events:
- joined
- left
- participant-joined
- participant-updated
- participant-left
- error
- devices-changed
unsubscribe from an event
VP.off('event-name', callback);
clear all events
VP.clearListeners();
VP.logger([eventList], (event, provider, props) => {
console.log(event, providers, props);
});
EE = Everyone Else
Feature | Function Name | DailyCo | Twilio | Jitsi |
---|---|---|---|---|
Join | join(config) | ✔️ | ✔️ | 🔜 |
Leave | leave() | ✔️ | ✔️ | 🔜 |
Mute Camera | setLocalVideo(Boolean) | ✔️ | ✔️ | 🔜 |
Mute Audio | setLocalAudio(Boolean) | ✔️ | ✔️ | 🔜 |
Cycle Camera | cycleCamera() | ✔️ | ✔️ | 🔜 |
start ScreenShare | startScreenShare() | ✔️ | ✔️ | 🔜 |
List Video devices | getVideoDevices() | ✔️ | ✔️ | 🔜 |
List Audio devices | getAudioDevices() | ✔️ | ✔️ | 🔜 |
Select Camera | selectCamera(deviceId) | ✔️ | 🔜 | 🔜 |
Select Audio | selectAudio(deviceId) | ✔️ | 🔜 | 🔜 |
mute EE Audio | muteEEAudio() | 🔜 | 🔜 | 🔜 |
mute EE Video | muteEEVideo() | 🔜 | 🔜 | 🔜 |
kick out | kick(id) | 🔜 | 🔜 | 🔜 |
Adjust Volume | setVolume(level) | 🔜 | 🔜 | 🔜 |
Active Speaker Mode | setActiveSpeakerView(level) | 🔜 | 🔜 | 🔜 |
Present Custom Video Stream | sendCustomStream(streamMedia,presenter) | 🔜 | ✔️ | 🔜 |