Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(proxy): stop screenshare when the connection stops

Leonard Kim6d91728a7457
diff --git a/conference.js b/conference.js
index 904737c965..5f7d71f7f8 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.