File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,11 @@ RTCPeerConnection.prototype._getStatsWrap = function() {
246246 selector = self . delegate . callType == 1 ? self . getLocalStreams ( ) [ 0 ] . getVideoTracks ( ) [ 0 ] : self . getLocalStreams ( ) [ 0 ] . getAudioTracks ( ) [ 0 ] ,
247247 statsReportInterval = 0 ;
248248
249- if ( config . webrtc && config . webrtc . statsReportTimeInterval && isNaN ( + config . webrtc . statsReportTimeInterval ) ) {
249+ if ( ! config . webrtc && ! config . webrtc . statsReportTimeInterval ) {
250+ return ;
251+ }
252+
253+ if ( isNaN ( + config . webrtc . statsReportTimeInterval ) ) {
250254 Helpers . traceError ( 'statsReportTimeInterval (' + config . webrtc . statsReportTimeInterval + ') must be integer.' ) ;
251255 return ;
252256 }
@@ -259,13 +263,7 @@ RTCPeerConnection.prototype._getStatsWrap = function() {
259263 var res = results [ i ] ,
260264 is_firefox = navigator . userAgent . toLowerCase ( ) . indexOf ( 'firefox' ) > - 1 ;
261265
262- /** for firefox */
263- if ( is_firefox && res . type == 'inboundrtp' ) {
264- self . delegate . _onCallStatsReport ( self . userID , res ) ;
265- }
266-
267- /** for chrome */
268- if ( res . googCodecName == 'opus' ) {
266+ if ( res . googCodecName == 'opus' || res . type == 'inboundrtp' ) {
269267 self . delegate . _onCallStatsReport ( self . userID , res ) ;
270268 }
271269 }
You can’t perform that action at this time.
0 commit comments