feat(end-meet-for-all) Trigger notifyReadyToClose event on end meetin… (#10549)

pull/10552/head
Horatiu Muresan 4 years ago committed by GitHub
parent 0188086dde
commit 9b3f254c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      react/features/base/conference/constants.js
  2. 10
      react/features/base/conference/middleware.any.js

@ -27,3 +27,7 @@ export const EMAIL_COMMAND = 'email';
* from the outside is not cool but it should suffice for now.
*/
export const JITSI_CONFERENCE_URL_KEY = Symbol('url');
export const TRIGGER_READY_TO_CLOSE_REASONS = [
'The meeting has been terminated'
];

@ -1,5 +1,6 @@
// @flow
import { readyToClose } from '../../../features/mobile/external-api/actions';
import {
ACTION_PINNED,
ACTION_UNPINNED,
@ -40,6 +41,7 @@ import {
createConference,
setSubject
} from './actions';
import { TRIGGER_READY_TO_CLOSE_REASONS } from './constants';
import {
_addLocalTracksToConference,
_removeLocalTracksFromConference,
@ -130,6 +132,14 @@ function _conferenceFailed({ dispatch, getState }, next, action) {
titleKey: 'dialog.sessTerminated'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
if (TRIGGER_READY_TO_CLOSE_REASONS.includes(reason)) {
if (typeof APP === undefined) {
dispatch(readyToClose());
} else {
APP.API.notifyReadyToClose();
}
}
break;
}
case JitsiConferenceErrors.CONFERENCE_RESTARTED: {

Loading…
Cancel
Save