|
@@ -1713,6 +1713,11 @@ TraceablePeerConnection.prototype._assertTrackBelongs = function(
|
1713
|
1713
|
*/
|
1714
|
1714
|
TraceablePeerConnection.prototype.getConfiguredVideoCodec = function() {
|
1715
|
1715
|
const sdp = this.localDescription.sdp;
|
|
1716
|
+ const defaultCodec = CodecMimeType.VP8;
|
|
1717
|
+
|
|
1718
|
+ if (!sdp) {
|
|
1719
|
+ return defaultCodec;
|
|
1720
|
+ }
|
1716
|
1721
|
const parsedSdp = transform.parse(sdp);
|
1717
|
1722
|
const mLine = parsedSdp.media.find(m => m.type === MediaType.VIDEO);
|
1718
|
1723
|
const codec = mLine.rtp[0].codec;
|
|
@@ -1721,7 +1726,7 @@ TraceablePeerConnection.prototype.getConfiguredVideoCodec = function() {
|
1721
|
1726
|
return Object.values(CodecMimeType).find(value => value === codec.toLowerCase());
|
1722
|
1727
|
}
|
1723
|
1728
|
|
1724
|
|
- return CodecMimeType.VP8;
|
|
1729
|
+ return defaultCodec;
|
1725
|
1730
|
};
|
1726
|
1731
|
|
1727
|
1732
|
/**
|