|
@@ -851,13 +851,6 @@ class RTCUtils extends Listenable {
|
851
|
851
|
|
852
|
852
|
this.pcConstraints = { optional: [] };
|
853
|
853
|
|
854
|
|
- // Allows sending of video to be suspended if the bandwidth
|
855
|
|
- // estimation is too low.
|
856
|
|
- if (!options.disableSuspendVideo) {
|
857
|
|
- this.pcConstraints.optional.push(
|
858
|
|
- { googSuspendBelowMinBitrate: true });
|
859
|
|
- }
|
860
|
|
-
|
861
|
854
|
if (options.useIPv6) {
|
862
|
855
|
// https://code.google.com/p/webrtc/issues/detail?id=2828
|
863
|
856
|
this.pcConstraints.optional.push({ googIPv6: true });
|
|
@@ -873,6 +866,21 @@ class RTCUtils extends Listenable {
|
873
|
866
|
return this.audioTracks;
|
874
|
867
|
};
|
875
|
868
|
}
|
|
869
|
+
|
|
870
|
+ this.p2pPcConstraints
|
|
871
|
+ = JSON.parse(JSON.stringify(this.pcConstraints));
|
|
872
|
+
|
|
873
|
+ // Allows sending of video to be suspended if the bandwidth
|
|
874
|
+ // estimation is too low.
|
|
875
|
+ if (!options.disableSuspendVideo) {
|
|
876
|
+ this.pcConstraints.optional.push(
|
|
877
|
+ { googSuspendBelowMinBitrate: true });
|
|
878
|
+ }
|
|
879
|
+
|
|
880
|
+ // There's no reason not to use this for p2p
|
|
881
|
+ this.p2pPcConstraints.optional.push({
|
|
882
|
+ googSuspendBelowMinBitrate: true
|
|
883
|
+ });
|
876
|
884
|
} else if (RTCBrowserType.isEdge()) {
|
877
|
885
|
this.RTCPeerConnectionType = ortcRTCPeerConnection;
|
878
|
886
|
this.getUserMedia
|
|
@@ -986,6 +994,8 @@ class RTCUtils extends Listenable {
|
986
|
994
|
return;
|
987
|
995
|
}
|
988
|
996
|
|
|
997
|
+ this.p2pPcConstraints = this.p2pPcConstraints || this.pcConstraints;
|
|
998
|
+
|
989
|
999
|
// Call onReady() if Temasys plugin is not used
|
990
|
1000
|
if (!RTCBrowserType.isTemasysPluginUsed()) {
|
991
|
1001
|
onReady(options, this.getUserMediaWithConstraints.bind(this));
|