Преглед изворни кода

[RN] Allow to override callHandle for CallKit

master
Daniel Ornelas пре 7 година
родитељ
комит
81be082fe7
2 измењених фајлова са 19 додато и 2 уклоњено
  1. 15
    0
      react/features/base/config/functions.js
  2. 4
    2
      react/features/mobile/callkit/middleware.js

+ 15
- 0
react/features/base/config/functions.js Прегледај датотеку

43
      */
43
      */
44
     'callDisplayName',
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
      * The UUID of the CallKit call representing the conference/meeting
62
      * The UUID of the CallKit call representing the conference/meeting
48
      * associated with this config.js. The property is meant for use cases in
63
      * associated with this config.js. The property is meant for use cases in

+ 4
- 2
react/features/mobile/callkit/middleware.js Прегледај датотеку

227
 
227
 
228
     const { conference } = action;
228
     const { conference } = action;
229
     const state = getState();
229
     const state = getState();
230
-    const { callUUID } = state['features/base/config'];
230
+    const { callUUID, callHandle } = state['features/base/config'];
231
     const url = getInviteURL(state);
231
     const url = getInviteURL(state);
232
     const hasVideo = !isVideoMutedByAudioOnly(state);
232
     const hasVideo = !isVideoMutedByAudioOnly(state);
233
 
233
 
235
     // it upper cased.
235
     // it upper cased.
236
     conference.callUUID = (callUUID || uuid.v4()).toUpperCase();
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
         .then(() => {
241
         .then(() => {
240
             const { callee } = state['features/base/jwt'];
242
             const { callee } = state['features/base/jwt'];
241
             const displayName
243
             const displayName

Loading…
Откажи
Сачувај