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', () => {
|
this.webrtc.on('disconnected', () => {
|
||||||
Vue.set(this.state.connection, 'webrtc', 'disconnected')
|
Vue.set(this.state.connection, 'webrtc', 'disconnected')
|
||||||
this.events.emit('internal.webrtc', 'disconnected')
|
this.events.emit('internal.webrtc', 'disconnected')
|
||||||
// @ts-ignore
|
|
||||||
this._video.src = null
|
// destroy stream
|
||||||
|
if ('srcObject' in this._video) {
|
||||||
|
this._video.srcObject = null
|
||||||
|
} else {
|
||||||
|
// @ts-ignore
|
||||||
|
this._video.removeAttribute('src')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// hardcoded webrtc for now
|
// hardcoded webrtc for now
|
||||||
|
Loading…
Reference in New Issue
Block a user