-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathscriptcam.min.js
1 lines (1 loc) · 5.41 KB
/
scriptcam.min.js
1
function SC_onError(e,t){$.scriptcam.SC_onError(e,t)}function SC_fileReady(e){$.scriptcam.SC_fileReady(e)}function SC_fileConversionStarted(e){$.scriptcam.SC_fileConversionStarted(e)}function SC_onMotion(e){$.scriptcam.SC_onMotion(e)}function SC_promptWillShow(){$.scriptcam.SC_promptWillShow()}function SC_onHandLeft(){$.scriptcam.SC_onHandLeft()}function SC_onHandRight(){$.scriptcam.SC_onHandRight()}function SC_onWebcamReady(e,t,n,r){$.scriptcam.SC_onWebcamReady(e,t,n,r)}function SC_onPictureAsBase64(e){$.scriptcam.SC_onPictureAsBase64(e)}function SC_connected(){$.scriptcam.SC_connected()}function SC_disconnected(){$.scriptcam.SC_disconnected()}function SC_setVolume(e){$.scriptcam.SC_setVolume(e)}function SC_onMotion(e,t,n,r,i){$.scriptcam.SC_onMotion(e,t,n,r,i)}function SC_timeLeft(e){$.scriptcam.SC_timeLeft(e)}function SC_addChatText(e){$.scriptcam.SC_addChatText(e)}function SC_userJoined(e){$.scriptcam.SC_userJoined(e)}function SC_userLeft(e){$.scriptcam.SC_userLeft(e)}(function(e){e.fn.scriptcam=function(t){var n=e.extend({},e.fn.scriptcam.defaults,t);return this.each(function(){n.id=this.id;data=n;data.path=decodeURIComponent(data.path);e("#"+n.id).html(n.noFlashFound);e.scriptcam.SC_promptWillShow=data.promptWillShow;e.scriptcam.SC_fileReady=data.fileReady;e.scriptcam.SC_fileConversionStarted=data.fileConversionStarted;e.scriptcam.SC_onMotion=data.onMotion;e.scriptcam.SC_onError=data.onError;e.scriptcam.SC_onHandLeft=data.onHandLeft;e.scriptcam.SC_onHandRight=data.onHandRight;e.scriptcam.SC_onWebcamReady=data.onWebcamReady;e.scriptcam.SC_connected=data.connected;e.scriptcam.SC_onPictureAsBase64=data.onPictureAsBase64;e.scriptcam.SC_disconnected=data.disconnected;e.scriptcam.SC_setVolume=data.setVolume;e.scriptcam.SC_timeLeft=data.timeLeft;e.scriptcam.SC_userLeft=data.userLeft;e.scriptcam.SC_userJoined=data.userJoined;e.scriptcam.SC_addChatText=function(t){t=t.replace(":{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-{",'<img src="'+data.path+'angry.gif" width="16" height="16" class="smiley"/>');t=t.replace(":)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-)",'<img src="'+data.path+'smile.gif" width="16" height="16" class="smiley"/>');t=t.replace(":D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-D",'<img src="'+data.path+'biggrin.gif" width="16" height="16" class="smiley"/>');t=t.replace(":O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-O",'<img src="'+data.path+'ohmy.gif" width="16" height="16" class="smiley"/>');t=t.replace(":(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-(",'<img src="'+data.path+'sad.gif" width="16" height="16" class="smiley"/>');t=t.replace(":p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(":-p",'<img src="'+data.path+'tongue.gif" width="16" height="16" class="smiley"/>');t=t.replace(";)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');t=t.replace(";-)",'<img src="'+data.path+'wink.gif" width="16" height="16" class="smiley"/>');e("#"+data.chatWindow).append(t+"<br/>");e("#"+data.chatWindow).animate({scrollTop:e("#"+data.chatWindow).prop("scrollHeight")-e("#"+data.chatWindow).height()},100)};if(n.canvasHeight&&n.canvasHeight){var t=n.canvasWidth;var r=n.canvasHeight}else{var t=n.width*n.zoom;var r=n.height*n.zoom;if(n.chatRoom){t=n.width*n.zoom+n.width*n.zoomChat+5;n.posX=n.width*n.zoom+5;r=n.height*Math.max(n.zoom,n.zoomChat)}}if(t<215){t=215}if(r<138){r=138}if(n.rotate!=0||n.skewX!=0||n.skewY!=0||n.flip!=0||n.zoom!=1||n.zoomChat!=1){var i={menu:"false",wmode:"window",allowScriptAccess:"always",allowFullScreen:"true"}}else{var i={menu:"false",wmode:"direct",allowScriptAccess:"always",allowFullScreen:"true"}}for(var s in n){n[s]=encodeURIComponent(n[s])}swfobject.embedSWF(decodeURIComponent(data.path)+"scriptcam.swf",n.id,t,r,"11.6",false,n,i)})};e.scriptcam={};e.scriptcam.getFrameAsBase64=function(){return e("#"+data.id).get(0).SC_getFrameAsBase64()};e.scriptcam.version=function(){return e("#"+data.id).get(0).SC_version()};e.scriptcam.hardwareacceleration=function(){return e("#"+data.id).get(0).SC_hardwareacceleration()};e.scriptcam.getMotionParameters=function(){e("#"+data.id).get(0).SC_getMotionParameters()};e.scriptcam.getBarCode=function(){return e("#"+data.id).get(0).SC_getBarCode()};e.scriptcam.startRecording=function(){e("#"+data.id).get(0).SC_startRecording()};e.scriptcam.pauseRecording=function(){e("#"+data.id).get(0).SC_pauseRecording()};e.scriptcam.resumeRecording=function(){e("#"+data.id).get(0).SC_resumeRecording()};e.scriptcam.closeCamera=function(){e("#"+data.id).get(0).SC_closeCamera()};e.scriptcam.changeVolume=function(t){e("#"+data.id).get(0).SC_changeVolume(t)};e.scriptcam.sendMessage=function(t){e("#"+data.id).get(0).SC_sendMessage(t)};e.scriptcam.playMP3=function(t){e("#"+data.id).get(0).SC_playMP3(t)};e.scriptcam.changeCamera=function(t){e("#"+data.id).get(0).SC_changeCamera(t)};e.scriptcam.changeMicrophone=function(t){e("#"+data.id).get(0).SC_changeMicrophone(t)};e.fn.scriptcam.defaults={width:320,height:240,chatWindow:"chatWindow",path:"",zoom:1,zoomChat:1,rotate:0,skewX:0,skewY:0,flip:0,noFlashFound:'<p>You need <a href="http://www.adobe.com/go/getflashplayer">Adobe Flash Player 11.7</a> to use this software.<br/>Please click on the link to download the installer.</p>'}})(jQuery)