fix(filmstrip): JS error when the ringoverlay is shown

This commit is contained in:
hristoterezov 2016-12-02 16:23:12 -06:00
parent fd24595baf
commit 23efa7827c
2 changed files with 8 additions and 4 deletions

View File

@ -1400,13 +1400,13 @@ UI.setMicrophoneButtonEnabled = function (enabled) {
UI.showRingOverlay = function () { UI.showRingOverlay = function () {
RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING); RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING);
FilmStrip.toggleFilmStrip(false); FilmStrip.toggleFilmStrip(false, false);
}; };
UI.hideRingOverLay = function () { UI.hideRingOverLay = function () {
if (!RingOverlay.hide()) if (!RingOverlay.hide())
return; return;
FilmStrip.toggleFilmStrip(true); FilmStrip.toggleFilmStrip(true, false);
}; };
/** /**

View File

@ -114,20 +114,24 @@ const FilmStrip = {
* of the film strip. If not specified, the visibility will be flipped * of the film strip. If not specified, the visibility will be flipped
* (i.e. toggled); otherwise, the visibility will be set to the specified * (i.e. toggled); otherwise, the visibility will be set to the specified
* value. * value.
* @param {Boolean} sendAnalytics - if true analytics event will be send.
* default: true.
* *
* Note: * Note:
* This method shouldn't be executed directly to hide the filmstrip. * This method shouldn't be executed directly to hide the filmstrip.
* It's important to hide the filmstrip with UI.toggleFilmstrip in order * It's important to hide the filmstrip with UI.toggleFilmstrip in order
* to correctly resize the video area. * to correctly resize the video area.
*/ */
toggleFilmStrip(visible) { toggleFilmStrip(visible, sendAnalytics = true) {
let isVisibleDefined = typeof visible === 'boolean'; let isVisibleDefined = typeof visible === 'boolean';
if (!isVisibleDefined) { if (!isVisibleDefined) {
visible = this.isFilmStripVisible(); visible = this.isFilmStripVisible();
} else if (this.isFilmStripVisible() === visible) { } else if (this.isFilmStripVisible() === visible) {
return; return;
} }
if(sendAnalytics) {
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled'); JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
}
this.filmStrip.toggleClass("hidden"); this.filmStrip.toggleClass("hidden");
if (!visible) { if (!visible) {