Setup Meeting using NPM package manager
Prebuilt SDK enables opportunity to integrate real-time communication SDK without writing explicit code. It just requires 10 minutes to integrate.
It supports all the modern frameworks such as plain JavaScript, React JS, Vue and Angular.
Step 1: Install Package
- NPM
- YARN
npm install @videosdk.live/rtc-js-prebuilt
yarn add @videosdk.live/rtc-js-prebuilt
Step 2: Initialize Meeting
Copy API key generated from Signup & Create API Key , paste it in to apiKey
attribute.
- React
- Angular
- Vue
import React, { useEffect } from "react";
import { VideoSDKMeeting } from "@videosdk.live/rtc-js-prebuilt";
export default function App() {
useEffect(() => {
const config = {
name: "Demo User",
meetingId: "milkyway",
apiKey: "<API KEY>",
containerId: null,
micEnabled: true,
webcamEnabled: true,
participantCanToggleSelfWebcam: true,
participantCanToggleSelfMic: true,
chatEnabled: true,
screenShareEnabled: true,
/*
Other Feature Properties
*/
};
const meeting = new VideoSDKMeeting();
meeting.init(config);
}, []);
return <div></div>;
}
Stuck anywhere? Check out this react example code on github or download the full source code and unzip on your computer.
import { Component, OnInit } from "@angular/core";
import { VideoSDKMeeting } from "@videosdk.live/rtc-js-prebuilt";
import { environment } from "./../environments/environment";
@Component({
selector: "app-root",
templateUrl: "./app.component.html",
})
export class AppComponent implements OnInit {
async ngOnInit() {
const config = {
name: "Demo User",
meetingId: "milkyway",
apiKey: "<API KEY>",
containerId: null,
micEnabled: true,
webcamEnabled: true,
participantCanToggleSelfWebcam: true,
participantCanToggleSelfMic: true,
chatEnabled: true,
screenShareEnabled: true,
/*
Other Feature Properties
*/
};
const meeting = new VideoSDKMeeting();
meeting.init(config);
}
}
Stuck anywhere? Check out this angular example code on github or download the full source code and unzip on your computer.
<script>
import { VideoSDKMeeting } from "@videosdk.live/rtc-js-prebuilt";
export default {
name: "App",
data() {
return {
name: "Flavio",
};
},
mounted: async function() {
const config = {
name: "Demo User",
meetingId: "milkyway",
apiKey: "<API KEY>",
containerId: null,
micEnabled: true,
webcamEnabled: true,
participantCanToggleSelfWebcam: true,
participantCanToggleSelfMic: true,
chatEnabled: true,
screenShareEnabled: true,
/*
Other Feature Properties
*/
};
const meeting = new VideoSDKMeeting();
meeting.init(config);
},
};
</script>
Stuck anywhere? Check out this vue example code on github or download the full source code and unzip on your computer.
Step 3: Run the application
Now, final step is to run the application and verify prebuilt in browesr.
$ npm start
Got a Question? Ask us on discord