Sfoglia il codice sorgente

Skips setting local track resolution in case of FF.

dev1
damencho 9 anni fa
parent
commit
b96c4d1c12
1 ha cambiato i file con 9 aggiunte e 2 eliminazioni
  1. 9
    2
      modules/RTC/JitsiLocalTrack.js

+ 9
- 2
modules/RTC/JitsiLocalTrack.js Vedi File

39
         mediaType, videoType, null /* ssrc */);
39
         mediaType, videoType, null /* ssrc */);
40
     this.dontFireRemoveEvent = false;
40
     this.dontFireRemoveEvent = false;
41
     this.resolution = resolution;
41
     this.resolution = resolution;
42
+
43
+    // FIXME: currently firefox is ignoring our constraints about resolutions
44
+    // so we do not store it, to avoid wrong reporting of local track resolution
45
+    if (RTCBrowserType.isFirefox())
46
+        this.resolution = null;
47
+
42
     this.deviceId = deviceId;
48
     this.deviceId = deviceId;
43
     this.startMuted = false;
49
     this.startMuted = false;
44
     this.initialMSID = this.getMSID();
50
     this.initialMSID = this.getMSID();
299
             var streamOptions = {
305
             var streamOptions = {
300
                 cameraDeviceId: this.getDeviceId(),
306
                 cameraDeviceId: this.getDeviceId(),
301
                 devices: [ MediaType.VIDEO ],
307
                 devices: [ MediaType.VIDEO ],
302
-                facingMode: this.getCameraFacingMode(),
303
-                resolution: this.resolution
308
+                facingMode: this.getCameraFacingMode()
304
             };
309
             };
310
+            if (this.resolution)
311
+                streamOptions.resolution = this.resolution;
305
 
312
 
306
             promise = RTCUtils.obtainAudioAndVideoPermissions(streamOptions)
313
             promise = RTCUtils.obtainAudioAndVideoPermissions(streamOptions)
307
                 .then(function (streamsInfo) {
314
                 .then(function (streamsInfo) {

Loading…
Annulla
Salva