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.
This commit is contained in:
parent
9f69c4d730
commit
88325aeef2
|
@ -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…
Reference in New Issue