/* magnoliyan */ var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(f,k,l){f instanceof String&&(f=String(f));for(var m=f.length,a=0;aq))return;c||setTimeout(function(){h(null,g+16384)},q)};c.onload=h;c.readAsArrayBuffer(b)},recContent:{},recNumberOfBytes:{},receive:function(d,f,e){var g=d.id;b.recNumberOfBytes[g]||(b.recNumberOfBytes[g]=0);b.recNumberOfBytes[g]+=f.byteLength;if(e.onFileProgress)e.onFileProgress({transfered:f.byteLength,fileId:g}, g);a.debug("received file packet, file name: ["+d.name+"], bytes: ["+f.byteLength+"]");b.recContent[g]||(b.recContent[g]=[]);b.recContent[g].push(f);if(b.recNumberOfBytes[g]===d.size){f=new k.Blob(b.recContent[g],{type:d.type});var c=(k.URL||k.webkitURL).createObjectURL(f);e.autoSaveToDisk&&b.saveToDisk(c,d.name);if(e.onFileReceived)e.onFileReceived(d.name,{blob:f,dataURL:c,url:c,fileId:g});delete b.recContent[g]}},saveToDisk:function(b,a){var e=l.createElement("a");e.href=b;e.target="_blank";e.download= a||b;b=new MouseEvent("click",{view:k,bubbles:!0,cancelable:!0});e.dispatchEvent(b);setTimeout(function(){(k.URL||k.webkitURL).revokeObjectURL(e.href)},500)},dataUrlToBlob:function(b){for(var a=atob(b.substr(b.indexOf(",")+1)),e=[],d=0;d\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(a||"undefined"===typeof a?"
":"
")+"$2")}(function(c){c=c.replace(/(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim,'$1');c= c.replace(/(^|[^\/])(www\.[\S]+(\b|$))/gim,'$1$2');return c=c.replace(/(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim,'$1')}(f.fn.mgVideoChat.htmlspecialchars(a)),!1)};var d={};a.prototype.tmpl=function(a,c){try{var b=/\W/.test(a)?new Function("obj","var p=[],print=function(){p.push.apply(p,arguments);};with(obj){p.push('"+a.replace(/[\r\t\n]/g," ").split("<%").join("\t").replace(/((^|%>)[^\t]*)'/g,"$1\r").replace(/\t=(.*?)%>/g, "',$1,'").split("\t").join("');").split("%>").join("p.push('").split("\r").join("\\'")+"');}return p.join('');"):d[a]=d[a]||tmpl(l.getElementById(a).innerHTML);return c?b(c):b}catch(q){throw Error("Error parsing template ["+a.substr(0,100)+"...]");}};var m={};a.prototype.loadTplByName=function(a,c){return this.loadTpl(this.config.dir+this.config[a]+"?v="+this.version,c)};a.prototype.loadTpl=function(a,c){null==m[a]?f.get(a,function(b){m[a]=b;c&&c(b)},"html"):c&&c(m[a]);return m[a]};a.prototype.on= function(a,c){this.events[a]=this.events[a]||[];this.events[a].push(c)};a.prototype.fire=function(a,c){this.debug("mgVideoChat fired ["+a+"]");var b=this.events[a],e=Array.prototype.slice.call(arguments,1);if(b)for(var d=0,f=b.length;dg?(a.debug("Callee is busy, try again "+g),g++,a.rouletteNext()):a.message(a._("Callee is busy at the moment, please try later :("), "danger",3)});b.on("call_drop",function(c){b.stop(c.connectionId,!1,a.roomOptions.roulette);a.roomOptions.roulette&&(b.connections={},a.renderConnections())});b.on("media_ready",function(c){for(var h in c.data.connectionIds)b.connections[c.data.connectionIds[h]].media_ready=!0,a.localStream&&!b.connections[c.data.connectionIds[h]].stream&&(b.connections[c.data.connectionIds[h]].stream=a.localStream);a.debug(b.connections)});b.on("connections",function(c){a.renderConnections()});var c={};b.on("roulette_next", function(h){if(!h||!h.connections)return a.message(a._("No partner found at the moment. Please try later."),"warning",3),!1;a.usersCount=h.users_count;b.connections={};c=h});b.on("roulette_accept",function(h){b.connections=c.connections;b.connectionsLoaded=!0;c={};for(var e in b.connections)a.localVideoOpen(a.localStream,e);a.connectAllMediaReady();a.renderConnections();a.notifySound()});b.on("roulette_invitation",function(c){a.usersCount=c.users_count;if(a.videoId){for(var h in c.connections);a.debug("Busy for invitation from "+ h);b.busy(h);b.drop(h);return!1}b.connections=c.connections;b.connectionsLoaded=!0;for(h in b.connections)b.connections[h].stream=a.localStream;b.rouletteAccept(h);a.localVideoOpen(a.localStream,h);a.renderConnections();a.notifySound()});b.on("connection_add",function(c){a.usersCount=c.users_count;a.renderConnection(c.connectionId)});b.on("connection_remove",function(c){a.usersCount=c.users_count;a.onConnectionClose(c.connectionId)});b.on("rstream_added",function(c,e){b.connections[e].rstream=c;a.roomOptions.group? a.remoteVideoGroupSelect():(a.remoteVideoOpen(c),a.onVideoOpen(e))});b.on("stream_added",function(c,b){a.localStream=c;a.localVideoOpen(c,b)});b.on("media_request_start",function(){a.$elem.find("#requestDialog").modal("show")});b.on("media_request_end",function(){a.$elem.find("#requestDialog").modal("hide")});b.on("status",function(c,e){a.fire("call_status",c,e);switch(e){case "call_inviting":a.callRing(!1);break;case "call_invited":a.videoId?(b.busy(c),b.drop(c)):(a.inviteStart(c),f.notify(a._("New call invitation"))); break;case "call_accepting":case "call_accepted":a.$videoPanel.data("call_id",c);a.inviteStop();break;case "idle":a.callRing(!0);if(a.videoId==c)a.onVideoClose();a.videoInvitedId==c&&a.inviteStop()}a.renderConnection(c)});b.on("socket_error",function(c){a.message(a._("Error connecting to media server: {error_name} {error_message}",["{error_name}","{error_message}"],[c.name,c.message]),"danger");a.onDisconnected()});b.on("socket_closed",function(c){a.message(a._("Websocket closed, please try reloading page later."), "danger");a.onDisconnected()});b.on("stream_error",function(c){a.message(a._("Error getting local media stream: {error_message}",["{error_message}"],[a.getErrorText(c)]),"danger")});b.on("pc_error",function(c){a.message(a._("Error creating peer connection: {error_name} {error_message}",["{error_name}","{error_message}"],[c.name,c.message]),"danger")});b.on("sdp_offer",function(c){if(b.refuseIdleState(c.connectionId))return!1;b.connections[c.connectionId].offerSdp=c.sdp;b.setStatus(c.connectionId, "sdp_offered");a.loginParams.noPc||a.loginParams.noMedia||b.sdpAnswer(c.connectionId)});b.on("sdp_answer",function(a){if(b.refuseIdleState(a.connectionId))return!1;b.remoteSDReceive(b.connections[a.connectionId].pc,a.sdp);b.setStatus(a.connectionId,"sdp_answered")});b.on("ice_candidate",function(c){if(b.refuseIdleState(c.connectionId)||a.loginParams.noPc||a.loginParams.noMedia)return!1;var e=b.connections[c.connectionId].pc;b.debug("Adding ice candidate:");b.debug({sdpMLineIndex:c.label,candidate:c.candidate}); e.addIceCandidate(new RTCIceCandidate({sdpMLineIndex:c.label,candidate:c.candidate})).then(function(){b.debug("Remote candidate added successfully.")}).catch(function(a){b.debug("Failed to add remote candidate: "+a.toString())})});b.on("file_offer",function(c){var e=c.connectionId,d=b.connections[e].data.userData;a.files[c.fileDesc.id]={desc:c.fileDesc,connectionId:e,pending:!0};a.renderFiles();a.$fileAcceptDialog.data("file_desc",c.fileDesc);a.$fileAcceptDialog.data("connection_id",e);a.$fileAcceptDialog.find(".username").text(d.name); d.image&&a.$fileAcceptDialog.find(".desc").html(''+d.name+'');a.$fileAcceptDialog.find(".fileName").text(c.fileDesc.name);a.$fileAcceptDialog.find(".fileSize").text(a.getReadableFileSizeString(c.fileDesc.size));a.$fileAcceptDialog.modal("show");a.notifySound();f.notify(a._("New file offer"))});b.on("file_accept",function(c){b.fileSdpOffer(c.connectionId,c.fileDesc,{channelOnOpen:function(){a.debug("channelOnOpen connId: "+c.connectionId);a.debug(c);var e=c.fileDesc.id; d.send(a.files[e].file,b.connections[c.connectionId].sendChannel,{onFileProgress:function(b){a.debug("onFileProgress "+e+" connId: "+c.connectionId);a.debug(b);a.files[b.fileId]&&(a.files[b.fileId].desc.transfered+=b.transfered,a.renderFileProgress(b.fileId))},onFileSent:function(b){a.debug("onFileSent "+e+" connId: "+c.connectionId);a.debug(b);delete a.files[b.fileId];a.renderFiles()},calcTimeout:function(c){return a.files[c.fileId]?b.firefox?5:500:-1}})}})});b.on("file_receive_progress",function(c){a.files[c.fileId]&& (a.files[c.fileId].packetsConfirmed=c.packets)});b.on("file_sdp_offer",function(c){var e=c.connectionId,h=c.fileDesc.id,g=c.fileDesc;b.connections[c.connectionId].fileOfferSdp=c.sdp;b.fileSdpAnswer(c.connectionId,c.fileDesc,{channelOnMessage:function(c){c=c.data;a.debug("channelOnMessage connId: "+e);d.receive(g,c,{onFileProgress:function(c){a.debug("onFileProgress "+h+" connId: "+e);a.debug(c);a.files[c.fileId]&&(a.files[c.fileId].desc.transfered+=c.transfered,a.renderFileProgress(c.fileId))},autoSaveToDisk:!0, onFileReceived:function(c,b){a.debug("onFileReceived file: "+c+", file id: "+h+" connId: "+e);a.debug(b);delete a.files[b.fileId];a.renderFiles();f.notify(a._("New file received"))}})}})});b.on("file_sdp_answer",function(a){b.connections[a.connectionId].dpc.setRemoteDescription(new RTCSessionDescription(a.sdp))});b.on("file_cancel",function(c){delete a.files[c.fileDesc.id];a.renderFiles()})}}})(jQuery,window,document); (function(f,k,l,m){f.fn.mgVideoChatUI=function(a,b,d,k){a.prototype.updateLayout=function(){var a=this.$callPanel.is(":visible")||this.$chatPanel.is(":visible"),b=this.$elem.find("#mainContent"),c=this.$elem.find("#sideMenu");if(b.data("is_visible")===a)return!1;a?(b.removeClass().addClass(b.data("chat_class")),c.removeClass().addClass(c.data("chat_class")),f("#offcanvasButton").show()):(b.removeClass().addClass(b.data("no_chat_class")),c.removeClass().addClass(c.data("no_chat_class")));b.data("is_visible", a)};a.prototype.renderConnections=function(){var a=this;a.debug("connections");a.debug(b.connections);this.loadTplByName("tplConnections",function(e){e=a.tmpl(e,{rows:b.connections,roomOptions:a.roomOptions,usersCount:a.usersCount});a.$connectionsPanel.html(e);for(var c in b.connections)a.renderConnection(c);b.connections.length||a.$connectionsPanel.find("#lonely").show();a.fire("connections",b.connections)})};a.prototype.renderConnection=function(a){var e=this;this.getConnectionElement(a,function(c){var d= e.$connectionsPanel.find("#connection_"+a);d.length?(d.hasClass("active")&&c.addClass("active"),d.replaceWith(c)):e.$connectionsPanel.find("#connections").append(c);e.$connectionsPanel.find("#lonely").hide();e.fire("connections",b.connections)})};a.prototype.getConnectionElement=function(a,g){var c=this;if(!b.connections[a])return!1;this.loadTplByName("tplConnection",function(e){function h(a){c.$connectionsPanel.find(".connectionItem").removeClass("active");a.addClass("active")}var n=b.connections[a], k=n.data.loginParams;e=f(c.tmpl(e,{id:a,status:n.status?n.status:"idle",userData:n.data.userData,loginParams:n.data.loginParams,videoId:c.videoId,chatId:c.chatId,unread:n.data.unread?n.data.unread:0,connection:n,roomOptions:c.roomOptions,hasWebrtc:!c.loginParams.noPc&&!c.loginParams.noMedia&&!k.noPc&&!k.noMedia,selfLoginParams:c.loginParams}));c.roomOptions.group&&n.rstream&&c.videoSetStream(e.find("video"),n.rstream);c.roomOptions.group?e.click(function(){h(f(this));var a=f(this).data("connection_id"); b.connections[a].rstream&&c.remoteVideoOpen(b.connections[a].rstream,a)}):e.click(function(){h(f(this));c.setChat(f(this).data("connection_id"))});e.find(".call.cmdBtn").click(function(){b.invite(f(this).data("id"),c.getMediaOptions({audio:!0,video:!0}))});e.find(".callDesktop.cmdBtn").click(function(){var a=this;c.getDesktopShareMedia(function(c){if(!c)return!1;b.invite(f(a).data("id"),c)})});e.find(".callAudio.cmdBtn").click(function(){b.invite(f(this).data("id"),c.getMediaOptions({audio:!0,video:!1}))}); e.find(".answer.cmdBtn").click(function(){c.debug("Clicked to answer the connectionId: "+f(this).data("id"));b.accept(f(this).data("id"),c.getMediaOptions({audio:!0,video:!0}))});e.find(".drop.cmdBtn").click(function(){c.debug("Clicked to drop the connectionId: "+f(this).data("id"));b.drop(f(this).data("id"),!1,c.roomOptions.roulette)});e.find(".fileSend.cmdBtn").click(function(){var a=f(this).data("id");c.debug("Clicked to send file to the connectionId: "+a);f("#fileDialog").off("change");f("#fileDialog").val(""); f("#fileDialog").on("change",function(e){e=e.target.files;for(var f=0,h;h=e[f];f++){h.connectionId=a;var g=d.getDesc(h);c.config.fileMaxSize&&g.size>c.config.fileMaxSize?c.message(c._("This file size of over maximum defined of {max_size}",["{max_size}"],[c.getReadableFileSizeString(c.config.fileMaxSize)]),"danger"):(b.fileOffer(a,g),c.files[h.id]={file:h,desc:g,connectionId:a},c.renderFiles())}});f("#fileDialog").trigger("click")});c.chatId==a&&e.addClass("active");g(e)})};a.prototype.renderFiles= function(){var a=this;a.debug("files");a.debug(a.files);this.loadTplByName("tplFile",function(b){var c="",e;for(e in a.files){var d=a.tmpl(b,{file:a.files[e],fileId:e,fileSize:a.getReadableFileSizeString(a.files[e].desc.size),roomOptions:a.roomOptions});c+=d}a.$filesPanel.find("#files").html(c);a.$filesPanel.find("a.fileAccept").click(function(){var c=f(this).data("file_id");a.fileAccept(a.files[c].desc,a.files[c].connectionId);return!1});a.$filesPanel.find("a.fileCancel").click(function(){var c= f(this).data("file_id");a.fileCancel(a.files[c].desc,a.files[c].connectionId);return!1});""==c?a.$filesPanel.hide():a.$filesPanel.show()})};a.prototype.renderYouInfo=function(){var a=this;a.debug(a.userData);this.loadTplByName("tplYou",function(b){a.$youInfoPanel.find("#youInfo").html(a.tmpl(b,{userData:a.userData}));a.userData?a.$youInfoPanel.show():a.$youInfoPanel.hide()})};a.prototype.renderFileProgress=function(a){var b=this.files[a].desc;if(!b)return!1;var c=0;b.size&&(c=b.transfered/b.size* 100);a=this.$filesPanel.find("#file_"+a);a.find(".progress-bar").css("width",c+"%");a.find(".progressText").text(c+"%")};a.prototype.renderChatMessage=function(a,d,c){var e=this,f=this.getChatDiv(a);this.loadTplByName("tplChat",function(a){var h={message:e.parseChatMessageText(c),me:!1};d===e.connectionId?(h.me=!0,h.userData=e.userData):h.userData=b.connections[d].data.userData;a=e.tmpl(a,h);h=f.find(".messages");h.append(a).scrollTop(h.get(0).scrollHeight)})};a.prototype.getChatDiv=function(a){var d= this,c=this.$chatPanel.find("#chat_"+a);c.length||(c=this.loadTplByName("tplChatInput"),c=f(d.tmpl(c,{chatId:a})),c.appendTo(d.$chatPanel.find("#chats")),c.find("textarea").keypress(function(c){var e=f(this);if(13===c.keyCode&&c.shiftKey)return e.val(e.val()+"\n"),!1;if(13===c.keyCode)return b.chatMessage(a,e.val()),d.renderChatMessage(a,d.connectionId,e.val()),e.val(""),!1}));return c}}})(jQuery,window,document); (function(f,k,l,m){var a={wsURL:"ws://cs2013.mojohost.com:8080",dir:"{rel}",tplMain:"/tpls/main.html",tplConnections:"/tpls/connections.html",tplConnection:"/tpls/connection.html",tplChat:"/tpls/chat.html",tplChatInput:"/tpls/chat_input.html",tplRoulette:"/tpls/roulette.html",tplFile:"/tpls/file.html",tplYou:"/tpls/you.html",sound:{mp3:"/sounds/ring.mp3",ogg:"/sounds/ring.ogg"},notifySound:{mp3:"/sounds/notify.mp3",ogg:"/sounds/notify.ogg"},debug:!1,login:null,rtc:{pcConfig:{iceServers:[{urls:"stun:stun.l.google.com:19302"}]}, pcConstraints:{optional:[{DtlsSrtpKeyAgreement:!0}]},offerConstraints:{offerToReceiveAudio:1,offerToReceiveVideo:1},mediaConstraints:{audio:!0,video:!0},sdpConstraints:{mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0},optional:[{VoiceActivityDetection:!1}]},audio_receive_codec:"opus/48000"},fileMaxSize:512E3,chromeExtensionId:"jfepeciommhoefhfacjdpcmnclekenag",enableNotifications:!0},b=null,d=null,p=null,e=null,g=function(c,h){this.version="1";this.elem=c;this.$elem=f(c);this.$connectionsPanel= null;this.options=h;this.metadata=this.$elem.data("mgVideoChat-options");this.config=f.extend({},a,this.options);b=f.fn.mgRtc(this.config);d=f.fn.mgFileHelper(b);p=f.fn.mgDesktopShare(b);e=f.fn.mgNotifications(b);f.fn.mgVideoChatUtils(g,b);f.fn.mgVideoChatUI(g,b,d,p);f.fn.mgVideoChatRtcEvents(g,b,d,e);b.init(this.config);this.fixPath();this.init();this.$elem.data("mgVideoChat-instance",this);this.connectionId=this.videoInvitedId=this.videoId=this.chatId=null;this.userData={};this.roomOptions={};this.localStream= null;this.loginParams={};this.files={};this.isMuted={audio:!1,video:!1};this.events={}};g.prototype.init=function(){var a=this;this.loadTplByName("tplConnections",function(c){a.loadTplByName("tplMain",function(c){a.$elem.html(a.tmpl(c,{config:a.config}));a.$connectionsPanel=a.$elem.find("#connectionsPanel");a.$messagePanel=a.$elem.find("#messagePanel");a.$loginPanel=a.$elem.find("#loginPanel");a.$videoPanel=a.$elem.find("#videoPanel");a.$loginDialog=a.$elem.find("#loginDialog");a.$callPanel=a.$elem.find("#callPanel"); a.$answerDialog=a.$elem.find("#answerDialog");a.$shareDialog=a.$elem.find("#shareDialog");a.$fileAcceptDialog=a.$elem.find("#fileAcceptDialog");a.$chatPanel=a.$elem.find("#chatPanel");a.$filesPanel=a.$elem.find("#filesPanel");a.$youInfoPanel=a.$elem.find("#youInfoPanel");a.loginParams={};c={};var d={},h={websocket:a._("Your browser does not support websocket."),peerconnection:a._("Your browser does not support PeerConnections."),usermedia:a._("Your browser does not support user media.")};if(b.checkCompatibility(c, d,"chat")){b.loadDevices(function(c){a.devices=c;a.loginParams.hasAudioDevice=0Google Chrome or Mozilla Firefox')); a.message(g.join("
"),"warning",5)}d.peerconnection&&(a.loginParams.noPc=!0);d.usermedia&&(a.loginParams.noMedia=!0);b.connect(a.config.wsURL)}else{a.debug(c);var g=[],k;for(k in c)g.push(h[k]);g.push(a._('Please try Google Chrome or Mozilla Firefox'));a.message(g.join("
"),"danger")}a.initDom();a.initRtc();a.config.enableNotifications&&e.grant()});a.loadTplByName("tplChatInput", function(a){})})};g.prototype.initDom=function(){var a=this;a.$loginPanel.find("#loginButton").click(function(){a.config.login?a.config.login(function(){b.login(a.loginParams)}):a.$loginDialog.modal("show")});a.$loginDialog.on("shown.bs.modal",function(){a.$loginDialog.find("#userName").focus()});var d=function(){a.$loginDialog.find("#userName").val()&&(a.setCookie("mgVideoChatSimple",a.$loginDialog.find("#userName").val(),30,k.location.hostname),a.$loginDialog.modal("hide"),k.location.reload())}; a.$loginDialog.find("#userName").keypress(function(a){if(13===a.keyCode)return d(),!1});a.$loginDialog.find("button.login").click(d);a.$videoPanel.find("#videoFullScreen").click(function(){var c=a.$videoPanel.get(0);(c.requestFullScreen||c.webkitRequestFullScreen||c.mozRequestFullScreen).call(c)});a.$videoPanel.find("#videoExitFullScreen").click(function(){(l.cancelFullScreen||l.webkitCancelFullScreen||l.mozCancelFullScreen).call(l)});a.$videoPanel.find("#callHangup").click(function(){b.drop(a.videoId)}); var e=function(c,b){if(!a.localStream)return!1;var d="audio"==b?a.localStream.getAudioTracks():a.localStream.getVideoTracks();if(0===d.length)return!1;var e;for(e=0;e');this.$answerDialog.modal("show")};g.prototype.callRing=function(a){var c=this.$elem.find("#ringSound").get(0);a?c.pause():c.play()};g.prototype.notifySound=function(){this.$elem.find("#notifySound").get(0).play()};g.prototype.rouletteNext=function(){this.videoId&&b.drop(this.videoId,!1,!0);b.rouletteNext()};g.prototype.hasMedia=function(a,b){try{return 0<("audio"==b?a.getAudioTracks():a.getVideoTracks()).length}catch(q){return!1}};g.prototype.videoSetStream=function(a,b){a.get(0).srcObject= b};g.prototype.localVideoOpen=function(a,b){a?(this.videoSetStream(this.$elem.find("#localVideo"),a),this.$elem.find("#localVideo").show(),this.isMuted={audio:!1,video:!1},this.hasMedia(a,"video")||this.$elem.find("#videoMute"),this.hasMedia(a,"audio")||this.$elem.find("#audioMute")):this.$elem.find("#localVideo").hide();this.onVideoOpen(b)};g.prototype.remoteVideoOpen=function(a,b){a?(this.videoSetStream(this.$elem.find("#remoteVideo"),a),this.$elem.find("#remoteVideo").show()):this.$elem.find("#remoteVideo").hide(); if(b)this.onVideoOpen(b)};g.prototype.remoteVideoGroupSelect=function(){if(this.roomOptions.group&&!this.videoId)for(var a in b.connections)b.connections[a].rstream&&this.$connectionsPanel.find("#connection_"+a+".connectionItem").click()};g.prototype.getMediaOptions=function(a){a.video=a.video&&!this.roomOptions.disableVideo;a.audio=a.audio&&!this.roomOptions.disableAudio;return a};g.prototype.onRoomOptions=function(){var a=-1install this chrome extension in order to use desktop sharing and reload this page.'),"danger"),c.$elem.find(".extensionInstall").click(function(){try{chrome.webstore.install("https://chrome.google.com/webstore/detail/"+ c.config.chromeExtensionId,function(){location.reload()},function(a){c.message(a,"danger")})}catch(r){k.open("https://chrome.google.com/webstore/detail/"+c.config.chromeExtensionId,"install")}return!1})),a(!1);d={audio:!1,video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:d,maxWidth:k.screen.width,maxHeight:k.screen.height,maxFrameRate:3}}};c.roomOptions.disableAudio||(d.audioAppend=!0);b.debug("mediaOptions");b.debug(d);return a(d)})};g.prototype.disableChat=function(a){a?this.$chatPanel.find("#chat_"+ a+" .form-control").attr("disabled","disabled"):this.$chatPanel.find(".form-control").attr("disabled","disabled")};g.prototype.setChat=function(a){this.chatId=a;this.$chatPanel.find(".chat").hide();this.getChatDiv(a).show();0/g,">");var f={ENT_NOQUOTES:0,ENT_HTML_QUOTE_SINGLE:1,ENT_HTML_QUOTE_DOUBLE:2,ENT_COMPAT:2,ENT_QUOTES:3,ENT_IGNORE:4};0===b&&(c=!0);if("number"!==typeof b){b=[].concat(b);for(e=0;e