import { Component, OnInit,AfterContentInit , Inject, NgZone } from ‘@angular/core’;
//import { ZoomMtg } from ‘@zoomus/websdk’;
@Component({
selector: ‘app-root’,
templateUrl: ‘./app.component.html’,
styleUrls: [‘./app.component.css’]
})
export class AppComponent implements OnInit , AfterContentInit {
ngOnInit(): void {
//throw new Error(‘Method not implemented.’);
}
async ngAfterContentInit():Promise {
debugger;
const {ZoomMtg} = await import (‘@zoomus/websdk’);
ZoomMtg.setZoomJSLib(‘https://source.zoom.us/2.9.7/lib’, ‘/av’);
ZoomMtg.preLoadWasm();
ZoomMtg.prepareWebSDK();
let payload = {
sdkKey: ‘Y2XRKN1D51JM7dl6GD4sE0ykczuB7gatmFUz’,
meetingNumber: ‘8830392446’,
passWord: ‘rpc70E’,
role: ‘0’,
userName: ‘Ajaj Ahmed’,
sdkSecret:‘HgjQlFW91D0y5m1to7pVblnW66uV0oDq4SPw’,
userEmail: ‘ragini.lal@chipsoftindia.com’,
leaveUrl: ‘http://localhost:57968’
}
ZoomMtg.generateSDKSignature({
meetingNumber:payload.meetingNumber,
role:payload.role,
sdkKey:payload.sdkKey,
sdkSecret:payload.sdkSecret,
success:function(signature:any)
{
ZoomMtg.init({
leaveUrl: payload.leaveUrl,
success: function (_data:any)
{
ZoomMtg.join({
meetingNumber: payload.meetingNumber,
passWord: payload.passWord,
sdkKey: payload.sdkKey,
userName: payload.userName,
userEmail: payload.userEmail,
signature: signature.result,
//tk:'',
success: function (data:any) {
console.log(data)
},
error:function(error:any){
console.log('----Error join----',error)
}
})
},
error:function(error:any){
console.log('----Error Init----',error)
}
})
},
error:function(error:any){
console.log(error);
}
})
}
}