Merge pull request #2067 from jitsi/cs-applicationName
Adds application name to the initJitsiConference options.
This commit is contained in:
commit
9135f654ba
|
@ -1297,6 +1297,8 @@ export default {
|
|||
options.displayName = nick;
|
||||
}
|
||||
|
||||
options.applicationName = interfaceConfig.APP_NAME;
|
||||
|
||||
return options;
|
||||
},
|
||||
|
||||
|
|
|
@ -1,22 +1,13 @@
|
|||
/* @flow */
|
||||
import { NativeModules } from 'react-native';
|
||||
|
||||
import { isRoomValid } from '../base/conference';
|
||||
import { RouteRegistry } from '../base/react';
|
||||
import { toState } from '../base/redux';
|
||||
import { Conference } from '../conference';
|
||||
import { WelcomePage } from '../welcome';
|
||||
export * from './getRouteToRender';
|
||||
|
||||
/**
|
||||
* Determines which route is to be rendered in order to depict a specific Redux
|
||||
* store.
|
||||
* Returns application name.
|
||||
*
|
||||
* @param {(Object|Function)} stateOrGetState - Redux state or Regux getState()
|
||||
* method.
|
||||
* @returns {Route}
|
||||
* @returns {string} The application name.
|
||||
*/
|
||||
export function _getRouteToRender(stateOrGetState: Object | Function) {
|
||||
const { room } = toState(stateOrGetState)['features/base/conference'];
|
||||
const component = isRoomValid(room) ? Conference : WelcomePage;
|
||||
|
||||
return RouteRegistry.getRouteByComponent(component);
|
||||
export function getName() {
|
||||
return NativeModules.AppInfo.name;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import {
|
|||
import {
|
||||
// eslint-disable-next-line camelcase
|
||||
_getRouteToRender as _super_getRouteToRender
|
||||
} from './functions.native';
|
||||
} from './getRouteToRender';
|
||||
|
||||
declare var APP: Object;
|
||||
declare var interfaceConfig: Object;
|
||||
|
@ -116,3 +116,12 @@ function _interceptComponent(
|
|||
|
||||
return result || component;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns application name.
|
||||
*
|
||||
* @returns {string} The application name.
|
||||
*/
|
||||
export function getName() {
|
||||
return interfaceConfig.APP_NAME;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/* @flow */
|
||||
|
||||
import { isRoomValid } from '../base/conference';
|
||||
import { RouteRegistry } from '../base/react';
|
||||
import { toState } from '../base/redux';
|
||||
import { Conference } from '../conference';
|
||||
import { WelcomePage } from '../welcome';
|
||||
|
||||
/**
|
||||
* Determines which route is to be rendered in order to depict a specific Redux
|
||||
* store.
|
||||
*
|
||||
* @param {(Object|Function)} stateOrGetState - Redux state or Regux getState()
|
||||
* method.
|
||||
* @returns {Route}
|
||||
*/
|
||||
export function _getRouteToRender(stateOrGetState: Object | Function) {
|
||||
const { room } = toState(stateOrGetState)['features/base/conference'];
|
||||
const component = isRoomValid(room) ? Conference : WelcomePage;
|
||||
|
||||
return RouteRegistry.getRouteByComponent(component);
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
// @flow
|
||||
|
||||
import { sendEvent } from '../../analytics';
|
||||
import { getName } from '../../app';
|
||||
import { JitsiConferenceEvents } from '../lib-jitsi-meet';
|
||||
import { setAudioMuted, setVideoMuted } from '../media';
|
||||
import {
|
||||
|
@ -280,8 +281,10 @@ export function createConference() {
|
|||
= connection.initJitsiConference(
|
||||
|
||||
// XXX Lib-jitsi-meet does not accept uppercase letters.
|
||||
room.toLowerCase(),
|
||||
state['features/base/config']);
|
||||
room.toLowerCase(), {
|
||||
...state['features/base/config'],
|
||||
applicationName: getName()
|
||||
});
|
||||
|
||||
conference[JITSI_CONFERENCE_URL_KEY] = locationURL;
|
||||
dispatch(_conferenceWillJoin(conference));
|
||||
|
|
Loading…
Reference in New Issue