Bläddra i källkod

feat(api): add notification for when filmstrip gets toggled (#3974)

master
virtuacoplenny 6 år sedan
förälder
incheckning
22277ad799
Inget konto är kopplat till bidragsgivarens mejladress

+ 6
- 0
doc/api.md Visa fil

214
 "email": email // the new email
214
 "email": email // the new email
215
 }
215
 }
216
 ```
216
 ```
217
+* **filmstripDisplayChanged** - event notifications about the visibility of the filmstrip being updated.
218
+```javascript
219
+{
220
+"visible": visible, // Whether or not the filmstrip is displayed or hidden.
221
+}
222
+```
217
 
223
 
218
 * **participantJoined** - event notifications about new participants who join the room. The listener will receive an object with the following structure:
224
 * **participantJoined** - event notifications about new participants who join the room. The listener will receive an object with the following structure:
219
 ```javascript
225
 ```javascript

+ 15
- 0
modules/API/API.js Visa fil

551
         this._sendEvent({ name: 'feedback-prompt-displayed' });
551
         this._sendEvent({ name: 'feedback-prompt-displayed' });
552
     }
552
     }
553
 
553
 
554
+    /**
555
+     * Notify external application (if API is enabled) that the display
556
+     * configuration of the filmstrip has been changed.
557
+     *
558
+     * @param {boolean} visible - Whether or not the filmstrip has been set to
559
+     * be displayed or hidden.
560
+     * @returns {void}
561
+     */
562
+    notifyFilmstripDisplayChanged(visible: boolean) {
563
+        this._sendEvent({
564
+            name: 'filmstrip-display-changed',
565
+            visible
566
+        });
567
+    }
568
+
554
     /**
569
     /**
555
      * Notify external application (if API is enabled) that the screen sharing
570
      * Notify external application (if API is enabled) that the screen sharing
556
      * has been turned on/off.
571
      * has been turned on/off.

+ 1
- 0
modules/API/external/external_api.js Visa fil

44
     'email-change': 'emailChange',
44
     'email-change': 'emailChange',
45
     'feedback-submitted': 'feedbackSubmitted',
45
     'feedback-submitted': 'feedbackSubmitted',
46
     'feedback-prompt-displayed': 'feedbackPromptDisplayed',
46
     'feedback-prompt-displayed': 'feedbackPromptDisplayed',
47
+    'filmstrip-display-changed': 'filmstripDisplayChanged',
47
     'incoming-message': 'incomingMessage',
48
     'incoming-message': 'incomingMessage',
48
     'outgoing-message': 'outgoingMessage',
49
     'outgoing-message': 'outgoingMessage',
49
     'participant-joined': 'participantJoined',
50
     'participant-joined': 'participantJoined',

+ 1
- 0
react/features/video-layout/middleware.web.js Visa fil

82
     case SET_FILMSTRIP_VISIBLE:
82
     case SET_FILMSTRIP_VISIBLE:
83
         VideoLayout.resizeVideoArea(true, false);
83
         VideoLayout.resizeVideoArea(true, false);
84
         APP.UI.emitEvent(UIEvents.TOGGLED_FILMSTRIP, action.visible);
84
         APP.UI.emitEvent(UIEvents.TOGGLED_FILMSTRIP, action.visible);
85
+        APP.API.notifyFilmstripDisplayChanged(action.visible);
85
         break;
86
         break;
86
 
87
 
87
     case SET_TILE_VIEW:
88
     case SET_TILE_VIEW:

Laddar…
Avbryt
Spara