From 6d91728a7457e265b726f757f0a0f8b7c39eaed4 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Mon, 29 Jul 2019 15:21:53 -0700 Subject: [PATCH] fix(proxy): stop screenshare when the connection stops --- conference.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/conference.js b/conference.js index 904737c96..5f7d71f7f 100644 --- a/conference.js +++ b/conference.js @@ -2727,6 +2727,18 @@ export default { */ convertVideoToDesktop: true, + /** + * Callback invoked when the connection has been closed + * automatically. Triggers cleanup of screensharing if active. + * + * @returns {void} + */ + onConnectionClosed: () => { + if (this._untoggleScreenSharing) { + this._untoggleScreenSharing(); + } + }, + /** * Callback invoked to pass messages from the local client back * out to the external client.