catch videoSnap error.

This commit is contained in:
Miroslav Šedivý 2022-03-19 00:23:57 +01:00
parent 33245fea03
commit a58ae0b95f

View File

@ -254,8 +254,12 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
}
// create and emit video snap before closing connection
try {
const imageSrc = await videoSnap(this.video)
this.emit('fallback', imageSrc)
} catch (error: any) {
this._log.warn(`unable to generate video snap`, { error })
}
this._peer.close()
}