Przeglądaj źródła

Adding isSharingScreen() to external API

master
Samuel Retika 5 lat temu
rodzic
commit
312813e677
2 zmienionych plików z 14 dodań i 0 usunięć
  1. 3
    0
      modules/API/API.js
  2. 11
    0
      modules/API/external/external_api.js

+ 3
- 0
modules/API/API.js Wyświetl plik

@@ -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 Wyświetl plik

@@ -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
      *

Ładowanie…
Anuluj
Zapisz