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)

This commit is contained in:
Anthony Minessale 2015-12-09 18:38:25 -06:00
parent 83c5294427
commit 2c7d53030c
2 changed files with 6 additions and 3 deletions

View File

@ -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 {

View 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;}}