Implement external API notification about screen sharing status

This commit is contained in:
Slava Kisel
2018-02-22 10:25:03 +03:00
parent 80c4205fb8
commit e1d849e3a0
4 changed files with 51 additions and 7 deletions
+14
View File
@@ -471,6 +471,20 @@ class API {
this._sendEvent({ name: 'feedback-submitted' });
}
/**
* Notify external application (if API is enabled) that the screen sharing
* has been turned on/off.
*
* @param {boolean} on - True if screen sharing is enabled.
* @returns {void}
*/
notifyScreenSharingStatusChanged(on: boolean) {
this._sendEvent({
name: 'screen-sharing-status-changed',
on
});
}
/**
* Disposes the allocated resources.
*
+8 -1
View File
@@ -48,7 +48,8 @@ const events = {
'video-conference-joined': 'videoConferenceJoined',
'video-conference-left': 'videoConferenceLeft',
'video-availability-changed': 'videoAvailabilityChanged',
'video-mute-status-changed': 'videoMuteStatusChanged'
'video-mute-status-changed': 'videoMuteStatusChanged',
'screen-sharing-status-changed': 'screenSharingStatusChanged'
};
/**
@@ -485,6 +486,12 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
* {{
* roomName: room //the room name of the conference
* }}
* screenSharingStatusChanged - receives event notifications about
* turning on/off the local user screen sharing.
* The listener will receive object with the following structure:
* {{
* on: on //whether screen sharing is on
* }}
* readyToClose - all hangup operations are completed and Jitsi Meet is
* ready to be disposed.
* @returns {void}