Add CONFERENCE_WILL_JOIN action
It's fired before creating the conference with lib-jitsi-meet.
This commit is contained in:
parent
5baa167a08
commit
b1b5f3e6f0
|
@ -23,6 +23,17 @@ export const CONFERENCE_FAILED = Symbol('CONFERENCE_FAILED');
|
||||||
*/
|
*/
|
||||||
export const CONFERENCE_JOINED = Symbol('CONFERENCE_JOINED');
|
export const CONFERENCE_JOINED = Symbol('CONFERENCE_JOINED');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the Redux action which signals that a specific conference will be
|
||||||
|
* joined.
|
||||||
|
*
|
||||||
|
* {
|
||||||
|
* type: CONFERENCE_WILL_JOIN,
|
||||||
|
* room: string
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
export const CONFERENCE_WILL_JOIN = Symbol('CONFERENCE_WILL_JOIN');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of the Redux action which signals that a specific conference has
|
* The type of the Redux action which signals that a specific conference has
|
||||||
* been left.
|
* been left.
|
||||||
|
|
|
@ -12,6 +12,7 @@ import {
|
||||||
CONFERENCE_FAILED,
|
CONFERENCE_FAILED,
|
||||||
CONFERENCE_JOINED,
|
CONFERENCE_JOINED,
|
||||||
CONFERENCE_LEFT,
|
CONFERENCE_LEFT,
|
||||||
|
CONFERENCE_WILL_JOIN,
|
||||||
CONFERENCE_WILL_LEAVE,
|
CONFERENCE_WILL_LEAVE,
|
||||||
LOCK_STATE_CHANGED,
|
LOCK_STATE_CHANGED,
|
||||||
SET_PASSWORD,
|
SET_PASSWORD,
|
||||||
|
@ -123,6 +124,26 @@ function _conferenceJoined(conference) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signals the intention of the application to have the local participant leave
|
||||||
|
* a specific conference. Similar in fashion to CONFERENCE_LEFT. Contrary to it
|
||||||
|
* though, it's not guaranteed because CONFERENCE_LEFT may be triggered by
|
||||||
|
* lib-jitsi-meet and not the application.
|
||||||
|
*
|
||||||
|
* @param {string} room - The JitsiConference instance which will
|
||||||
|
* be left by the local participant.
|
||||||
|
* @returns {{
|
||||||
|
* type: CONFERENCE_WILL_JOIN,
|
||||||
|
* room: string
|
||||||
|
* }}
|
||||||
|
*/
|
||||||
|
function _conferenceWillJoin(room) {
|
||||||
|
return {
|
||||||
|
type: CONFERENCE_WILL_JOIN,
|
||||||
|
room
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signals that a specific conference has been left.
|
* Signals that a specific conference has been left.
|
||||||
*
|
*
|
||||||
|
@ -180,12 +201,15 @@ export function createConference() {
|
||||||
throw new Error('Cannot join conference without room name');
|
throw new Error('Cannot join conference without room name');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX Lib-jitsi-meet does not accept uppercase letters.
|
||||||
|
const _room = room.toLowerCase();
|
||||||
|
|
||||||
|
dispatch(_conferenceWillJoin(_room));
|
||||||
|
|
||||||
// TODO Take options from config.
|
// TODO Take options from config.
|
||||||
const conference
|
const conference
|
||||||
= connection.initJitsiConference(
|
= connection.initJitsiConference(
|
||||||
|
_room,
|
||||||
// XXX Lib-jitsi-meet does not accept uppercase letters.
|
|
||||||
room.toLowerCase(),
|
|
||||||
{ openSctp: true });
|
{ openSctp: true });
|
||||||
|
|
||||||
_addConferenceListeners(conference, dispatch);
|
_addConferenceListeners(conference, dispatch);
|
||||||
|
|
Loading…
Reference in New Issue