Преглед на файлове

[iOS] Custom CallKit display name

Add ability to provide a display name in the configOverwrite object that
when available it will be used to customize the name of the meeting in
callkit screen and recent call list.

Co-authored-by: Daniel Ornelas <daniel.ob64@gmail.com>
Co-authored-by: Lyubo Marinov <lmarinov@atlassian.com>
j8
Daniel Ornelas преди 7 години
родител
ревизия
72487fa7c7
променени са 2 файла, в които са добавени 39 реда и са изтрити 6 реда
  1. 30
    0
      react/features/base/config/functions.js
  2. 9
    6
      react/features/mobile/callkit/middleware.js

+ 30
- 0
react/features/base/config/functions.js Целия файл

@@ -28,7 +28,37 @@ const WHITELISTED_KEYS = [
28 28
     'callStatsConfIDNamespace',
29 29
     'callStatsID',
30 30
     'callStatsSecret',
31
+
32
+    /**
33
+     * The display name of the CallKit call representing the conference/meeting
34
+     * associated with this config.js including while the call is ongoing in the
35
+     * UI presented by CallKit and in the system-wide call history. The property
36
+     * is meant for use cases in which the room name is not desirable as a
37
+     * display name for CallKit purposes and the desired display name is not
38
+     * provided in the form of a JWT callee. As the value is associated with a
39
+     * conference/meeting, the value makes sense not as a deployment-wide
40
+     * configuration, only as a runtime configuration override/overwrite
41
+     * provided by, for example, Jitsi Meet SDK for iOS.
42
+     *
43
+     * @type string
44
+     */
45
+    'callDisplayName',
46
+
47
+    /**
48
+     * The UUID of the CallKit call representing the conference/meeting
49
+     * associated with this config.js. The property is meant for use cases in
50
+     * which Jitsi Meet is to work with a CallKit call created outside of Jitsi
51
+     * Meet and to be adopted by Jitsi Meet such as, for example, an incoming
52
+     * and/or outgoing CallKit call created by Jitsi Meet SDK for iOS
53
+     * clients/consumers prior to giving control to Jitsi Meet. As the value is
54
+     * associated with a conference/meeting, the value makes sense not as a
55
+     * deployment-wide configuration, only as a runtime configuration
56
+     * override/overwrite provided by, for example, Jitsi Meet SDK for iOS.
57
+     *
58
+     * @type string
59
+     */
31 60
     'callUUID',
61
+
32 62
     'channelLastN',
33 63
     'constraints',
34 64
     'debug',

+ 9
- 6
react/features/mobile/callkit/middleware.js Целия файл

@@ -237,15 +237,18 @@ function _conferenceWillJoin({ getState }, next, action) {
237 237
 
238 238
     CallKit.startCall(conference.callUUID, url.toString(), hasVideo)
239 239
         .then(() => {
240
-            const { room } = state['features/base/conference'];
241 240
             const { callee } = state['features/base/jwt'];
242
-            const tracks = state['features/base/tracks'];
243
-            const muted = isLocalTrackMuted(tracks, MEDIA_TYPE.AUDIO);
241
+            const displayName
242
+                 = state['features/base/config'].callDisplayName
243
+                     || (callee && callee.name)
244
+                     || state['features/base/conference'].room;
244 245
 
245
-            CallKit.updateCall(
246
-                conference.callUUID,
247
-                { displayName: (callee && callee.name) || room });
246
+            const muted
247
+                = isLocalTrackMuted(
248
+                    state['features/base/tracks'],
249
+                    MEDIA_TYPE.AUDIO);
248 250
 
251
+            CallKit.updateCall(conference.callUUID, { displayName });
249 252
             CallKit.setMuted(conference.callUUID, muted);
250 253
         });
251 254
 

Loading…
Отказ
Запис