diff --git a/modules/RTC/TraceablePeerConnection.js b/modules/RTC/TraceablePeerConnection.js index 0979d9ec42..c0cddecb8e 100644 --- a/modules/RTC/TraceablePeerConnection.js +++ b/modules/RTC/TraceablePeerConnection.js @@ -971,10 +971,10 @@ TraceablePeerConnection.prototype._remoteTrackAdded = function(stream, track, tr stream, track, ssrc: trackSsrc, - videoType: mediaType === MediaType.VIDEO ? VideoType.CAMERA : undefined + videoType: peerMediaInfo?.videoType }; - if (this._remoteSsrcMap.has(sourceName)) { + if (this._remoteSsrcMap.has(sourceName) && mediaType === MediaType.VIDEO) { trackDetails.videoType = this._remoteSsrcMap.get(sourceName).videoType; }