Ver código fonte

Merge branch 'fix_ring_overlay'

j8
Lyubomir Marinov 8 anos atrás
pai
commit
137aace970
2 arquivos alterados com 14 adições e 14 exclusões
  1. 2
    2
      modules/UI/UI.js
  2. 12
    12
      modules/UI/videolayout/FilmStrip.js

+ 2
- 2
modules/UI/UI.js Ver arquivo

1400
 
1400
 
1401
 UI.showRingOverlay = function () {
1401
 UI.showRingOverlay = function () {
1402
     RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING);
1402
     RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING);
1403
-    FilmStrip.toggleFilmStrip(false);
1403
+    FilmStrip.toggleFilmStrip(false, false);
1404
 };
1404
 };
1405
 
1405
 
1406
 UI.hideRingOverLay = function () {
1406
 UI.hideRingOverLay = function () {
1407
     if (!RingOverlay.hide())
1407
     if (!RingOverlay.hide())
1408
         return;
1408
         return;
1409
-    FilmStrip.toggleFilmStrip(true);
1409
+    FilmStrip.toggleFilmStrip(true, false);
1410
 };
1410
 };
1411
 
1411
 
1412
 /**
1412
 /**

+ 12
- 12
modules/UI/videolayout/FilmStrip.js Ver arquivo

114
      * of the film strip. If not specified, the visibility will be flipped
114
      * of the film strip. If not specified, the visibility will be flipped
115
      * (i.e. toggled); otherwise, the visibility will be set to the specified
115
      * (i.e. toggled); otherwise, the visibility will be set to the specified
116
      * value.
116
      * value.
117
+     * @param {Boolean} sendAnalytics - True to send an analytics event. The
118
+     * default value is true.
117
      *
119
      *
118
      * Note:
120
      * Note:
119
      * This method shouldn't be executed directly to hide the filmstrip.
121
      * This method shouldn't be executed directly to hide the filmstrip.
120
      * It's important to hide the filmstrip with UI.toggleFilmstrip in order
122
      * It's important to hide the filmstrip with UI.toggleFilmstrip in order
121
      * to correctly resize the video area.
123
      * to correctly resize the video area.
122
      */
124
      */
123
-    toggleFilmStrip(visible) {
124
-        let isVisibleDefined = typeof visible === 'boolean';
125
+    toggleFilmStrip(visible, sendAnalytics = true) {
126
+        const isVisibleDefined = typeof visible === 'boolean';
125
         if (!isVisibleDefined) {
127
         if (!isVisibleDefined) {
126
             visible = this.isFilmStripVisible();
128
             visible = this.isFilmStripVisible();
127
         } else if (this.isFilmStripVisible() === visible) {
129
         } else if (this.isFilmStripVisible() === visible) {
128
             return;
130
             return;
129
         }
131
         }
130
-        JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
132
+        if (sendAnalytics) {
133
+            JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
134
+        }
131
         this.filmStrip.toggleClass("hidden");
135
         this.filmStrip.toggleClass("hidden");
132
 
136
 
133
-        if (!visible) {
134
-            this.showMenuDownIcon();
135
-        } else {
137
+        if (visible) {
136
             this.showMenuUpIcon();
138
             this.showMenuUpIcon();
139
+        } else {
140
+            this.showMenuDownIcon();
137
         }
141
         }
138
 
142
 
139
         // Emit/fire UIEvents.TOGGLED_FILM_STRIP.
143
         // Emit/fire UIEvents.TOGGLED_FILM_STRIP.
140
-        var eventEmitter = this.eventEmitter;
144
+        const eventEmitter = this.eventEmitter;
141
         if (eventEmitter) {
145
         if (eventEmitter) {
142
             eventEmitter.emit(
146
             eventEmitter.emit(
143
                 UIEvents.TOGGLED_FILM_STRIP,
147
                 UIEvents.TOGGLED_FILM_STRIP,
372
      * @param forceUpdate
376
      * @param forceUpdate
373
      * @returns {Promise}
377
      * @returns {Promise}
374
      */
378
      */
375
-    resizeThumbnails(local, remote,
376
-                      animate = false, forceUpdate = false) {
377
-
379
+    resizeThumbnails(local, remote, animate = false, forceUpdate = false) {
378
         return new Promise(resolve => {
380
         return new Promise(resolve => {
379
             let thumbs = this.getThumbs(!forceUpdate);
381
             let thumbs = this.getThumbs(!forceUpdate);
380
             let promises = [];
382
             let promises = [];
455
         } else {
457
         } else {
456
             return { remoteThumbs, localThumb };
458
             return { remoteThumbs, localThumb };
457
         }
459
         }
458
-
459
     }
460
     }
460
-
461
 };
461
 };
462
 
462
 
463
 export default FilmStrip;
463
 export default FilmStrip;

Carregando…
Cancelar
Salvar