Browse Source

handle missing remoteVideo when removing video element

master
isymchych 10 years ago
parent
commit
f242c8cfdc
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      modules/UI/videolayout/VideoLayout.js

+ 4
- 1
modules/UI/videolayout/VideoLayout.js View File

@@ -271,7 +271,10 @@ var VideoLayout = {
271 271
 
272 272
     onRemoteStreamRemoved (stream) {
273 273
         let id = stream.getParticipantId();
274
-        remoteVideos[id].removeRemoteStreamElement(stream);
274
+        let remoteVideo = remoteVideos[id];
275
+        if (remoteVideo) { // remote stream may be removed after participant left the conference
276
+            remoteVideo.removeRemoteStreamElement(stream);
277
+        }
275 278
     },
276 279
 
277 280
     /**

Loading…
Cancel
Save