Browse Source

[RN] Allow to override callHandle for CallKit

j8
Daniel Ornelas 7 years ago
parent
commit
81be082fe7

+ 15
- 0
react/features/base/config/functions.js View File

@@ -43,6 +43,21 @@ const WHITELISTED_KEYS = [
43 43
      */
44 44
     'callDisplayName',
45 45
 
46
+    /**
47
+     * The call handle of the CallKit call representing the conference/meeting
48
+     * associated with this config.js. The property is meant for use cases in
49
+     * which Jitsi Meet is to work with a CallKit call created outside of Jitsi
50
+     * Meet and to be adopted by Jitsi Meet such as, for example, an incoming
51
+     * and/or outgoing CallKit call created by Jitsi Meet SDK for iOS
52
+     * clients/consumers prior to giving control to Jitsi Meet. As the value is
53
+     * associated with a conference/meeting, the value makes sense not as a
54
+     * deployment-wide configuration, only as a runtime configuration
55
+     * override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
56
+     *
57
+     * @type string
58
+     */
59
+    'callHandle',
60
+
46 61
     /**
47 62
      * The UUID of the CallKit call representing the conference/meeting
48 63
      * associated with this config.js. The property is meant for use cases in

+ 4
- 2
react/features/mobile/callkit/middleware.js View File

@@ -227,7 +227,7 @@ function _conferenceWillJoin({ getState }, next, action) {
227 227
 
228 228
     const { conference } = action;
229 229
     const state = getState();
230
-    const { callUUID } = state['features/base/config'];
230
+    const { callUUID, callHandle } = state['features/base/config'];
231 231
     const url = getInviteURL(state);
232 232
     const hasVideo = !isVideoMutedByAudioOnly(state);
233 233
 
@@ -235,7 +235,9 @@ function _conferenceWillJoin({ getState }, next, action) {
235 235
     // it upper cased.
236 236
     conference.callUUID = (callUUID || uuid.v4()).toUpperCase();
237 237
 
238
-    CallKit.startCall(conference.callUUID, url.toString(), hasVideo)
238
+    const handleURL = callHandle || url.toString();
239
+
240
+    CallKit.startCall(conference.callUUID, handleURL, hasVideo)
239 241
         .then(() => {
240 242
             const { callee } = state['features/base/jwt'];
241 243
             const displayName

Loading…
Cancel
Save