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.
This commit is contained in:
damencho 2016-07-20 22:13:26 -05:00
parent 60f7b9ab93
commit 74ece3a775
1 changed files with 3 additions and 0 deletions

View File

@ -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;