mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
clear canvas on WebRTC disconnect.
This commit is contained in:
parent
49d6174953
commit
6340da049b
@ -127,6 +127,7 @@
|
|||||||
|
|
||||||
this.webrtc.addListener('cursor-position', this.onCursorPosition)
|
this.webrtc.addListener('cursor-position', this.onCursorPosition)
|
||||||
this.webrtc.addListener('cursor-image', this.onCursorImage)
|
this.webrtc.addListener('cursor-image', this.onCursorImage)
|
||||||
|
this.webrtc.addListener('disconnected', this.canvasClear)
|
||||||
this.cursorElement.onload = this.canvasRedraw
|
this.cursorElement.onload = this.canvasRedraw
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,6 +136,7 @@
|
|||||||
|
|
||||||
this.webrtc.removeListener('cursor-position', this.onCursorPosition)
|
this.webrtc.removeListener('cursor-position', this.onCursorPosition)
|
||||||
this.webrtc.removeListener('cursor-image', this.onCursorImage)
|
this.webrtc.removeListener('cursor-image', this.onCursorImage)
|
||||||
|
this.webrtc.removeListener('disconnected', this.canvasClear)
|
||||||
this.cursorElement.onload = null
|
this.cursorElement.onload = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user