diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js
index 814fdfa3a8..b2ff3a9ca4 100644
--- a/html5/verto/js/src/jquery.FSRTC.js
+++ b/html5/verto/js/src/jquery.FSRTC.js
@@ -102,18 +102,26 @@
if (moz) {
this.constraints = {
- offerToReceiveAudio: true,
- offerToReceiveVideo: this.options.useVideo ? true : false,
+ offerToReceiveAudio: true
};
+ if (this.options.useVideo) {
+ this.constraints.offerToReceiveVideo = true;
+ }
+
} else {
this.constraints = {
optional: [{
'DtlsSrtpKeyAgreement': 'true'
}],mandatory: {
- OfferToReceiveAudio: true,
- OfferToReceiveVideo: this.options.useVideo ? true : false,
+ OfferToReceiveAudio: true
}
- };
+ };
+
+ if (this.options.useVideo) {
+ console.error(this.options.useVideo);
+ this.constraints.manditory.OfferToReceiveVideo = true;
+ }
+
}
if (self.options.useVideo) {
@@ -141,9 +149,9 @@
self.options.useVideo = null;
self.options.localVideo = null;
if (moz) {
- self.constraints.offerToReceiveVideo = false;
+ delete self.constraints.offerToReceiveVideo;
} else {
- self.constraints.mandatory.OfferToReceiveVideo = false;
+ delete self.constraints.mandatory.OfferToReceiveVideo;
}
}
@@ -398,6 +406,7 @@
console.log("Audio constraints", mediaParams.audio);
console.log("Video constraints", mediaParams.video);
+ console.log("Device constraints", self.constraints);
if (self.options.useVideo && self.options.localVideo) {
getUserMedia({
@@ -526,9 +535,9 @@
if (screen) {
if (moz) {
- self.constraints.OfferToReceiveVideo = false;
+ delete self.constraints.OfferToReceiveVideo;
} else {
- self.constraints.mandatory.OfferToReceiveVideo = false;
+ delete self.constraints.mandatory.OfferToReceiveVideo;
}
}
@@ -568,12 +577,12 @@
console.log("Audio constraints", mediaParams.audio);
console.log("Video constraints", mediaParams.video);
-
+ console.log("Device constraints", self.constraints);
getUserMedia({
constraints: {
- audio: mediaParams.audio,
- video: mediaParams.video
+ audio: mediaParams.audio
+ //video: mediaParams.video
},
video: mediaParams.useVideo,
onsuccess: onSuccess,
diff --git a/html5/verto/video_demo/js/verto-min.js b/html5/verto/video_demo/js/verto-min.js
index d88e62b9ce..3577858fb9 100644
--- a/html5/verto/video_demo/js/verto-min.js
+++ b/html5/verto/video_demo/js/verto-min.js
@@ -6,9 +6,9 @@ function getCodecPayloadType(sdpLine){var pattern=new RegExp('a=rtpmap:(\\d+) \\
function setDefaultCodec(mLine,payload){var elements=mLine.split(' ');var newLine=[];var index=0;for(var i=0;i