clear canvas on WebRTC disconnect.

This commit is contained in:
Miroslav Šedivý 2021-02-18 20:53:08 +01:00
parent 49d6174953
commit 6340da049b

View File

@ -127,6 +127,7 @@
this.webrtc.addListener('cursor-position', this.onCursorPosition)
this.webrtc.addListener('cursor-image', this.onCursorImage)
this.webrtc.addListener('disconnected', this.canvasClear)
this.cursorElement.onload = this.canvasRedraw
}
@ -135,6 +136,7 @@
this.webrtc.removeListener('cursor-position', this.onCursorPosition)
this.webrtc.removeListener('cursor-image', this.onCursorImage)
this.webrtc.removeListener('disconnected', this.canvasClear)
this.cursorElement.onload = null
}