Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(app/native): rework appNavigate so callkit video button does not end the call (#13814)
Calinteodord0e49b27a15f
diff --git a/react/features/app/actions.native.ts b/react/features/app/actions.native.tsindex 3c3c37bfd5..6606d3e36d 100644--- a/react/features/app/actions.native.ts+++ b/react/features/app/actions.native.ts@@ -1,4 +1,5 @@import { setRoom } from '../base/conference/actions';+import { getConferenceState } from '../base/conference/functions';import {configWillLoad,loadConfigError,@@ -10,6 +11,7 @@ import {restoreConfig} from '../base/config/functions.native';import { connect, disconnect, setLocationURL } from '../base/connection/actions.native';+import { JITSI_CONNECTION_URL_KEY } from '../base/connection/constants';import { loadConfig } from '../base/lib-jitsi-meet/functions.native';import { createDesiredLocalTracks } from '../base/tracks/actions.native';import isInsecureRoomName from '../base/util/isInsecureRoomName';@@ -33,6 +35,7 @@ import { addTrackStateToURL, getDefaultURL } from './functions.native';import logger from './logger';import { IReloadNowOptions, IStore } from './types';+export * from './actions.any';/**@@ -72,11 +75,25 @@ export function appNavigate(uri?: string, options: IReloadNowOptions = {}) {}location.protocol || (location.protocol = 'https:');- const { contextRoot, host, room } = location;+ const { contextRoot, host, hostname, pathname, room } = location;const locationURL = new URL(location.toString());+ const { conference } = getConferenceState(getState());if (room) {- navigateRoot(screen.connecting);+ if (conference) {++ // We need to check if the location is the same with the previous one.+ const currentLocationURL = conference?.getConnection()[JITSI_CONNECTION_URL_KEY];+ const { hostname: currentHostName, pathname: currentPathName } = currentLocationURL;++ if (currentHostName === hostname && currentPathName === pathname) {+ logger.warn(`Joining same conference using URL: ${currentLocationURL}`);++ return;+ }+ } else {+ navigateRoot(screen.connecting);+ }}dispatch(disconnect());diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.tsindex 35f70ddee9..df19505471 100644--- a/react/features/base/conference/reducer.ts+++ b/react/features/base/conference/reducer.ts@@ -59,6 +59,7 @@ export interface IJitsiConference {enableLobby: Function;end: Function;getBreakoutRooms: Function;+ getConnection: Function;getLocalParticipantProperty: Function;getLocalTracks: Function;getMeetingUniqueId: Function;