diff --git a/modules/API/API.js b/modules/API/API.js index 6c92395b4..94cf46765 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 82ac2542e..af38eb9bd 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. *