]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
this is why we can't have nice things.... C'mon chrome and mozilla its not that hard...
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 28 Nov 2014 20:54:02 +0000 (15:54 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 7 Jan 2015 05:32:09 +0000 (23:32 -0600)
html5/verto/js/src/jquery.FSRTC.js

index a404d006e437d0b4945b68117f66b029976e39d5..a214c1f9db85e185d90335309dd41f3fc63fe2cd 100644 (file)
             candidateList: []
         };
 
-        this.constraints = {
-            offerToReceiveAudio: true,
-            offerToReceiveVideo: this.options.useVideo ? true : false,
-        };
+
+       if (moz) {
+            this.constraints = {
+               offerToReceiveAudio: true,
+               offerToReceiveVideo: this.options.useVideo ? true : false,
+            };
+       } else {
+            this.constraints = {
+               optional: [{
+                   'DtlsSrtpKeyAgreement': 'true'
+               }],mandatory: {
+                   OfferToReceiveAudio: true,
+                   OfferToReceiveVideo: this.options.useVideo ? true : false,
+               }
+            };
+       }
 
         if (self.options.useVideo) {
             self.options.useVideo.style.display = 'none';
 
         if (obj) {
             self.options.useVideo = obj;
-            self.constraints.offerToReceiveVideo = true;
+           if (moz) {
+               self.constraints.offerToReceiveVideo = true;
+           } else {
+               self.constraints.mandatory.OfferToReceiveVideo = true;
+           }
         } else {
             self.options.useVideo = null;
-            self.constraints.offerToReceiveVideo = false;
+            if (moz) {
+               self.constraints.offerToReceiveVideo = false;
+           } else {
+               self.constraints.mandatory.OfferToReceiveVideo = false;
+           }
         }
 
         if (self.options.useVideo) {