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 () {
RingOverlay.show(APP.tokenData.callee, interfaceConfig.DISABLE_RINGING);
FilmStrip.toggleFilmStrip(false);
FilmStrip.toggleFilmStrip(false, false);
};
UI.hideRingOverLay = function () {
if (!RingOverlay.hide())
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
* (i.e. toggled); otherwise, the visibility will be set to the specified
* value.
* @param {Boolean} sendAnalytics - if true analytics event will be send.
* default: true.
*
* Note:
* This method shouldn't be executed directly to hide the filmstrip.
* It's important to hide the filmstrip with UI.toggleFilmstrip in order
* to correctly resize the video area.
*/
toggleFilmStrip(visible) {
toggleFilmStrip(visible, sendAnalytics = true) {
let isVisibleDefined = typeof visible === 'boolean';
if (!isVisibleDefined) {
visible = this.isFilmStripVisible();
} else if (this.isFilmStripVisible() === visible) {
return;
}
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
if(sendAnalytics) {
JitsiMeetJS.analytics.sendEvent('toolbar.filmstrip.toggled');
}
this.filmStrip.toggleClass("hidden");
if (!visible) {