Adds application name to the initJitsiConference options.

This commit is contained in:
damencho
2017-10-13 15:34:27 -05:00
parent 654c5c44f4
commit c3e42e0162
5 changed files with 45 additions and 18 deletions

View File

@@ -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);
}