]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8641 need to set min and max for less than 30 but if you set min and max to 30...
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 10 Dec 2015 00:38:25 +0000 (18:38 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 10 Dec 2015 00:38:25 +0000 (18:38 -0600)
html5/verto/js/src/jquery.FSRTC.js
html5/verto/video_demo/js/verto-min.js

index b63a57e4e97340dca54a5c64d12fa7df099db8c0..7aa8f7bda7a310c3c4fe42192636fecdc7e4e24f 100644 (file)
                video.optional.push({sourceId: obj.options.useCamera});
            }
 
-           if (bestFrameRate && !window.moz) {
-                video.optional.push({minFrameRate: bestFrameRate});
+           if (bestFrameRate) {
+               video.optional.push({minFrameRate: bestFrameRate});
+               if (bestFrameRate < 30) {
+                   video.optional.push({maxFrameRate: bestFrameRate});
+               }
            }
 
        } else {
index 633be557c43528a6b740759fdbd28642e3667301..a204cf22856bacfff73106b4033e59ff110f28f6 100644 (file)
@@ -50,7 +50,7 @@ if(obj.options.useVideo&&obj.options.localVideo){getUserMedia({constraints:{audi
 var video={};var bestFrameRate=obj.options.videoParams.vertoBestFrameRate;delete obj.options.videoParams.vertoBestFrameRate;video={mandatory:obj.options.videoParams,optional:[]}
 var useVideo=obj.options.useVideo;if(useVideo&&obj.options.useCamera&&obj.options.useCamera!=="none"){if(!video.optional){video.optional=[];}
 if(obj.options.useCamera!=="any"){video.optional.push({sourceId:obj.options.useCamera});}
-if(bestFrameRate&&!window.moz){video.optional.push({minFrameRate:bestFrameRate});}}else{console.log("Camera Disabled");video=false;useVideo=false;}
+if(bestFrameRate){video.optional.push({minFrameRate:bestFrameRate});if(bestFrameRate<30){video.optional.push({maxFrameRate:bestFrameRate});}}}else{console.log("Camera Disabled");video=false;useVideo=false;}
 return{audio:audio,video:video,useVideo:useVideo};}
 $.FSRTC.prototype.call=function(profile){checkCompat();var self=this;var screen=false;self.type="offer";if(self.options.videoParams&&self.options.screenShare){screen=true;}
 function onSuccess(stream){self.localStream=stream;if(screen){if(moz){self.constraints.OfferToReceiveVideo=false;}else{self.constraints.mandatory.OfferToReceiveVideo=false;}}