openvidu-components: Printed openvidu exception

pull/761/head
Carlos Santos 2022-11-15 17:31:51 +01:00
parent 495572035f
commit b9fb8942c5
1 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import {
} from '@angular/core';
import {
ConnectionEvent,
ExceptionEvent,
RecordingEvent,
Session,
SessionDisconnectedEvent,
@ -171,6 +172,7 @@ export class SessionComponent implements OnInit, OnDestroy {
}
this.session = this.openviduService.getWebcamSession();
this.sessionScreen = this.openviduService.getScreenSession();
this.subscribeToOpenViduException();
this.subscribeToCaptionLanguage();
this.subscribeToConnectionCreatedAndDestroyed();
this.subscribeToStreamCreated();
@ -274,6 +276,12 @@ export class SessionComponent implements OnInit, OnDestroy {
}
}
private subscribeToOpenViduException() {
this.session.on('exception', (event: ExceptionEvent) => {
this.log.e(event.name, event.message);
});
}
private subscribeToConnectionCreatedAndDestroyed() {
this.session.on('connectionCreated', (event: ConnectionEvent) => {
const connectionId = event.connection?.connectionId;