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