fix(hangup): destroy local tracks on conference leave (#2502)

Destroy local tracks and also destroy large video so the
user does not wonder why camera (and mic) are still enabled
even though hangup has been pressed.
pull/2457/head jitsi-meet_2819
virtuacoplenny 7 years ago committed by bbaldino
parent 9f69c4d730
commit 88325aeef2
  1. 5
      modules/UI/UI.js
  2. 2
      modules/UI/videolayout/LargeVideoManager.js
  3. 7
      react/features/base/conference/middleware.js
  4. 1
      react/features/conference/components/Conference.web.js

@ -377,11 +377,12 @@ UI.start = function() {
};
/**
* Invokes cleanup of any deferred execution within relevant UI modules.
* Invokes cleanup of large video so it stops running polling tasks and stops
* displaying.
*
* @returns {void}
*/
UI.stopDaemons = () => {
UI.resetLargeVideo = () => {
VideoLayout.resetLargeVideo();
};

@ -129,6 +129,8 @@ export default class LargeVideoManager {
this._onVideoResolutionUpdate);
this.removePresenceLabel();
this.$container.remove();
}
/**

@ -17,7 +17,7 @@ import {
} from '../participants';
import { MiddlewareRegistry } from '../redux';
import UIEvents from '../../../../service/UI/UIEvents';
import { TRACK_ADDED, TRACK_REMOVED } from '../tracks';
import { TRACK_ADDED, TRACK_REMOVED, destroyLocalTracks } from '../tracks';
import {
createConference,
@ -144,6 +144,11 @@ function _conferenceFailedOrLeft({ dispatch, getState }, next, action) {
dispatch(setAudioOnly(true));
}
if (typeof APP === 'object') {
dispatch(destroyLocalTracks());
APP.UI.resetLargeVideo();
}
return result;
}

@ -87,7 +87,6 @@ class Conference extends Component<Props> {
* @inheritdoc
*/
componentWillUnmount() {
APP.UI.stopDaemons();
APP.UI.unregisterListeners();
APP.UI.unbindEvents();

Loading…
Cancel
Save