Adding isSharingScreen() to external API

This commit is contained in:
Samuel Retika
2020-05-20 00:21:03 +00:00
committed by Jaya Allamsetty
parent 2b5787163e
commit 312813e677
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -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;
}
+11
View File
@@ -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.
*