|
@@ -1848,6 +1848,22 @@ TraceablePeerConnection.prototype.getConfiguredVideoCodec = function() {
|
1848
|
1848
|
return defaultCodec;
|
1849
|
1849
|
};
|
1850
|
1850
|
|
|
1851
|
+/**
|
|
1852
|
+ * Checks if the client has negotiated not to receive video encoded using the given codec, i.e., the codec has been
|
|
1853
|
+ * removed from the local description.
|
|
1854
|
+ */
|
|
1855
|
+TraceablePeerConnection.prototype.isVideoCodecDisabled = function(codec) {
|
|
1856
|
+ const sdp = this.peerconnection.localDescription?.sdp;
|
|
1857
|
+
|
|
1858
|
+ if (!sdp) {
|
|
1859
|
+ return false;
|
|
1860
|
+ }
|
|
1861
|
+ const parsedSdp = transform.parse(sdp);
|
|
1862
|
+ const mLine = parsedSdp.media.find(m => m.type === MediaType.VIDEO);
|
|
1863
|
+
|
|
1864
|
+ return !mLine.rtp.find(r => r.codec === codec);
|
|
1865
|
+};
|
|
1866
|
+
|
1851
|
1867
|
/**
|
1852
|
1868
|
* Enables or disables simulcast for screenshare based on the frame rate requested for desktop track capture.
|
1853
|
1869
|
*
|