mirror of
https://github.com/m1k1o/neko.git
synced 2025-08-06 10:20:26 +02:00
logging changed.
This commit is contained in:
parent
b9c68107d2
commit
ed197d5c76
4 changed files with 26 additions and 23 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue