handle missing remoteVideo when removing video element

This commit is contained in:
isymchych 2016-02-26 15:20:36 +02:00
parent 259fae331f
commit f242c8cfdc
1 changed files with 4 additions and 1 deletions

View File

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