Skip to content

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

Adding isSharingScreen() to external API

Samuel Retika312813e67787
diff --git a/modules/API/API.js b/modules/API/API.js
index 6c92395b47..94cf467656 100644
--- a/modules/API/API.js
+++ b/modules/API/API.js
@@ -368,6 +368,9 @@ function initCommands() {
case 'is-video-available':
callback(videoAvailable);
break;
+ case 'is-sharing-screen':
+ callback(Boolean(APP.conference.isSharingScreen));
+ break;
default:
return false;
}
diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js
index 82ac2542ea..af38eb9bda 100644
--- a/modules/API/external/external_api.js
+++ b/modules/API/external/external_api.js
@@ -760,6 +760,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
});
}
+ /**
+ * Returns screen sharing status.
+ *
+ * @returns {Promise} - Resolves with screensharing status and rejects on failure.
+ */
+ isSharingScreen() {
+ return this._transport.sendRequest({
+ name: 'is-sharing-screen'
+ });
+ }
+
/**
* Returns the avatar URL of a participant.
*