소스 검색

Implement review changes 3

dev1
Mihai-Andrei Uscat 4 년 전
부모
커밋
c84089b8eb
3개의 변경된 파일17개의 추가작업 그리고 12개의 파일을 삭제
  1. 3
    3
      modules/RTC/RTCUtils.js
  2. 5
    6
      modules/RTC/ScreenObtainer.js
  3. 9
    3
      modules/RTC/TraceablePeerConnection.js

+ 3
- 3
modules/RTC/RTCUtils.js 파일 보기

@@ -415,10 +415,10 @@ function newGetConstraints(um = [], options = {}) {
415 415
         }
416 416
 
417 417
         constraints.audio = {
418
-            autoGainControl: { exact: !disableAGC && !disableAP },
418
+            autoGainControl: !disableAGC && !disableAP,
419 419
             deviceId: options.micDeviceId,
420
-            echoCancellation: { exact: !disableAEC && !disableAP },
421
-            noiseSuppression: { exact: !disableNS && !disableAP }
420
+            echoCancellation: !disableAEC && !disableAP,
421
+            noiseSuppression: !disableNS && !disableAP
422 422
         };
423 423
 
424 424
         if (stereo) {

+ 5
- 6
modules/RTC/ScreenObtainer.js 파일 보기

@@ -163,13 +163,12 @@ const ScreenObtainer = {
163 163
             getDisplayMedia = navigator.mediaDevices.getDisplayMedia.bind(navigator.mediaDevices);
164 164
         }
165 165
 
166
-        const { disableAGC, disableAP, enableHdAudio } = this.options;
167
-        const audioProcessingValue = !disableAGC && !disableAP;
168
-        const audio = enableHdAudio ? {
169
-            autoGainControl: audioProcessingValue,
166
+        const { stereo } = this.options;
167
+        const audio = stereo ? {
168
+            autoGainControl: false,
170 169
             channelCount: 2,
171
-            echoCancellation: audioProcessingValue,
172
-            noiseSuppression: audioProcessingValue
170
+            echoCancellation: false,
171
+            noiseSuppression: false
173 172
         } : true;
174 173
 
175 174
         getDisplayMedia({

+ 9
- 3
modules/RTC/TraceablePeerConnection.js 파일 보기

@@ -2157,6 +2157,12 @@ TraceablePeerConnection.prototype._adjustLocalMediaDirection = function(
2157 2157
  * @returns {RTCSessionDescription} the munged description.
2158 2158
  */
2159 2159
 TraceablePeerConnection.prototype._mungeOpus = function(description) {
2160
+    const { opusMaxAverageBitrate, stereo } = this.options;
2161
+
2162
+    if (!opusMaxAverageBitrate || !stereo) {
2163
+        return description;
2164
+    }
2165
+
2160 2166
     const parsedSdp = transform.parse(description.sdp);
2161 2167
     const mLines = parsedSdp.media;
2162 2168
 
@@ -2180,13 +2186,13 @@ TraceablePeerConnection.prototype._mungeOpus = function(description) {
2180 2186
             const fmtpConfig = transform.parseParams(fmtpOpus.config);
2181 2187
             let sdpChanged = false;
2182 2188
 
2183
-            if (this.options.stereo) {
2189
+            if (stereo) {
2184 2190
                 fmtpConfig.stereo = 1;
2185 2191
                 sdpChanged = true;
2186 2192
             }
2187 2193
 
2188
-            if (this.options.opusMaxAverageBitrate) {
2189
-                fmtpConfig.opusMaxAverageBitrate = this.options.opusMaxAverageBitrate;
2194
+            if (opusMaxAverageBitrate) {
2195
+                fmtpConfig.opusMaxAverageBitrate = opusMaxAverageBitrate;
2190 2196
                 sdpChanged = true;
2191 2197
             }
2192 2198
 

Loading…
취소
저장