From: Anthony Minessale Date: Thu, 10 Dec 2015 00:38:25 +0000 (-0600) Subject: FS-8641 need to set min and max for less than 30 but if you set min and max to 30... X-Git-Tag: v1.6.6~1^2~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c7d53030c145d0072560928c3f73615b6ecd8b4;p=thirdparty%2Ffreeswitch.git FS-8641 need to set min and max for less than 30 but if you set min and max to 30 and it doesn't support it it will fail, (maybe design these FPS params a little better webrtc politicians) --- diff --git a/html5/verto/js/src/jquery.FSRTC.js b/html5/verto/js/src/jquery.FSRTC.js index b63a57e4e9..7aa8f7bda7 100644 --- a/html5/verto/js/src/jquery.FSRTC.js +++ b/html5/verto/js/src/jquery.FSRTC.js @@ -558,8 +558,11 @@ 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 { diff --git a/html5/verto/video_demo/js/verto-min.js b/html5/verto/video_demo/js/verto-min.js index 633be557c4..a204cf2285 100644 --- a/html5/verto/video_demo/js/verto-min.js +++ b/html5/verto/video_demo/js/verto-min.js @@ -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;}}