浏览代码

fix(lastN): select screenshare endpoint always when auto pinning.

When trying to auto pin screenshare, always select the endpoint even though it happens to be the large video participant in redux. The auto pin screenshare logic kicks in after the track is added.  If the screenshare endpoint is not among the forwarded endpoints from the bridge, it needs to be selected again.
master
Jaya Allamsetty 4 年前
父节点
当前提交
d6ab0a72a1
共有 1 个文件被更改,包括 13 次插入1 次删除
  1. 13
    1
      react/features/large-video/actions.any.js

+ 13
- 1
react/features/large-video/actions.any.js 查看文件

61
         const state = getState();
61
         const state = getState();
62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
63
         const largeVideo = state['features/large-video'];
63
         const largeVideo = state['features/large-video'];
64
+        const screenShares = state['features/video-layout'].screenShares;
65
+        let latestScreenshareParticipantId;
64
 
66
 
65
-        if (participantId !== largeVideo.participantId) {
67
+        if (screenShares && screenShares.length) {
68
+            latestScreenshareParticipantId = screenShares[screenShares.length - 1];
69
+        }
70
+
71
+        // When trying to auto pin screenshare, always select the endpoint even though it happens to be
72
+        // the large video participant in redux (for the reasons listed above in the large video selection
73
+        // logic above). The auto pin screenshare logic kicks in after the track is added
74
+        // (which updates the large video participant and selects all endpoints because of the auto tile
75
+        // view mode). If the screenshare endpoint is not among the forwarded endpoints from the bridge,
76
+        // it needs to be selected again at this point.
77
+        if (participantId !== largeVideo.participantId || participantId === latestScreenshareParticipantId) {
66
             dispatch({
78
             dispatch({
67
                 type: SELECT_LARGE_VIDEO_PARTICIPANT,
79
                 type: SELECT_LARGE_VIDEO_PARTICIPANT,
68
                 participantId
80
                 participantId

正在加载...
取消
保存