mirror of https://github.com/OpenVidu/openvidu.git
openvidu-components: Printed openvidu exception
parent
495572035f
commit
b9fb8942c5
|
@ -15,6 +15,7 @@ import {
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
ConnectionEvent,
|
ConnectionEvent,
|
||||||
|
ExceptionEvent,
|
||||||
RecordingEvent,
|
RecordingEvent,
|
||||||
Session,
|
Session,
|
||||||
SessionDisconnectedEvent,
|
SessionDisconnectedEvent,
|
||||||
|
@ -171,6 +172,7 @@ export class SessionComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
this.session = this.openviduService.getWebcamSession();
|
this.session = this.openviduService.getWebcamSession();
|
||||||
this.sessionScreen = this.openviduService.getScreenSession();
|
this.sessionScreen = this.openviduService.getScreenSession();
|
||||||
|
this.subscribeToOpenViduException();
|
||||||
this.subscribeToCaptionLanguage();
|
this.subscribeToCaptionLanguage();
|
||||||
this.subscribeToConnectionCreatedAndDestroyed();
|
this.subscribeToConnectionCreatedAndDestroyed();
|
||||||
this.subscribeToStreamCreated();
|
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() {
|
private subscribeToConnectionCreatedAndDestroyed() {
|
||||||
this.session.on('connectionCreated', (event: ConnectionEvent) => {
|
this.session.on('connectionCreated', (event: ConnectionEvent) => {
|
||||||
const connectionId = event.connection?.connectionId;
|
const connectionId = event.connection?.connectionId;
|
||||||
|
|
Loading…
Reference in New Issue