diff --git a/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts b/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts index 42eb8466..665ecc18 100644 --- a/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts +++ b/openvidu-browser/src/OpenViduInternal/WebRtcStats/WebRtcStats.ts @@ -222,11 +222,10 @@ export class WebRtcStats { } }); let selectedCandidatePair; - if (platform.isChromium() || platform.isReactNative()) { + if (transportStat != null) { const selectedCandidatePairId = transportStat.selectedCandidatePairId selectedCandidatePair = candidatePairs.get(selectedCandidatePairId); } else { - // Firefox const length = candidatePairs.size; const iterator = candidatePairs.values(); for (let i = 0; i < length; i++) { diff --git a/openvidu-testapp/src/app/components/video/video.component.ts b/openvidu-testapp/src/app/components/video/video.component.ts index 2d1e5f24..221691f3 100644 --- a/openvidu-testapp/src/app/components/video/video.component.ts +++ b/openvidu-testapp/src/app/components/video/video.component.ts @@ -731,7 +731,7 @@ export class VideoComponent implements OnInit, OnDestroy { } async showCodecUsed() { - let stats = await this.streamManager.stream.getWebRtcPeer().pc.getStats(null); + let stats = await this.streamManager.stream.getWebRtcPeer().pc.getStats(); let codecIdIndex = null; // Search codec Index stats.forEach(report => {