]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7509: js typo
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 1 May 2015 03:27:05 +0000 (22:27 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:28 +0000 (12:47 -0500)
html5/verto/demo/js/verto-min.js
html5/verto/js/src/jquery.FSRTC.js
html5/verto/video_demo/js/verto-min.js

index de30e2084f82fa032d2a78987bf0a40f086b3220..109a9b3282827d7338101705941adc2a3153065c 100644 (file)
@@ -78,7 +78,7 @@ $.FSRTC.bestResSupported=function(){var w=0,h=0;for(var i in $.FSRTC.validRes){i
 return[w,h];}
 var resList=[[320,180],[320,240],[640,360],[640,480],[1280,720],[1920,1080]];var resI=0;var checkRes=function(cam,func){if(resI>=resList.length){if(func)return func();return;}
 var video={mandatory:{},optional:[]}
-if(cam){video.optional=[{sourceId:obj.options.useCamera}];}
+if(cam){video.optional=[{sourceId:cam}];}
 w=resList[resI][0];h=resList[resI][1];resI++;video.mandatory={"minWidth":w,"minHeight":h,"maxWidth":w,"maxHeight":h};getUserMedia({constraints:{audio:false,video:video},onsuccess:function(e){e.stop();console.info(w+"x"+h+" supported.");$.FSRTC.validRes.push([w,h]);checkRes(cam,func);},onerror:function(e){console.error(w+"x"+h+" not supported.");checkRes(cam,func);}});}
 $.FSRTC.getValidRes=function(cam,func){var used=[];$.FSRTC.validRes=[];resI=0;checkRes(cam,func);}
 $.FSRTC.checkPerms=function(){getUserMedia({constraints:{audio:true,video:true,},onsuccess:function(e){e.stop();console.info("media perm init complete");},onerror:function(e){console.error("media perm init error");}});}})(jQuery);(function($){$.JsonRpcClient=function(options){var self=this;this.options=$.extend({ajaxUrl:null,socketUrl:null,onmessage:null,login:null,passwd:null,sessid:null,loginParams:null,userVariables:null,getSocket:function(onmessage_cb){return self._getSocket(onmessage_cb);}},options);self.ws_cnt=0;this.wsOnMessage=function(event){self._wsOnMessage(event);};};$.JsonRpcClient.prototype._ws_socket=null;$.JsonRpcClient.prototype._ws_callbacks={};$.JsonRpcClient.prototype._current_id=1;$.JsonRpcClient.prototype.call=function(method,params,success_cb,error_cb){if(!params){params={};}
index e65f32ea70322ddbe1f935492376018b0a4ac152..6baf7aa54c158fd8a8c86d3ec23f5e9b790026f4 100644 (file)
         }      
 
        if (cam) {
-           video.optional = [{sourceId: obj.options.useCamera}];
+           video.optional = [{sourceId: cam}];
        }
        
        w = resList[resI][0];
index de30e2084f82fa032d2a78987bf0a40f086b3220..109a9b3282827d7338101705941adc2a3153065c 100644 (file)
@@ -78,7 +78,7 @@ $.FSRTC.bestResSupported=function(){var w=0,h=0;for(var i in $.FSRTC.validRes){i
 return[w,h];}
 var resList=[[320,180],[320,240],[640,360],[640,480],[1280,720],[1920,1080]];var resI=0;var checkRes=function(cam,func){if(resI>=resList.length){if(func)return func();return;}
 var video={mandatory:{},optional:[]}
-if(cam){video.optional=[{sourceId:obj.options.useCamera}];}
+if(cam){video.optional=[{sourceId:cam}];}
 w=resList[resI][0];h=resList[resI][1];resI++;video.mandatory={"minWidth":w,"minHeight":h,"maxWidth":w,"maxHeight":h};getUserMedia({constraints:{audio:false,video:video},onsuccess:function(e){e.stop();console.info(w+"x"+h+" supported.");$.FSRTC.validRes.push([w,h]);checkRes(cam,func);},onerror:function(e){console.error(w+"x"+h+" not supported.");checkRes(cam,func);}});}
 $.FSRTC.getValidRes=function(cam,func){var used=[];$.FSRTC.validRes=[];resI=0;checkRes(cam,func);}
 $.FSRTC.checkPerms=function(){getUserMedia({constraints:{audio:true,video:true,},onsuccess:function(e){e.stop();console.info("media perm init complete");},onerror:function(e){console.error("media perm init error");}});}})(jQuery);(function($){$.JsonRpcClient=function(options){var self=this;this.options=$.extend({ajaxUrl:null,socketUrl:null,onmessage:null,login:null,passwd:null,sessid:null,loginParams:null,userVariables:null,getSocket:function(onmessage_cb){return self._getSocket(onmessage_cb);}},options);self.ws_cnt=0;this.wsOnMessage=function(event){self._wsOnMessage(event);};};$.JsonRpcClient.prototype._ws_socket=null;$.JsonRpcClient.prototype._ws_callbacks={};$.JsonRpcClient.prototype._current_id=1;$.JsonRpcClient.prototype.call=function(method,params,success_cb,error_cb){if(!params){params={};}