|
@@ -1243,14 +1243,16 @@ StatsCollector.prototype.processNewStatsReport = function() {
|
1243
|
1243
|
codec = this.currentStatsReport.get(now.codecId);
|
1244
|
1244
|
} catch (e) { /* not supported*/ }
|
1245
|
1245
|
|
1246
|
|
- /*
|
1247
|
|
- The mime type has the following form: video/VP8 or audio/ISAC,
|
1248
|
|
- so we what to keep just the type after the '/', audio and video
|
1249
|
|
- keys will be added on the processing side.
|
1250
|
|
- */
|
1251
|
|
- const codecShortType = codec.mimeType.split('/')[1];
|
1252
|
|
-
|
1253
|
|
- ssrcStats.setCodec(codecShortType);
|
|
1246
|
+ if (codec) {
|
|
1247
|
+ /**
|
|
1248
|
+ * The mime type has the following form: video/VP8 or audio/ISAC,
|
|
1249
|
+ * so we what to keep just the type after the '/', audio and video
|
|
1250
|
+ * keys will be added on the processing side.
|
|
1251
|
+ */
|
|
1252
|
+ const codecShortType = codec.mimeType.split('/')[1];
|
|
1253
|
+
|
|
1254
|
+ codecShortType && ssrcStats.setCodec(codecShortType);
|
|
1255
|
+ }
|
1254
|
1256
|
|
1255
|
1257
|
// track for resolution
|
1256
|
1258
|
// RTCVideoHandlerStats
|