ソースを参照

fix(iFrame): capturScreenshot - check if the remote participant has a track attached.

Participants that join video muted do not have video tracks attached. Fixes https://github.com/jitsi/jitsi-meet/issues/7942.
master
Jaya Allamsetty 5年前
コミット
4b429112f2
1個のファイルの変更14行の追加4行の削除
  1. 14
    4
      react/features/large-video/actions.web.js

+ 14
- 4
react/features/large-video/actions.web.js ファイルの表示

@@ -17,20 +17,30 @@ export function captureLargeVideoScreenshot() {
17 17
     return (dispatch: Dispatch<any>, getState: Function): Promise<string> => {
18 18
         const state = getState();
19 19
         const largeVideo = state['features/large-video'];
20
+        const promise = Promise.resolve();
20 21
 
21 22
         if (!largeVideo) {
22
-            return Promise.resolve();
23
+            return promise;
23 24
         }
24 25
         const tracks = state['features/base/tracks'];
25
-        const { jitsiTrack } = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, largeVideo.participantId);
26
-        const videoStream = jitsiTrack.getOriginalStream();
26
+        const participantTrack = getTrackByMediaTypeAndParticipant(tracks, MEDIA_TYPE.VIDEO, largeVideo.participantId);
27
+
28
+        // Participants that join the call video muted do not have a jitsiTrack attached.
29
+        if (!(participantTrack && participantTrack.jitsiTrack)) {
30
+            return promise;
31
+        }
32
+        const videoStream = participantTrack.jitsiTrack.getOriginalStream();
33
+
34
+        if (!videoStream) {
35
+            return promise;
36
+        }
27 37
 
28 38
         // Get the video element for the large video, cast HTMLElement to HTMLVideoElement to make flow happy.
29 39
         /* eslint-disable-next-line no-extra-parens*/
30 40
         const videoElement = ((document.getElementById('largeVideo'): any): HTMLVideoElement);
31 41
 
32 42
         if (!videoElement) {
33
-            return Promise.resolve();
43
+            return promise;
34 44
         }
35 45
 
36 46
         // Create a HTML canvas and draw video on to the canvas.

読み込み中…
キャンセル
保存