새로운 stream 생성시
this.session.on('streamCreated', ({stream}) => {
const subscriber = this.session.subscribe(stream);
this.subscribers.push(subscriber);
});
stream 소멸시
this.session.on('streamDestroyed', ({ stream }) => {
const index = this.subscribers.indexOf(stream.streamManager, 0);
if (index >= 0) {
this.subscribers.splice(index, 1);
}
});
오류 발생시
this.session.on('exception', ({ exception }) => {
console.warn(exception);
});