From ce6e8472f0ade93f19ea182f772aebcecf52e2f2 Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Thu, 1 Mar 2018 11:46:11 -0800 Subject: [PATCH] Revert "fix(hangup): destroy local tracks on conference leave (#2502)" This reverts commit 88325aeef26b11f9d6dfe91aaeb550df10b53ad4. Turns out a conference with a password triggers a failed conference join. It's going to be tricky to decipher when to do actual cleanup, and where to shove that code, so reverting is easier for now. --- modules/UI/UI.js | 5 ++--- modules/UI/videolayout/LargeVideoManager.js | 2 -- react/features/base/conference/middleware.js | 7 +------ react/features/conference/components/Conference.web.js | 1 + 4 files changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index bef993752..4dd50e059 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -377,12 +377,11 @@ UI.start = function() { }; /** - * Invokes cleanup of large video so it stops running polling tasks and stops - * displaying. + * Invokes cleanup of any deferred execution within relevant UI modules. * * @returns {void} */ -UI.resetLargeVideo = () => { +UI.stopDaemons = () => { VideoLayout.resetLargeVideo(); }; diff --git a/modules/UI/videolayout/LargeVideoManager.js b/modules/UI/videolayout/LargeVideoManager.js index 930e0ff0a..9ddafa45a 100644 --- a/modules/UI/videolayout/LargeVideoManager.js +++ b/modules/UI/videolayout/LargeVideoManager.js @@ -129,8 +129,6 @@ export default class LargeVideoManager { this._onVideoResolutionUpdate); this.removePresenceLabel(); - - this.$container.remove(); } /** diff --git a/react/features/base/conference/middleware.js b/react/features/base/conference/middleware.js index 1c749ff22..ad97874bf 100644 --- a/react/features/base/conference/middleware.js +++ b/react/features/base/conference/middleware.js @@ -17,7 +17,7 @@ import { } from '../participants'; import { MiddlewareRegistry } from '../redux'; import UIEvents from '../../../../service/UI/UIEvents'; -import { TRACK_ADDED, TRACK_REMOVED, destroyLocalTracks } from '../tracks'; +import { TRACK_ADDED, TRACK_REMOVED } from '../tracks'; import { createConference, @@ -144,11 +144,6 @@ function _conferenceFailedOrLeft({ dispatch, getState }, next, action) { dispatch(setAudioOnly(true)); } - if (typeof APP === 'object') { - dispatch(destroyLocalTracks()); - APP.UI.resetLargeVideo(); - } - return result; } diff --git a/react/features/conference/components/Conference.web.js b/react/features/conference/components/Conference.web.js index 6a117d35b..0ecbbcc5e 100644 --- a/react/features/conference/components/Conference.web.js +++ b/react/features/conference/components/Conference.web.js @@ -87,6 +87,7 @@ class Conference extends Component { * @inheritdoc */ componentWillUnmount() { + APP.UI.stopDaemons(); APP.UI.unregisterListeners(); APP.UI.unbindEvents();