|
@@ -20,7 +20,6 @@ import SDPUtil from '../sdp/SDPUtil';
|
20
|
20
|
import Statistics from '../statistics/statistics';
|
21
|
21
|
import AsyncQueue from '../util/AsyncQueue';
|
22
|
22
|
import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
|
23
|
|
-import { integerHash } from '../util/StringUtils';
|
24
|
23
|
|
25
|
24
|
import browser from './../browser';
|
26
|
25
|
import JingleSession from './JingleSession';
|
|
@@ -88,8 +87,6 @@ function _addSourceElement(description, s, ssrc_, msid) {
|
88
|
87
|
|
89
|
88
|
/**
|
90
|
89
|
* @typedef {Object} JingleSessionPCOptions
|
91
|
|
- * @property {Object} abTesting - A/B testing related options (ask George).
|
92
|
|
- * @property {boolean} abTesting.enableSuspendVideoTest - enables the suspend
|
93
|
90
|
* video test ?(ask George).
|
94
|
91
|
* @property {boolean} disableRtx - Described in the config.js[1].
|
95
|
92
|
* @property {boolean} disableSimulcast - Described in the config.js[1].
|
|
@@ -410,11 +407,6 @@ export default class JingleSessionPC extends JingleSession {
|
410
|
407
|
if (this.isP2P) {
|
411
|
408
|
// simulcast needs to be disabled for P2P (121) calls
|
412
|
409
|
pcOptions.disableSimulcast = true;
|
413
|
|
- const abtestSuspendVideo = this._abtestSuspendVideoEnabled(options);
|
414
|
|
-
|
415
|
|
- if (typeof abtestSuspendVideo !== 'undefined') {
|
416
|
|
- pcOptions.abtestSuspendVideo = abtestSuspendVideo;
|
417
|
|
- }
|
418
|
410
|
} else {
|
419
|
411
|
// H264 scalability is not supported on jvb, so simulcast needs to be disabled when H264 is preferred.
|
420
|
412
|
pcOptions.disableSimulcast
|
|
@@ -2945,21 +2937,4 @@ export default class JingleSessionPC extends JingleSession {
|
2945
|
2937
|
toString() {
|
2946
|
2938
|
return `JingleSessionPC[session=${this.isP2P ? 'P2P' : 'JVB'},initiator=${this.isInitiator},sid=${this.sid}]`;
|
2947
|
2939
|
}
|
2948
|
|
-
|
2949
|
|
- /**
|
2950
|
|
- * If the A/B test for suspend video is disabled according to the room's
|
2951
|
|
- * configuration, returns undefined. Otherwise returns a boolean which
|
2952
|
|
- * indicates whether the suspend video option should be enabled or disabled.
|
2953
|
|
- * @param {JingleSessionPCOptions} options - The config options.
|
2954
|
|
- */
|
2955
|
|
- _abtestSuspendVideoEnabled({ abTesting }) {
|
2956
|
|
- if (!abTesting || !abTesting.enableSuspendVideoTest) {
|
2957
|
|
- return;
|
2958
|
|
- }
|
2959
|
|
-
|
2960
|
|
- // We want the two participants in a P2P call to agree on the value of
|
2961
|
|
- // the "suspend" option. We use the JID of the initiator, because it is
|
2962
|
|
- // both randomly selected and agreed upon by both participants.
|
2963
|
|
- return integerHash(this.initiatorJid) % 2 === 0;
|
2964
|
|
- }
|
2965
|
2940
|
}
|