Introduction
Description
Welcome to Januscaler Video Call Documentation
Unlock Real-Time Communication with Januscaler Video Call
The Video Call service allows you to implement high-quality, real-time video communications. It’s perfect for applications where direct peer-to-peer interaction is essential, such as virtual meetings, online consultations, or remote collaboration.
Key Features of Video Call Service
Getting Started with Video Call Service
To get started with our Video Call service, follow these simple steps:
- Set up your Januscaler account and obtain your API keys.
- Install the Januscaler SDK in your project.
- Use the provided API documentation to implement your video call features.
index.js
import { JanusScaler } from 'januscaler-sdk';
class VideoCall {
private client: JanusScaler;
private videoCallSession: any;
constructor(apiKey: string) {
this.client = new JanusScaler(apiKey);
}
async init() {
try {
await this.client.initialize();
this.videoCallSession = await this.client.createSession();
} catch (error) {
console.error('Failed to initialize video call:', error);
}
}
async startCall(participantId: string) {
try {
const call = await this.videoCallSession.createCall({
participantId,
video: true,
audio: true,
});
console.log('Video call started:', call);
} catch (error) {
console.error('Failed to start call:', error);
}
}
async endCall() {
try {
await this.videoCallSession.end();
console.log('Video call ended');
} catch (error) {
console.error('Failed to end call:', error);
}
}
}
// Usage example
const videoCall = new VideoCall('YOUR_API_KEY');
videoCall.init();
videoCall.startCall('participant-id');