logging changed.

This commit is contained in:
Miroslav Šedivý 2021-01-15 17:17:49 +01:00
parent b9c68107d2
commit ed197d5c76
4 changed files with 26 additions and 23 deletions

View file

@ -41,7 +41,7 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
}
public async connect(sdp: string, lite: boolean, servers: string[]): Promise<string> {
this._log.debug(`creating peer`)
this._log.info(`connecting`)
if (!this.supported) {
throw new Error('browser does not support webrtc')
@ -194,14 +194,14 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
return
}
this._log.debug(`connected`)
this._log.info(`connected`)
this.emit('connected')
}
private onDisconnected(reason?: Error) {
this.disconnect()
this._log.debug(`disconnected:`, reason?.message)
this._log.info(`disconnected:`, reason?.message)
this.emit('disconnected', reason)
}
}