소스 검색

[RN] Allow to override callHandle for CallKit (coding style)

master
Lyubo Marinov 7 년 전
부모
커밋
a82ed4653e
2개의 변경된 파일8개의 추가작업 그리고 10개의 파일을 삭제
  1. 5
    6
      react/features/base/config/functions.js
  2. 3
    4
      react/features/mobile/callkit/middleware.js

+ 5
- 6
react/features/base/config/functions.js 파일 보기

@@ -44,12 +44,11 @@ const WHITELISTED_KEYS = [
44 44
     'callDisplayName',
45 45
 
46 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
47
+     * The handle
48
+     * ({@link https://developer.apple.com/documentation/callkit/cxhandle}) of
49
+     * the CallKit call representing the conference/meeting associated with this
50
+     * config.js. The property is meant for use cases in which the room URL is
51
+     * not desirable as the handle for CallKit purposes. As the value is
53 52
      * associated with a conference/meeting, the value makes sense not as a
54 53
      * deployment-wide configuration, only as a runtime configuration
55 54
      * override/overwrite provided by, for example, Jitsi Meet SDK for iOS.

+ 3
- 4
react/features/mobile/callkit/middleware.js 파일 보기

@@ -227,17 +227,16 @@ function _conferenceWillJoin({ getState }, next, action) {
227 227
 
228 228
     const { conference } = action;
229 229
     const state = getState();
230
-    const { callUUID, callHandle } = state['features/base/config'];
230
+    const { callHandle, callUUID } = state['features/base/config'];
231 231
     const url = getInviteURL(state);
232
+    const handle = callHandle || url.toString();
232 233
     const hasVideo = !isVideoMutedByAudioOnly(state);
233 234
 
234 235
     // When assigning the call UUID, do so in upper case, since iOS will return
235 236
     // it upper cased.
236 237
     conference.callUUID = (callUUID || uuid.v4()).toUpperCase();
237 238
 
238
-    const handleURL = callHandle || url.toString();
239
-
240
-    CallKit.startCall(conference.callUUID, handleURL, hasVideo)
239
+    CallKit.startCall(conference.callUUID, handle, hasVideo)
241 240
         .then(() => {
242 241
             const { callee } = state['features/base/jwt'];
243 242
             const displayName

Loading…
취소
저장