|
@@ -365,12 +365,7 @@ class RTCUtils extends Listenable {
|
365
|
365
|
this.getTrackID = ({ id }) => id;
|
366
|
366
|
}
|
367
|
367
|
|
368
|
|
- this.pcConstraints = browser.isChromiumBased() || browser.isReactNative()
|
369
|
|
- ? { optional: [
|
370
|
|
- { googScreencastMinBitrate: 100 },
|
371
|
|
- { googCpuOveruseDetection: true }
|
372
|
|
- ] }
|
373
|
|
- : {};
|
|
368
|
+ this.pcConstraints = {};
|
374
|
369
|
|
375
|
370
|
screenObtainer.init(options);
|
376
|
371
|
|
|
@@ -879,30 +874,6 @@ class RTCUtils extends Listenable {
|
879
|
874
|
|
880
|
875
|
return { deviceList };
|
881
|
876
|
}
|
882
|
|
-
|
883
|
|
- /**
|
884
|
|
- * Configures the given PeerConnection constraints to either enable or
|
885
|
|
- * disable (according to the value of the 'enable' parameter) the
|
886
|
|
- * 'googSuspendBelowMinBitrate' option.
|
887
|
|
- * @param constraints the constraints on which to operate.
|
888
|
|
- * @param enable {boolean} whether to enable or disable the suspend video
|
889
|
|
- * option.
|
890
|
|
- */
|
891
|
|
- setSuspendVideo(constraints, enable) {
|
892
|
|
- if (!constraints.optional) {
|
893
|
|
- constraints.optional = [];
|
894
|
|
- }
|
895
|
|
-
|
896
|
|
- // Get rid of all "googSuspendBelowMinBitrate" constraints (we assume
|
897
|
|
- // that the elements of constraints.optional contain a single property).
|
898
|
|
- constraints.optional
|
899
|
|
- = constraints.optional.filter(
|
900
|
|
- c => !c.hasOwnProperty('googSuspendBelowMinBitrate'));
|
901
|
|
-
|
902
|
|
- if (enable) {
|
903
|
|
- constraints.optional.push({ googSuspendBelowMinBitrate: 'true' });
|
904
|
|
- }
|
905
|
|
- }
|
906
|
877
|
}
|
907
|
878
|
|
908
|
879
|
const rtcUtils = new RTCUtils();
|