소스 검색

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,8 +61,20 @@ export function selectParticipantInLargeVideo(participant: ?string) {
61 61
         const state = getState();
62 62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
63 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 78
             dispatch({
67 79
                 type: SELECT_LARGE_VIDEO_PARTICIPANT,
68 80
                 participantId

Loading…
취소
저장