|
@@ -12,6 +12,7 @@ import {
|
12
|
12
|
CONFERENCE_FAILED,
|
13
|
13
|
CONFERENCE_JOINED,
|
14
|
14
|
CONFERENCE_LEFT,
|
|
15
|
+ CONFERENCE_WILL_JOIN,
|
15
|
16
|
CONFERENCE_WILL_LEAVE,
|
16
|
17
|
LOCK_STATE_CHANGED,
|
17
|
18
|
SET_PASSWORD,
|
|
@@ -123,6 +124,26 @@ function _conferenceJoined(conference) {
|
123
|
124
|
};
|
124
|
125
|
}
|
125
|
126
|
|
|
127
|
+/**
|
|
128
|
+ * Signals the intention of the application to have the local participant leave
|
|
129
|
+ * a specific conference. Similar in fashion to CONFERENCE_LEFT. Contrary to it
|
|
130
|
+ * though, it's not guaranteed because CONFERENCE_LEFT may be triggered by
|
|
131
|
+ * lib-jitsi-meet and not the application.
|
|
132
|
+ *
|
|
133
|
+ * @param {string} room - The JitsiConference instance which will
|
|
134
|
+ * be left by the local participant.
|
|
135
|
+ * @returns {{
|
|
136
|
+ * type: CONFERENCE_WILL_JOIN,
|
|
137
|
+ * room: string
|
|
138
|
+ * }}
|
|
139
|
+ */
|
|
140
|
+function _conferenceWillJoin(room) {
|
|
141
|
+ return {
|
|
142
|
+ type: CONFERENCE_WILL_JOIN,
|
|
143
|
+ room
|
|
144
|
+ };
|
|
145
|
+}
|
|
146
|
+
|
126
|
147
|
/**
|
127
|
148
|
* Signals that a specific conference has been left.
|
128
|
149
|
*
|
|
@@ -180,12 +201,15 @@ export function createConference() {
|
180
|
201
|
throw new Error('Cannot join conference without room name');
|
181
|
202
|
}
|
182
|
203
|
|
|
204
|
+ // XXX Lib-jitsi-meet does not accept uppercase letters.
|
|
205
|
+ const _room = room.toLowerCase();
|
|
206
|
+
|
|
207
|
+ dispatch(_conferenceWillJoin(_room));
|
|
208
|
+
|
183
|
209
|
// TODO Take options from config.
|
184
|
210
|
const conference
|
185
|
211
|
= connection.initJitsiConference(
|
186
|
|
-
|
187
|
|
- // XXX Lib-jitsi-meet does not accept uppercase letters.
|
188
|
|
- room.toLowerCase(),
|
|
212
|
+ _room,
|
189
|
213
|
{ openSctp: true });
|
190
|
214
|
|
191
|
215
|
_addConferenceListeners(conference, dispatch);
|