2022-02-11 13:18:50 +01:00
|
|
|
import { Component, ContentChild, OnInit } from '@angular/core';
|
2022-01-19 17:24:11 +01:00
|
|
|
import { RestService } from '../services/rest.service';
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
@Component({
|
|
|
|
selector: 'app-call',
|
|
|
|
templateUrl: './call.component.html',
|
|
|
|
styleUrls: ['./call.component.scss']
|
|
|
|
})
|
|
|
|
export class CallComponent implements OnInit {
|
2022-02-11 13:18:50 +01:00
|
|
|
|
|
|
|
|
2022-01-19 17:24:11 +01:00
|
|
|
sessionId = 'prueba-majestuosa-amable';
|
|
|
|
tokens: { webcam: string; screen: string };
|
|
|
|
|
|
|
|
joinSessionClicked: boolean = false;
|
|
|
|
closeClicked: boolean = false;
|
|
|
|
isSessionAlive: boolean = false;
|
|
|
|
|
|
|
|
constructor(private restService: RestService, private router: Router) {}
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
// this.onJoinClicked();
|
|
|
|
}
|
|
|
|
|
|
|
|
async onJoinClicked() {
|
|
|
|
this.tokens = {
|
|
|
|
webcam: await this.restService.getToken(this.sessionId),
|
|
|
|
screen: await this.restService.getToken(this.sessionId)
|
|
|
|
};
|
|
|
|
|
2022-02-04 10:54:17 +01:00
|
|
|
// this.joinSessionClicked = true;
|
|
|
|
// this.isSessionAlive = true;
|
2022-01-19 17:24:11 +01:00
|
|
|
}
|
|
|
|
onCloseClicked() {
|
|
|
|
this.closeClicked = true;
|
|
|
|
this.router.navigate([`/`]);
|
|
|
|
}
|
|
|
|
|
|
|
|
onMicClicked() {}
|
|
|
|
|
2022-02-03 17:08:23 +01:00
|
|
|
onCamClicked() {
|
|
|
|
console.log('APP: CAM CLIKED')
|
|
|
|
}
|
2022-01-19 17:24:11 +01:00
|
|
|
|
|
|
|
onScreenShareClicked() {}
|
|
|
|
|
|
|
|
onSpeakerLayoutClicked() {}
|
|
|
|
|
|
|
|
onLeaveSessionClicked() {
|
|
|
|
this.isSessionAlive = false;
|
|
|
|
}
|
|
|
|
}
|