mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Unfortunately, as the Jitsi Meet development evolved the routing mechanism became more complex and thre logic ended up spread across multiple parts of the codebase, which made it hard to follow and extend. This change aims to fix that by rewriting the routing logic and centralizing it in (pretty much) a single place, with no implicit inter-dependencies. In order to arrive there, however, some extra changes were needed, which were not caught early enough and are thus part of this change: - JitsiMeetJS initialization is now synchronous: there is nothing async about it, and the only async requirement (Temasys support) was lifted. See [0]. - WebRTC support can be detected early: building on top of the above, WebRTC support can now be detected immediately, so take advantage of this to simplify how we handle unsupported browsers. See [0]. The new router takes decissions based on the Redux state at the time of invocation. A route can be represented by either a component or a URl reference, with the latter taking precedence. On mobile, obviously, there is no concept of URL reference so routing is based solely on components. [0]: https://github.com/jitsi/lib-jitsi-meet/pull/779
48 lines
1.0 KiB
JavaScript
48 lines
1.0 KiB
JavaScript
import { AtlasKitThemeProvider } from '@atlaskit/theme';
|
|
import React from 'react';
|
|
|
|
import '../../base/responsive-ui';
|
|
import '../../chat';
|
|
import '../../room-lock';
|
|
import '../../video-layout';
|
|
|
|
import { AbstractApp } from './AbstractApp';
|
|
|
|
/**
|
|
* Root application component.
|
|
*
|
|
* @extends AbstractApp
|
|
*/
|
|
export class App extends AbstractApp {
|
|
/**
|
|
* App component's property types.
|
|
*
|
|
* @static
|
|
*/
|
|
static propTypes = AbstractApp.propTypes;
|
|
|
|
/**
|
|
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
|
|
* the top most component.
|
|
*
|
|
* @override
|
|
*/
|
|
_createElement(component, props) {
|
|
return (
|
|
<AtlasKitThemeProvider mode = 'dark'>
|
|
{ super._createElement(component, props) }
|
|
</AtlasKitThemeProvider>
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Gets a Location object from the window with information about the current
|
|
* location of the document.
|
|
*
|
|
* @inheritdoc
|
|
*/
|
|
getWindowLocation() {
|
|
return window.location;
|
|
}
|
|
}
|