瀏覽代碼

feat(branding) allow invite links to be branded

master
Tudor-Ovidiu Avram 4 年之前
父節點
當前提交
8a4fb72eae

+ 7
- 0
config.js 查看文件

626
      tokenAuthUrl
626
      tokenAuthUrl
627
      */
627
      */
628
 
628
 
629
+    /**
630
+     * This property can be used to alter the generated meeting invite links (in combination with a branding domain
631
+     * which is retrieved internally by jitsi meet) (e.g. https://meet.jit.si/someMeeting
632
+     * can become https://brandedDomain/roomAlias)
633
+     */
634
+    // brandingRoomAlias: null,
635
+
629
     // List of undocumented settings used in lib-jitsi-meet
636
     // List of undocumented settings used in lib-jitsi-meet
630
     /**
637
     /**
631
      _peerConnStatusOutOfLastNTimeout
638
      _peerConnStatusOutOfLastNTimeout

+ 1
- 0
react/features/base/config/configWhitelist.js 查看文件

69
 
69
 
70
     'channelLastN',
70
     'channelLastN',
71
     'constraints',
71
     'constraints',
72
+    'brandingRoomAlias',
72
     'debug',
73
     'debug',
73
     'debugAudioLevels',
74
     'debugAudioLevels',
74
     'defaultLanguage',
75
     'defaultLanguage',

+ 11
- 1
react/features/base/connection/functions.js 查看文件

54
         throw new Error('Can not get invite URL - the app is not ready');
54
         throw new Error('Can not get invite URL - the app is not ready');
55
     }
55
     }
56
 
56
 
57
-    return getURLWithoutParams(locationURL).href;
57
+    const { inviteDomain } = state['features/dynamic-branding'];
58
+    const urlWithoutParams = getURLWithoutParams(locationURL);
59
+
60
+    if (inviteDomain) {
61
+        const meetingId
62
+            = state['features/base/config'].brandingRoomAlias || urlWithoutParams.pathname;
63
+
64
+        return `${inviteDomain}/${meetingId}`;
65
+    }
66
+
67
+    return urlWithoutParams.href;
58
 }
68
 }
59
 
69
 
60
 /**
70
 /**

+ 0
- 1
react/features/dynamic-branding/actions.js 查看文件

53
     };
53
     };
54
 }
54
 }
55
 
55
 
56
-
57
 /**
56
 /**
58
  * Action used to signal the branding elements are ready to be displayed.
57
  * Action used to signal the branding elements are ready to be displayed.
59
  *
58
  *

+ 3
- 1
react/features/dynamic-branding/reducer.js 查看文件

14
     backgroundColor: '',
14
     backgroundColor: '',
15
     backgroundImageUrl: '',
15
     backgroundImageUrl: '',
16
     customizationReady: false,
16
     customizationReady: false,
17
+    inviteDomain: '',
17
     logoClickUrl: '',
18
     logoClickUrl: '',
18
     logoImageUrl: ''
19
     logoImageUrl: ''
19
 };
20
 };
24
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
25
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
25
     switch (action.type) {
26
     switch (action.type) {
26
     case SET_DYNAMIC_BRANDING_DATA: {
27
     case SET_DYNAMIC_BRANDING_DATA: {
27
-        const { backgroundColor, backgroundImageUrl, logoClickUrl, logoImageUrl } = action.value;
28
+        const { backgroundColor, backgroundImageUrl, inviteDomain, logoClickUrl, logoImageUrl } = action.value;
28
 
29
 
29
         return {
30
         return {
30
             backgroundColor,
31
             backgroundColor,
31
             backgroundImageUrl,
32
             backgroundImageUrl,
33
+            inviteDomain,
32
             logoClickUrl,
34
             logoClickUrl,
33
             logoImageUrl,
35
             logoImageUrl,
34
             customizationReady: true
36
             customizationReady: true

Loading…
取消
儲存