Procházet zdrojové kódy

feat(screenshare): allow auto-pin remote only

master
Leonard Kim před 6 roky
rodič
revize
fa818bc386
2 změnil soubory, kde provedl 18 přidání a 8 odebrání
  1. 11
    7
      interface_config.js
  2. 7
    1
      react/features/video-layout/subscriber.js

+ 11
- 7
interface_config.js Zobrazit soubor

177
 
177
 
178
     // Browsers, in addition to those which do not fully support WebRTC, that
178
     // Browsers, in addition to those which do not fully support WebRTC, that
179
     // are not supported and should show the unsupported browser page.
179
     // are not supported and should show the unsupported browser page.
180
-    UNSUPPORTED_BROWSERS: []
180
+    UNSUPPORTED_BROWSERS: [],
181
+
182
+    /**
183
+     * A UX mode where the last screen share participant is automatically
184
+     * pinned. Valid values are the string "remote-only" so remote participants
185
+     * get pinned but not local, otherwise any truthy value for all participants,
186
+     * and any falsy value to disable the feature.
187
+     *
188
+     * Note: this mode is experimental and subject to breakage.
189
+     */
190
+    AUTO_PIN_LATEST_SCREEN_SHARE: 'remote-only'
181
 
191
 
182
     /**
192
     /**
183
      * How many columns the tile view can expand to. The respected range is
193
      * How many columns the tile view can expand to. The respected range is
205
      */
215
      */
206
     // ANDROID_APP_PACKAGE: 'org.jitsi.meet',
216
     // ANDROID_APP_PACKAGE: 'org.jitsi.meet',
207
 
217
 
208
-    /**
209
-     * A UX mode where the last screen share participant is automatically
210
-     * pinned. Note: this mode is experimental and subject to breakage.
211
-     */
212
-    // AUTO_PIN_LATEST_SCREEN_SHARE: false,
213
-
214
     /**
218
     /**
215
      * Override the behavior of some notifications to remain displayed until
219
      * Override the behavior of some notifications to remain displayed until
216
      * explicitly dismissed through a user action. The value is how long, in
220
      * explicitly dismissed through a user action. The value is how long, in

+ 7
- 1
react/features/video-layout/subscriber.js Zobrazit soubor

55
             = store.getState()['features/video-layout'].screenShares || [];
55
             = store.getState()['features/video-layout'].screenShares || [];
56
         const knownSharingParticipantIds = tracks.reduce((acc, track) => {
56
         const knownSharingParticipantIds = tracks.reduce((acc, track) => {
57
             if (track.mediaType === 'video' && track.videoType === 'desktop') {
57
             if (track.mediaType === 'video' && track.videoType === 'desktop') {
58
-                acc.push(track.participantId);
58
+                const skipTrack
59
+                    = interfaceConfig.AUTO_PIN_LATEST_SCREEN_SHARE === 'remote-only'
60
+                        && track.local;
61
+
62
+                if (!skipTrack) {
63
+                    acc.push(track.participantId);
64
+                }
59
             }
65
             }
60
 
66
 
61
             return acc;
67
             return acc;

Načítá se…
Zrušit
Uložit