mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
catch videoSnap error.
This commit is contained in:
parent
33245fea03
commit
a58ae0b95f
@ -254,8 +254,12 @@ export class NekoWebRTC extends EventEmitter<NekoWebRTCEvents> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// create and emit video snap before closing connection
|
// create and emit video snap before closing connection
|
||||||
|
try {
|
||||||
const imageSrc = await videoSnap(this.video)
|
const imageSrc = await videoSnap(this.video)
|
||||||
this.emit('fallback', imageSrc)
|
this.emit('fallback', imageSrc)
|
||||||
|
} catch (error: any) {
|
||||||
|
this._log.warn(`unable to generate video snap`, { error })
|
||||||
|
}
|
||||||
|
|
||||||
this._peer.close()
|
this._peer.close()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user