Adding connecting spinner and blinking error to webrtc display

I put a connecting spinner around the user name when the user is connecting.
Also, if an error occurs, we will see a blinking red circle around the player name.
This commit is contained in:
David Négrier 2020-06-06 22:49:55 +02:00
parent 96c5d92c46
commit f2c9647882
3 changed files with 100 additions and 1 deletions

View file

@ -161,9 +161,11 @@ export class SimplePeer {
peer.on('error', (err: any) => {
console.error(`error => ${user.userId} => ${err.code}`, err);
this.MediaManager.isError(user.userId);
});
peer.on('connect', () => {
this.MediaManager.isConnected(user.userId);
console.info(`connect => ${user.userId}`);
});