Parcourir la source

Adding isSharingScreen() to external API

j8
Samuel Retika il y a 5 ans
Parent
révision
312813e677
2 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 3
    0
      modules/API/API.js
  2. 11
    0
      modules/API/external/external_api.js

+ 3
- 0
modules/API/API.js Voir le fichier

@@ -368,6 +368,9 @@ function initCommands() {
368 368
         case 'is-video-available':
369 369
             callback(videoAvailable);
370 370
             break;
371
+        case 'is-sharing-screen':
372
+            callback(Boolean(APP.conference.isSharingScreen));
373
+            break;
371 374
         default:
372 375
             return false;
373 376
         }

+ 11
- 0
modules/API/external/external_api.js Voir le fichier

@@ -760,6 +760,17 @@ export default class JitsiMeetExternalAPI extends EventEmitter {
760 760
         });
761 761
     }
762 762
 
763
+    /**
764
+     * Returns screen sharing status.
765
+     *
766
+     * @returns {Promise} - Resolves with screensharing status and rejects on failure.
767
+     */
768
+    isSharingScreen() {
769
+        return this._transport.sendRequest({
770
+            name: 'is-sharing-screen'
771
+        });
772
+    }
773
+
763 774
     /**
764 775
      * Returns the avatar URL of a participant.
765 776
      *

Chargement…
Annuler
Enregistrer