|
@@ -2,6 +2,8 @@
|
2
|
2
|
|
3
|
3
|
import type { Dispatch } from 'redux';
|
4
|
4
|
|
|
5
|
+import { isOnline } from '../net-info/selectors';
|
|
6
|
+
|
5
|
7
|
import JitsiMeetJS from './_';
|
6
|
8
|
import {
|
7
|
9
|
LIB_DID_DISPOSE,
|
|
@@ -37,7 +39,8 @@ export function disposeLib() {
|
37
|
39
|
*/
|
38
|
40
|
export function initLib() {
|
39
|
41
|
return (dispatch: Dispatch<any>, getState: Function): void => {
|
40
|
|
- const config = getState()['features/base/config'];
|
|
42
|
+ const state = getState();
|
|
43
|
+ const config = state['features/base/config'];
|
41
|
44
|
|
42
|
45
|
if (!config) {
|
43
|
46
|
throw new Error('Cannot init lib-jitsi-meet without config');
|
|
@@ -50,6 +53,9 @@ export function initLib() {
|
50
|
53
|
enableAnalyticsLogging: isAnalyticsEnabled(getState),
|
51
|
54
|
...config
|
52
|
55
|
});
|
|
56
|
+ JitsiMeetJS.setNetworkInfo({
|
|
57
|
+ isOnline: isOnline(state)
|
|
58
|
+ });
|
53
|
59
|
dispatch({ type: LIB_DID_INIT });
|
54
|
60
|
} catch (error) {
|
55
|
61
|
dispatch(libInitError(error));
|