mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
properly destroy webrtc stream.
This commit is contained in:
parent
b489432dbe
commit
f30614db25
@ -328,8 +328,14 @@
|
||||
this.webrtc.on('disconnected', () => {
|
||||
Vue.set(this.state.connection, 'webrtc', 'disconnected')
|
||||
this.events.emit('internal.webrtc', 'disconnected')
|
||||
|
||||
// destroy stream
|
||||
if ('srcObject' in this._video) {
|
||||
this._video.srcObject = null
|
||||
} else {
|
||||
// @ts-ignore
|
||||
this._video.src = null
|
||||
this._video.removeAttribute('src')
|
||||
}
|
||||
})
|
||||
|
||||
// hardcoded webrtc for now
|
||||
|
Loading…
Reference in New Issue
Block a user