From 9ca115cf05e0b0bc1e3d1c93206cbe518e1c1208 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 28 Nov 2014 15:54:02 -0500 Subject: [PATCH] this is why we can't have nice things.... C'mon chrome and mozilla its not that hard to both do the same spec --- html5/verto/js/src/jquery.FSRTC.js | 32 ++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index a404d006e4..a214c1f9db 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -93,10 +93,22 @@ 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'; @@ -111,10 +123,18 @@ 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) { -- 2.47.2