From 74ece3a775a20332b4b17a1878bad7fecd34fa3c Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 20 Jul 2016 22:13:26 -0500 Subject: [PATCH] Uses videoType from the video track for the initial value. Handles the case where the remote track is with initial value of camera and no further events are received for video type changed. --- modules/UI/videolayout/RemoteVideo.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/UI/videolayout/RemoteVideo.js b/modules/UI/videolayout/RemoteVideo.js index 016298f35c..1076890e3d 100644 --- a/modules/UI/videolayout/RemoteVideo.js +++ b/modules/UI/videolayout/RemoteVideo.js @@ -210,6 +210,9 @@ RemoteVideo.prototype.addRemoteStreamElement = function (stream) { let isVideo = stream.isVideoTrack(); isVideo ? this.videoStream = stream : this.audioStream = stream; + if (isVideo) + this.setVideoType(stream.videoType); + // Add click handler. let onClickHandler = (event) => { let source = event.target || event.srcElement;