Browse Source

Adding isSharingScreen() to external API

j8
Samuel Retika 5 years ago
parent
commit
312813e677
2 changed files with 14 additions and 0 deletions
  1. 3
    0
      modules/API/API.js
  2. 11
    0
      modules/API/external/external_api.js

+ 3
- 0
modules/API/API.js View File

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

+ 11
- 0
modules/API/external/external_api.js View File

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
      * Returns the avatar URL of a participant.
775
      * Returns the avatar URL of a participant.
765
      *
776
      *

Loading…
Cancel
Save