flow
This commit is contained in:
parent
b8f28abfdf
commit
0d97f14a1a
|
@ -1,3 +1,5 @@
|
||||||
/* global JitsiMeetJS */
|
/* @flow */
|
||||||
|
|
||||||
|
declare var JitsiMeetJS: Object;
|
||||||
|
|
||||||
export default JitsiMeetJS;
|
export default JitsiMeetJS;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
/* @flow */
|
||||||
|
|
||||||
|
import type { Dispatch } from 'redux';
|
||||||
|
|
||||||
import JitsiMeetJS from './';
|
import JitsiMeetJS from './';
|
||||||
import {
|
import {
|
||||||
LIB_DISPOSED,
|
LIB_DISPOSED,
|
||||||
|
@ -6,6 +10,8 @@ import {
|
||||||
SET_CONFIG
|
SET_CONFIG
|
||||||
} from './actionTypes';
|
} from './actionTypes';
|
||||||
|
|
||||||
|
declare var APP: Object;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Disposes lib-jitsi-meet.
|
* Disposes lib-jitsi-meet.
|
||||||
*
|
*
|
||||||
|
@ -18,7 +24,7 @@ export function disposeLib() {
|
||||||
// there is a big chance it will be async.
|
// there is a big chance it will be async.
|
||||||
// TODO Currently, lib-jitsi-meet doesn't have any functionality to
|
// TODO Currently, lib-jitsi-meet doesn't have any functionality to
|
||||||
// dispose itself.
|
// dispose itself.
|
||||||
return dispatch => {
|
return (dispatch: Dispatch<*>) => {
|
||||||
dispatch({ type: LIB_DISPOSED });
|
dispatch({ type: LIB_DISPOSED });
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
@ -31,7 +37,7 @@ export function disposeLib() {
|
||||||
* @returns {Function}
|
* @returns {Function}
|
||||||
*/
|
*/
|
||||||
export function initLib() {
|
export function initLib() {
|
||||||
return (dispatch, getState) => {
|
return (dispatch: Dispatch<*>, getState: Function) => {
|
||||||
const config = getState()['features/base/lib-jitsi-meet'].config;
|
const config = getState()['features/base/lib-jitsi-meet'].config;
|
||||||
|
|
||||||
if (!config) {
|
if (!config) {
|
||||||
|
@ -65,11 +71,11 @@ export function initLib() {
|
||||||
* @param {Object} config - Config object accepted by JitsiMeetJS#init()
|
* @param {Object} config - Config object accepted by JitsiMeetJS#init()
|
||||||
* method.
|
* method.
|
||||||
* @returns {{
|
* @returns {{
|
||||||
* type: SET_CONFIG,
|
* type: SET_CONFIG,
|
||||||
* config: Object
|
* config: Object
|
||||||
* }}
|
* }}
|
||||||
*/
|
*/
|
||||||
export function setConfig(config) {
|
export function setConfig(config: Object) {
|
||||||
return {
|
return {
|
||||||
type: SET_CONFIG,
|
type: SET_CONFIG,
|
||||||
config
|
config
|
||||||
|
|
Loading…
Reference in New Issue