Skip to content

Instantly share code, notes, and snippets.

View sunny7899's full-sized avatar
🏠
Working from home

sunny sunny7899

🏠
Working from home
View GitHub Profile
import AgoraRTC, { IAgoraRTCClient, LiveStreamingTranscodingConfig, ICameraVideoTrack, IMicrophoneAudioTrack, ScreenVideoTrackInitConfig, VideoEncoderConfiguration, AREAS, IRemoteAudioTrack, ClientRole } from "agora-rtc-sdk-ng"
import { BehaviorSubject } from 'rxjs';
import { ApiService } from './api.service';
rtc: IRtc = {
// For the local client.
client: null,
// For the local audio and video tracks.
localAudioTrack: null,
localVideoTrack: null,
hideBtns = true;
async startCall() {
const uid = this.stream.generateUid();
const rtcDetails = await this.stream.generateTokenAndUid(uid);
this.stream.createRTCClient();
this.stream.agoraServerEvents(this.stream.rtc);
await this.stream.localUser(rtcDetails.token, uid);
this.hideBtns = false;
<div class="container-fluid banner">
<p class="banner-text">Video Call</p>
</div>
<div class="container">
<form id="join-form" name="join-form" class="mt-4">
<div class="row join-info-group">
<div class="col-sm">
<p class="join-info-text">Join call</p>