Removed public/translations

Ylian Saint-Hilaire committed Dec 23, 2019 at 14:38 UTC 37a84af948b9b6beccc189dccb51dda93ffc0be4
10 files changed -2690
public/translations/player-min_cs.htm deleted
-1
@@ -1 +0,0 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Přepnout režim zobrazení"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Otevřít soubor..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Spustit disabled onclick=play()> <input id=PauseButton type=button value=Pauza disabled onclick=pause()> <input id=RestartButton type=button value=Restart disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 rychlost<option value=2>1/2 rychlost<option value=1 selected>Normalní rychlost<option value=0.5>2x rychlost<option value=0.25>4x rychlost<option value=0.1>10x rychlost</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Zrušit onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Smazat style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Čas",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Trvání",format("{0} sekund{1}",l,1<l?"s":""))}if(i+=addInfo("Uživatel",recFileMetadata.username),i+=addInfo("Uživatelské ID",recFileMetadata.userid),i+=addInfo("SessionID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Adresy",format("{0} na {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("Název zařízení",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral terminal":2==n?n="MeshCentral plocha":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT přesměrování"),i+=addInfoNoEsc("Protokol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Zmáčkni [mezerník] pro spuštění/pauzu.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Zmáčkni [mezerník] pro spuštění/pauzu.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop soubor .mcrec nebo klikni na "Otevřít soubor..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Otevřít soubor...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player-min_fr.htm deleted
-1
@@ -1 +0,0 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Toggle View Mode"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Open File..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Jouer disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Redémarrer disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 vitesse<option value=2>1/2 vitesse<option value=1 selected>Vitesse normale<option value=0.5>2x vitesse<option value=0.25>4x vitesse<option value=0.1>10x vitesse</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Annuler onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Delete style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Temps",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duration",format("{0} second{1}",l,1<l?"s":""))}if(i+=addInfo("Nom d'utilisateur",recFileMetadata.username),i+=addInfo("Identifiant d'utilisateur",recFileMetadata.userid),i+=addInfo("ID de session",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Addresses",format("{0} to {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("Device Name",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT Redirection"),i+=addInfoNoEsc("Protocole",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Appuyez sur [espace] pour jouer/mettre en pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Appuyez sur [espace] pour jouer/mettre en pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Drag & drop a .mcrec file or click "Open File..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open File...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player-min_ja.htm deleted
-1
@@ -1 +0,0 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title=表示モードの切り替え onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value=ファイルを開く... onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=遊びます disabled onclick=play()> <input id=PauseButton type=button value=一時停止 disabled onclick=pause()> <input id=RestartButton type=button value=再起動 disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4スピード<option value=2>1/2速度<option value=1 selected>通常速度<option value=0.5>2倍速<option value=0.25>4倍速<option value=0.1>10倍速</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=キャンセル onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=OK onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=削除する style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("時間",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("期間",format("{0}秒{1}",l,1<l?"s":""))}if(i+=addInfo("ユーザー名",recFileMetadata.username),i+=addInfo("ユーザーID",recFileMetadata.userid),i+=addInfo("セッションID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("住所",format("{0}から{1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("装置名",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentralターミナル":2==n?n="MeshCentralデスクトップ":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMTリダイレクト"),i+=addInfoNoEsc("プロトコル",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>[スペース]を押して再生/一時停止します。</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>[スペース]を押して再生/一時停止します。</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var c=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(c))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>.mcrecファイルをドラッグアンドドロップするか、[ファイルを開く...]をクリックします</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"ファイルを開く...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player-min_nl.htm deleted
-1
@@ -1 +0,0 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Schakel weergavemodus"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Open bestand..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Afspelen disabled onclick=play()> <input id=PauseButton type=button value=Pause disabled onclick=pause()> <input id=RestartButton type=button value=Herstarten disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 snelheid<option value=2>1/2 snelheid<option value=1 selected>Normale snelheid<option value=0.5>2x Snelheid<option value=0.25>4x snelheid<option value=0.1>10x Snelheid</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Afbreken onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Oke onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Verwijderen style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Tijd",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Looptijd",format("{0} seconde {1}",l,1<l?"s":""))}if(i+=addInfo("Gebruikersnaam",recFileMetadata.username),i+=addInfo("GebruikersID",recFileMetadata.userid),i+=addInfo("SessieID",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Adressen",format("{0} tot {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("Apparaat naam",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var n=recFileMetadata.protocol;1==n?n="MeshCentral Terminal":2==n?n="MeshCentral Desktop":100==n?n="Intel&reg; AMT WSMAN":101==n&&(n="Intel&reg; AMT omleiding"),i+=addInfoNoEsc("Protocol",n)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Druk op [spatie] om te spelen / pauzeren.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Druk op [spatie] om te spelen / pauzeren.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),n=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=n){currentDeltaTimeTotalSec=n;var o=Math.floor(n/3600);n-=3600*o;var s=Math.floor(n/60);n-=60*o;var d=Math.floor(n);QH("timespan",pad2(o)+":"+pad2(s)+":"+pad2(d))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Sleep een .mcrec-bestand of klik op "Bestand openen ..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Open bestand...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var n=1;n<3;n++)QV("dialog"+n,n==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player-min_pt.htm deleted
-1
@@ -1 +0,0 @@
1 -<!doctypehtml><html dir=ltr xmlns=http://www.w3.org/1999/xhtml><meta http-equiv=X-UA-Compatible content="IE=edge"><meta content="text/html;charset=utf-8"http-equiv=Content-Type><meta name=viewport content="user-scalable=1,initial-scale=1,minimum-scale=1,maximum-scale=1"><meta name=apple-mobile-web-app-capable content=yes><meta name=format-detection content="telephone=no"><link type=text/css href=styles/style.css media=screen rel=stylesheet title=CSS><script src=scripts/common-0.0.1.js></script><script src=scripts/agent-desktop-0.0.2.js></script><script src=scripts/amt-desktop-0.0.2.js></script><script src=scripts/amt-terminal-0.0.2.js></script><script src=scripts/zlib.js></script><script src=scripts/zlib-inflate.js></script><script src=scripts/zlib-adler32.js></script><script src=scripts/zlib-crc32.js></script><body style=overflow:hidden;background-color:#000><div id=p11 class=noselect style=overflow:hidden><div id=deskarea0><div id=deskarea1 class=areaHead><div class=toright2><div class=deskareaicon title="Alternar modo de exibição"onclick=toggleAspectRatio(1)>⇲</div></div><div><input id=OpenFileButton type=button value="Abrir arquivo..."onclick=openfile()> <span id=deskstatus></span></div></div><div id=deskarea2><div class=areaProgress><div id=progressbar></div></div></div><div id=deskarea3x style="max-height:calc(100vh - 54px);height:calc(100vh - 54px)"onclick=togglePause()><div id=bigok style="display:none;left:calc((100vh / 2))"><b>✓</b></div><div id=bigfail style="display:none;left:calc((100vh / 2))"><b>✗</b></div><div id=metadatadiv style=padding:20px;color:#d3d3d3;text-align:left;display:none></div><div id=DeskParent><canvas id=Desk width=640 height=480></canvas></div><div id=TermParent style=display:none><pre id=Term></pre></div><div id=p11DeskConsoleMsg style=display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:#ff0;background-color:rgba(0,0,0,.6);padding:10px;border-radius:5px onclick=clearConsoleMsg()></div></div><div id=deskarea4 class=areaFoot><div class=toright2><div id=timespan style=padding-top:4px;padding-right:4px>00:00:00</div></div><div>&nbsp; <input id=PlayButton type=button value=Play disabled onclick=play()> <input id=PauseButton type=button value=Pausa disabled onclick=pause()> <input id=RestartButton type=button value=Reiniciar disabled onclick=restart()> <select id=PlaySpeed onchange=this.blur()><option value=4>1/4 de velocidade<option value=2>1/2 velocidade<option value=1 selected>Velocidade normal<option value=0.5>2x velocidade<option value=0.25>4x velocidade<option value=0.1>10x Velocidade</select></div></div></div><div id=dialog class=noselect style=display:none><div id=dialogHeader><div tabindex=0 id=id_dialogclose onclick=setDialogMode() onkeypress='"Enter"==event.key&&setDialogMode()'>✖</div><div id=id_dialogtitle></div></div><div id=dialogBody><div id=dialog1><div id=id_dialogMessage></div></div><div id=dialog2><div id=id_dialogOptions></div></div></div><div id=idx_dlgButtonBar><input id=idx_dlgCancelButton type=button value=Cancelar onclick=dialogclose(0)> <input id=idx_dlgOkButton type=button value=Ok onclick=dialogclose(1)><div><input id=idx_dlgDeleteButton type=button value=Deletar style=display:none onclick=dialogclose(2)></div></div></div></div><script>var recFile=null,recFilePtr=0,recFileStartTime=0,recFileLastTime=0,recFileEndTime=0,recFileMetadata=null,recFileProtocol=0,agentDesktop=null,amtDesktop=null,playing=!1,readState=0,waitTimer=null,waitTimerArgs=null,deskAspectRatio=0,currentDeltaTimeTotalSec=0;function start(){window.onresize=deskAdjust,document.ondrop=ondrop,document.ondragover=ondragover,document.ondragleave=ondragleave,document.onkeypress=onkeypress,Q("PlaySpeed").value=1,cleanup()}function readNextBlock(l){if(recFilePtr+16>recFile.size)QS("progressbar").width="100%",l(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);if(recFilePtr+16+a>recFile.size)QS("progressbar").width="100%",l(-1);else{var i=new FileReader;i.onload=function(){recFilePtr+=16+a,QS("progressbar").width=0==recFileEndTime?Math.floor(recFilePtr/recFile.size*100)+"%":Math.floor((recFileLastTime-recFileStartTime)/(recFileEndTime-recFileStartTime)*100)+"%",l(e,t,r,this.result)},i.readAsBinaryString(recFile.slice(recFilePtr+16,recFilePtr+16+a))}},e.readAsBinaryString(recFile.slice(recFilePtr,recFilePtr+16))}}function readLastBlock(i){if(recFile.size<32)i(-1);else{var e=new FileReader;e.onload=function(){var e=ReadShort(this.result,0),t=ReadShort(this.result,2),a=ReadInt(this.result,4),r=(ReadInt(this.result,8)<<32)+ReadInt(this.result,12);3==e&&16==a&&"MeshCentralMCREC"==this.result.substring(16,32)?i(e,t,r):i(-1)},e.readAsBinaryString(recFile.slice(recFile.size-32,recFile.size))}}function addInfo(e,t){return null==t?"":addInfoNoEsc(e,EscapeHtml(t))}function addInfoNoEsc(e,t){return null==t?"":"<span style=color:gray>"+EscapeHtml(e)+"</span>:&nbsp;<span style=font-size:20px>"+t+"</span><br/>"}function processFirstBlock(e,t,a,r){if(recFileProtocol=0,1==e&&0==t){try{recFileMetadata=JSON.parse(r)}catch(e){return void cleanup()}if(null!=recFileMetadata&&"MeshCentralRelaySession"==recFileMetadata.magic&&1==recFileMetadata.ver){var i="";if(i+=addInfo("Tempo",recFileMetadata.time),0!=recFileEndTime){var l=Math.floor((recFileEndTime-a)/1e3);i+=addInfo("Duração",format("{0} segundo{1}",l,1<l?"s":""))}if(i+=addInfo("Nome de usuário",recFileMetadata.username),i+=addInfo("ID do usuário",recFileMetadata.userid),i+=addInfo("ID da sessão",recFileMetadata.sessionid),recFileMetadata.ipaddr1&&recFileMetadata.ipaddr2&&(i+=addInfo("Endereços",format("{0} para {1}",recFileMetadata.ipaddr1,recFileMetadata.ipaddr2))),recFileMetadata.devicename&&(i+=addInfo("Nome do Dispositivo",recFileMetadata.devicename)),i+=addInfo("NodeID",recFileMetadata.nodeid),recFileMetadata.protocol){var o=recFileMetadata.protocol;1==o?o="MeshCentral Terminal":2==o?o="MeshCentral Desktop":100==o?o="Intel&reg; AMT WSMAN":101==o&&(o="Intel&reg; Redirecionamento AMT"),i+=addInfoNoEsc("Protocolo",o)}QV("DeskParent",!0),QV("TermParent",!1),1==recFileMetadata.protocol?(recFileProtocol=1,i+="<br /><br /><span style=color:gray>Pressione [espaço] para reproduzir / pausar.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a):2==recFileMetadata.protocol?(recFileProtocol=2,i+="<br /><br /><span style=color:gray>Pressione [espaço] para reproduzir / pausar.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(agentDesktop=CreateAgentRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,agentDesktop.State=3,deskAdjust()):101==recFileMetadata.protocol&&(recFileProtocol=101,i+="<br /><br /><span style=color:gray>Press [space] to play/pause.</span>",QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),recFileStartTime=recFileLastTime=a,(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start(),deskAdjust()),QV("metadatadiv",!0),QH("metadatadiv",i),QH("deskstatus",recFile.name)}else cleanup()}else cleanup()}function processBlock(e,t,a,r){if(e<0)pause();else{var i=Math.round((a-recFileLastTime)*parseFloat(Q("PlaySpeed").value));i<5?processBlockEx(e,t,a,r):(waitTimerArgs=[e,t,a,r],waitTimer=setTimeout(function(){waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3])},i))}}function processBlockEx(e,t,a,r){if(0!=playing){var i=0!=(1&t),l=0!=(2&t),o=Math.floor((a-recFileStartTime)/1e3);if(currentDeltaTimeTotalSec!=o){currentDeltaTimeTotalSec=o;var n=Math.floor(o/3600);o-=3600*n;var s=Math.floor(o/60);o-=60*n;var d=Math.floor(o);QH("timespan",pad2(n)+":"+pad2(s)+":"+pad2(d))}2==e&&i&&!l?1==recFileProtocol?agentTerminal.ProcessData(r):2==recFileProtocol?agentDesktop.ProcessData(r):101==recFileProtocol&&(0==readState&&"4100000000000000"==rstr2hex(r)?(readState=1,8<r.length&&amtDesktop.ProcessData(r.substring(8))):1==readState&&amtDesktop.ProcessData(r)):2==e&&i&&l&&101==recFileProtocol&&"0000000008080001000700070003050200000000"==rstr2hex(r)&&(amtDesktop.bpp=1),recFileLastTime=a,playing&&readNextBlock(processBlock)}}function cleanup(){recFilePtr=0,playing=!1,(recFileMetadata=recFile=null)!=agentDesktop&&(agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height),agentDesktop=null),null!=amtDesktop&&(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),amtDesktop=null),recFileEndTime=currentDeltaTimeTotalSec=readState=0,(agentTerminal=waitTimerArgs=null)!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null),QH("deskstatus",""),QE("PlayButton",!1),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("metadatadiv",!0),QH("metadatadiv",'<span style="font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px">MeshCentral Session Player</span><br /><br /><span style=color:gray>Arraste e solte um arquivo .mcrec ou clique em "Abrir arquivo..."</span>'),QV("DeskParent",!0),QV("TermParent",!1)}function ondrop(e){if(haltEvent(e),QV("bigfail",!1),QV("bigok",!1),null!=e.dataTransfer){var t=[];for(var a in e.dataTransfer.files)null!=e.dataTransfer.files[a].type&&null!=e.dataTransfer.files[a].size&&0!=e.dataTransfer.files[a].size&&e.dataTransfer.files[a].name.endsWith(".mcrec")&&t.push(e.dataTransfer.files[a]);0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}))}}var xxdialogMode,xxdialogFunc,xxdialogButtons,xxdialogTag,dragtimer=null;function ondragover(e){haltEvent(e),null!=dragtimer&&(clearTimeout(dragtimer),dragtimer=null);QV("bigok",!0),QV("bigfail",!1)}function ondragleave(e){haltEvent(e),dragtimer=setTimeout(function(){QV("bigfail",!1),QV("bigok",!1),dragtimer=null},10)}function onkeypress(e){xxdialogMode||(" "==e.key&&(togglePause(),haltEvent(e)),"1"==e.key&&(Q("PlaySpeed").value=4,haltEvent(e)),"2"==e.key&&(Q("PlaySpeed").value=2,haltEvent(e)),"3"==e.key&&(Q("PlaySpeed").value=1,haltEvent(e)),"4"==e.key&&(Q("PlaySpeed").value=.5,haltEvent(e)),"5"==e.key&&(Q("PlaySpeed").value=.25,haltEvent(e)),"6"==e.key&&(Q("PlaySpeed").value=.1,haltEvent(e)),"0"==e.key&&(pause(),restart(),haltEvent(e)))}function openfile(){setDialogMode(2,"Abrir arquivo...",3,openfileEx,'<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />'),QE("idx_dlgOkButton",!1)}function openfileEx(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}0!=t.length&&(cleanup(),recFile=t[0],recFilePtr=0,readNextBlock(processFirstBlock),readLastBlock(function(e,t,a){recFileEndTime=3==e?a:0}),Q("OpenFileButton").blur())}function openfileChanged(){var e=Q("p2fileinput").files;if(null!=e){var t=[];for(var a in e)null!=e[a].type&&null!=e[a].size&&0!=e[a].size&&e[a].name.endsWith(".mcrec")&&t.push(e[a])}QE("idx_dlgOkButton",1==t.length)}function togglePause(){return null!=recFile&&(1==playing?pause():recFilePtr!=recFile.size&&play()),!1}function play(){Q("PlayButton").blur(),1!=playing&&0!=recFileProtocol&&(playing=!0,QV("metadatadiv",!1),QE("PlayButton",!1),QE("PauseButton",!0),QE("RestartButton",!1),1==recFileProtocol&&null==agentTerminal&&(QV("DeskParent",!1),QV("TermParent",!0),agentTerminal=CreateAmtRemoteTerminal("Term",{}),agentTerminal.State=3),readNextBlock(processBlock))}function pause(){Q("PauseButton").blur(),0!=playing&&(playing=!1,QE("PlayButton",recFilePtr!=recFile.size),QE("PauseButton",!1),QE("RestartButton",0!=recFilePtr),null!=waitTimer&&(clearTimeout(waitTimer),waitTimer=null,processBlockEx(waitTimerArgs[0],waitTimerArgs[1],waitTimerArgs[2],waitTimerArgs[3]),waitTimerArgs=null))}function restart(){Q("RestartButton").blur(),1!=playing&&(currentDeltaTimeTotalSec=readState=recFilePtr=0,QV("metadatadiv",!0),QE("PlayButton",!0),QE("PauseButton",!1),QE("RestartButton",!1),QS("progressbar").width="0px",QH("timespan","00:00:00"),QV("DeskParent",!0),QV("TermParent",!1),agentDesktop?agentDesktop.Canvas.clearRect(0,0,agentDesktop.CanvasId.width,agentDesktop.CanvasId.height):amtDesktop?(amtDesktop.canvas.clearRect(0,0,amtDesktop.CanvasId.width,amtDesktop.CanvasId.height),(amtDesktop=CreateAmtRemoteDesktop("Desk")).onScreenSizeChange=deskAdjust,amtDesktop.State=3,amtDesktop.Start()):agentTerminal=agentTerminal&&null)}function clearConsoleMsg(){QH("p11DeskConsoleMsg","")}function toggleAspectRatio(e){1===e&&(deskAspectRatio=(deskAspectRatio+1)%3),deskAdjust()}function deskAdjust(){var e=Q("DeskParent").clientHeight,t=Q("DeskParent").clientWidth,a=Q("Desk").height,r=Q("Desk").width;if(2==deskAspectRatio)QS("Desk")["margin-top"]=null,QS("Desk").height="100%",QS("Desk").width="100%",QS("DeskParent").overflow="hidden";else if(1==deskAspectRatio)QS("Desk")["margin-top"]="0px",QS("Desk").height=a+"px",QS("Desk").width=r+"px",QS("DeskParent").overflow="scroll";else{if(a/r<e/t){var i=a*t/r+"px";QS("Desk").height=i,QS("Desk").width="100%"}else{var l=r*e/a+"px";QS("Desk").height="100%",QS("Desk").width=l}QS("Desk")["margin-top"]=null,QS("DeskParent").overflow="hidden"}}var xxcurrentView=-1;function setDialogMode(e,t,a,r,i,l){xxdialogMode=e,xxdialogFunc=r,xxdialogButtons=a,xxdialogTag=l,QE("idx_dlgOkButton",!0),QV("idx_dlgOkButton",1&a),QV("idx_dlgCancelButton",2&a),QV("id_dialogclose",2&a||8&a),QV("idx_dlgDeleteButton",4&a),QV("idx_dlgButtonBar",7&a),t&&QH("id_dialogtitle",t);for(var o=1;o<3;o++)QV("dialog"+o,o==e);QV("dialog",e),i&&(2==e?QH("id_dialogOptions",i):QH("id_dialogMessage",i))}function dialogclose(e){var t=xxdialogFunc,a=xxdialogButtons,r=xxdialogTag;setDialogMode(),(8&a||e)&&t&&t(e,r)}function messagebox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e,1)}function statusbox(e,t){setSessionActivity(),QH("id_dialogMessage",t),setDialogMode(1,e)}function haltEvent(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function pad2(e){var t="00"+e;return t.substr(t.length-2)}function format(e){var a=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return void 0!==a[t]?a[t]:e})}start()</script>
\ No newline at end of file
public/translations/player_cs.htm deleted
-537
@@ -1,537 +0,0 @@
1 -<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 - <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 - <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 - <meta name="apple-mobile-web-app-capable" content="yes">
6 - <meta name="format-detection" content="telephone=no">
7 - <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 - <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 - <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 - <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 - <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 - <script type="text/javascript" src="scripts/zlib.js"></script>
13 - <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 - <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 - <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 -</head>
17 -<body style="overflow:hidden;background-color:black">
18 - <div id="p11" class="noselect" style="overflow:hidden">
19 - <div id="deskarea0">
20 - <div id="deskarea1" class="areaHead">
21 - <div class="toright2">
22 - <div class="deskareaicon" title="Přepnout režim zobrazení" onclick="toggleAspectRatio(1)">⇲</div>
23 - </div>
24 - <div>
25 - <input id="OpenFileButton" type="button" value="Otevřít soubor..." onclick="openfile()">
26 - <span id="deskstatus"></span>
27 - </div>
28 - </div>
29 - <div id="deskarea2" style="">
30 - <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 - </div>
32 - <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 - <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 - <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 - <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 - <div id="DeskParent">
37 - <canvas id="Desk" width="640" height="480"></canvas>
38 - </div>
39 - <div id="TermParent" style="display:none">
40 - <pre id="Term"></pre>
41 - </div>
42 - <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 - </div>
44 - <div id="deskarea4" class="areaFoot">
45 - <div class="toright2">
46 - <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 - </div>
48 - <div>
49 - &nbsp;
50 - <input id="PlayButton" type="button" value="Spustit" disabled="disabled" onclick="play()">
51 - <input id="PauseButton" type="button" value="Pauza" disabled="disabled" onclick="pause()">
52 - <input id="RestartButton" type="button" value="Restart" disabled="disabled" onclick="restart()">
53 - <select id="PlaySpeed" onchange="this.blur();">
54 - <option value="4">1/4 rychlost</option>
55 - <option value="2">1/2 rychlost</option>
56 - <option value="1" selected="">Normalní rychlost</option>
57 - <option value="0.5">2x rychlost</option>
58 - <option value="0.25">4x rychlost</option>
59 - <option value="0.1">10x rychlost</option>
60 - </select>
61 - </div>
62 - </div>
63 - </div>
64 - <div id="dialog" class="noselect" style="display:none">
65 - <div id="dialogHeader">
66 - <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 - <div id="id_dialogtitle"></div>
68 - </div>
69 - <div id="dialogBody">
70 - <div id="dialog1">
71 - <div id="id_dialogMessage" style=""></div>
72 - </div>
73 - <div id="dialog2" style="">
74 - <div id="id_dialogOptions"></div>
75 - </div>
76 - </div>
77 - <div id="idx_dlgButtonBar">
78 - <input id="idx_dlgCancelButton" type="button" value="Zrušit" style="" onclick="dialogclose(0)">
79 - <input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)">
80 - <div><input id="idx_dlgDeleteButton" type="button" value="Smazat" style="display:none" onclick="dialogclose(2)"></div>
81 - </div>
82 - </div>
83 - </div>
84 - <script>
85 - var recFile = null;
86 - var recFilePtr = 0;
87 - var recFileStartTime = 0;
88 - var recFileLastTime = 0;
89 - var recFileEndTime = 0;
90 - var recFileMetadata = null;
91 - var recFileProtocol = 0;
92 - var agentDesktop = null;
93 - var amtDesktop = null;
94 - var playing = false;
95 - var readState = 0;
96 - var waitTimer = null;
97 - var waitTimerArgs = null;
98 - var deskAspectRatio = 0;
99 - var currentDeltaTimeTotalSec = 0;
100 -
101 - function start() {
102 - window.onresize = deskAdjust;
103 - document.ondrop = ondrop;
104 - document.ondragover = ondragover;
105 - document.ondragleave = ondragleave;
106 - document.onkeypress = onkeypress;
107 - Q('PlaySpeed').value = 1;
108 - cleanup();
109 - }
110 -
111 - function readNextBlock(func) {
112 - if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 - var fr = new FileReader();
114 - fr.onload = function () {
115 - var type = ReadShort(this.result, 0);
116 - var flags = ReadShort(this.result, 2);
117 - var size = ReadInt(this.result, 4);
118 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 - if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 - var fr2 = new FileReader();
121 - fr2.onload = function () {
122 - recFilePtr += (16 + size);
123 - if (recFileEndTime == 0) {
124 - // File pointer progress bar
125 - QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 - } else {
127 - // Time progress bar
128 - QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 - }
130 - func(type, flags, time, this.result);
131 - };
132 - fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 - }
134 - };
135 - fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 - }
137 - }
138 -
139 - function readLastBlock(func) {
140 - if (recFile.size < 32) { func(-1); } else {
141 - var fr = new FileReader();
142 - fr.onload = function () {
143 - var type = ReadShort(this.result, 0);
144 - var flags = ReadShort(this.result, 2);
145 - var size = ReadInt(this.result, 4);
146 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 - if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 - };
149 - fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 - }
151 - }
152 -
153 - function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 -
155 - function addInfoNoEsc(name, value) {
156 - if (value == null) return '';
157 - return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 - }
159 -
160 - function processFirstBlock(type, flags, time, data) {
161 - recFileProtocol = 0;
162 - if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 - try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 - if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 - var x = '';
166 - x += addInfo("Čas", recFileMetadata.time);
167 - if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Trvání", format("{0} sekund{1}", secs, (secs > 1) ? 's' : '')); }
168 - x += addInfo("Uživatel", recFileMetadata.username);
169 - x += addInfo("Uživatelské ID", recFileMetadata.userid);
170 - x += addInfo("SessionID", recFileMetadata.sessionid);
171 - if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Adresy", format("{0} na {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 - if (recFileMetadata.devicename) { x += addInfo("Název zařízení", recFileMetadata.devicename); }
173 - x += addInfo("NodeID", recFileMetadata.nodeid);
174 - if (recFileMetadata.protocol) {
175 - var p = recFileMetadata.protocol;
176 - if (p == 1) { p = "MeshCentral terminal"; }
177 - else if (p == 2) { p = "MeshCentral plocha"; }
178 - else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 - else if (p == 101) { p = "Intel&reg; AMT přesměrování"; }
180 - x += addInfoNoEsc("Protokol", p);
181 - }
182 - QV('DeskParent', true);
183 - QV('TermParent', false);
184 - if (recFileMetadata.protocol == 1) {
185 - // MeshCentral remote terminal
186 - recFileProtocol = 1;
187 - x += '<br /><br /><span style=color:gray>' + "Zmáčkni [mezerník] pro spuštění/pauzu." + '</span>';
188 - QE('PlayButton', true);
189 - QE('PauseButton', false);
190 - QE('RestartButton', false);
191 - recFileStartTime = recFileLastTime = time;
192 - }
193 - else if (recFileMetadata.protocol == 2) {
194 - // MeshCentral remote desktop
195 - recFileProtocol = 2;
196 - x += '<br /><br /><span style=color:gray>' + "Zmáčkni [mezerník] pro spuštění/pauzu." + '</span>';
197 - QE('PlayButton', true);
198 - QE('PauseButton', false);
199 - QE('RestartButton', false);
200 - recFileStartTime = recFileLastTime = time;
201 - agentDesktop = CreateAgentRemoteDesktop('Desk');
202 - agentDesktop.onScreenSizeChange = deskAdjust;
203 - agentDesktop.State = 3;
204 - deskAdjust();
205 - }
206 - else if (recFileMetadata.protocol == 101) {
207 - // Intel AMT Redirection
208 - recFileProtocol = 101;
209 - x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 - QE('PlayButton', true);
211 - QE('PauseButton', false);
212 - QE('RestartButton', false);
213 - recFileStartTime = recFileLastTime = time;
214 - amtDesktop = CreateAmtRemoteDesktop('Desk');
215 - amtDesktop.onScreenSizeChange = deskAdjust;
216 - amtDesktop.State = 3;
217 - amtDesktop.Start();
218 - deskAdjust();
219 - }
220 - QV('metadatadiv', true);
221 - QH('metadatadiv', x);
222 - QH('deskstatus', recFile.name);
223 - }
224 -
225 - function processBlock(type, flags, time, data) {
226 - if (type < 0) { pause(); return; }
227 - var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 - if (waitTime < 5) {
229 - processBlockEx(type, flags, time, data);
230 - } else {
231 - waitTimerArgs = [type, flags, time, data]
232 - waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 - }
234 - }
235 -
236 - function processBlockEx(type, flags, time, data) {
237 - if (playing == false) return;
238 - var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 -
240 - // Update the clock
241 - var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 - if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 - currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 - var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 - deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 - var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 - deltaTimeTotalSec -= (deltaTimeHours * 60)
248 - var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 - QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 - }
251 -
252 - if ((type == 2) && flagBinary && !flagUser) {
253 - // Device --> User data
254 - if (recFileProtocol == 1) {
255 - // MeshCentral Terminal
256 - agentTerminal.ProcessData(data);
257 - } else if (recFileProtocol == 2) {
258 - // MeshCentral Remote Desktop
259 - agentDesktop.ProcessData(data);
260 - } else if (recFileProtocol == 101) {
261 - // Intel AMT KVM
262 - if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 - // We are not authenticated, KVM data starts here.
264 - readState = 1;
265 - if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 - } else if (readState == 1) {
267 - amtDesktop.ProcessData(data);
268 - }
269 - }
270 - } else if ((type == 2) && flagBinary && flagUser) {
271 - // User --> Device data
272 - if (recFileProtocol == 101) {
273 - // Intel AMT KVM
274 - if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 - }
276 - }
277 -
278 - recFileLastTime = time;
279 - if (playing) { readNextBlock(processBlock); }
280 - }
281 -
282 - function cleanup() {
283 - recFile = null;
284 - recFilePtr = 0;
285 - recFileMetadata = null;
286 - playing = false;
287 - if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 - if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 - readState = 0;
290 - waitTimerArgs = null;
291 - currentDeltaTimeTotalSec = 0;
292 - recFileEndTime = 0;
293 - agentTerminal = null;
294 - if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 - QH('deskstatus', '');
296 - QE('PlayButton', false);
297 - QE('PauseButton', false);
298 - QE('RestartButton', false);
299 - QS('progressbar').width = '0px';
300 - QH('timespan', '00:00:00');
301 - QV('metadatadiv', true);
302 - QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Drag & drop soubor .mcrec nebo klikni na \"Otevřít soubor...\"" + '</span>');
303 - QV('DeskParent', true);
304 - QV('TermParent', false);
305 - }
306 -
307 - function ondrop(e) {
308 - haltEvent(e);
309 - QV('bigfail', false);
310 - QV('bigok', false);
311 -
312 - // Check if these are files we can upload, remove all folders.
313 - if (e.dataTransfer == null) return;
314 - var files = [];
315 - for (var i in e.dataTransfer.files) {
316 - if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 - files.push(e.dataTransfer.files[i]);
318 - }
319 - }
320 - if (files.length == 0) return;
321 - cleanup();
322 - recFile = files[0];
323 - recFilePtr = 0;
324 - readNextBlock(processFirstBlock);
325 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 - }
327 -
328 - var dragtimer = null;
329 - function ondragover(e) {
330 - haltEvent(e);
331 - if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 - var ac = true;
333 - QV('bigok', ac);
334 - QV('bigfail', !ac);
335 - }
336 -
337 - function ondragleave(e) {
338 - haltEvent(e);
339 - dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 - }
341 -
342 - function onkeypress(e) {
343 - if (xxdialogMode) return;
344 - if (e.key == ' ') { togglePause(); haltEvent(e); }
345 - if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 - if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 - if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 - if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 - if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 - if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 - if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 - }
353 -
354 - function openfile() {
355 - var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 - setDialogMode(2, "Otevřít soubor...", 3, openfileEx, x);
357 - QE('idx_dlgOkButton', false);
358 - }
359 -
360 - function openfileEx() {
361 - var xfiles = Q('p2fileinput').files;
362 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 - if (files.length == 0) return;
364 - cleanup();
365 - recFile = files[0];
366 - recFilePtr = 0;
367 - readNextBlock(processFirstBlock);
368 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 - Q('OpenFileButton').blur();
370 - }
371 -
372 - function openfileChanged() {
373 - var xfiles = Q('p2fileinput').files;
374 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 - QE('idx_dlgOkButton', files.length == 1);
376 - }
377 -
378 - function togglePause() {
379 - if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 - }
381 -
382 - function play() {
383 - Q('PlayButton').blur();
384 - if ((playing == true) || (recFileProtocol == 0)) return;
385 - playing = true;
386 - QV('metadatadiv', false);
387 - QE('PlayButton', false);
388 - QE('PauseButton', true);
389 - QE('RestartButton', false);
390 - if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 - QV('DeskParent', false);
392 - QV('TermParent', true);
393 - agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 - agentTerminal.State = 3;
395 - }
396 - readNextBlock(processBlock);
397 - }
398 -
399 - function pause() {
400 - Q('PauseButton').blur();
401 - if (playing == false) return;
402 - playing = false;
403 - QE('PlayButton', recFilePtr != recFile.size);
404 - QE('PauseButton', false);
405 - QE('RestartButton', recFilePtr != 0);
406 - if (waitTimer != null) {
407 - clearTimeout(waitTimer);
408 - waitTimer = null;
409 - processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 - waitTimerArgs = null;
411 - }
412 - }
413 -
414 - function restart() {
415 - Q('RestartButton').blur();
416 - if (playing == true) return;
417 - recFilePtr = 0;
418 - readState = 0;
419 - currentDeltaTimeTotalSec = 0;
420 - QV('metadatadiv', true);
421 - QE('PlayButton', true);
422 - QE('PauseButton', false);
423 - QE('RestartButton', false);
424 - QS('progressbar').width = '0px';
425 - QH('timespan', '00:00:00');
426 - QV('DeskParent', true);
427 - QV('TermParent', false);
428 - if (agentDesktop) {
429 - agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 - } else if (amtDesktop) {
431 - amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 - amtDesktop = CreateAmtRemoteDesktop('Desk');
433 - amtDesktop.onScreenSizeChange = deskAdjust;
434 - amtDesktop.State = 3;
435 - amtDesktop.Start();
436 - } else if (agentTerminal) {
437 - agentTerminal = null;
438 - }
439 - }
440 -
441 - function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 -
443 - // Toggle the web page to full screen
444 - function toggleAspectRatio(toggle) {
445 - if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 - deskAdjust();
447 - }
448 -
449 - function deskAdjust() {
450 - var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 - var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 -
453 - if (deskAspectRatio == 2) {
454 - // Scale mode
455 - QS('Desk')['margin-top'] = null;
456 - QS('Desk').height = '100%';
457 - QS('Desk').width = '100%';
458 - QS('DeskParent').overflow = 'hidden';
459 - } else if (deskAspectRatio == 1) {
460 - // Zoomed mode
461 - QS('Desk')['margin-top'] = '0px';
462 - //QS('Desk')['margin-left'] = '0px';
463 - QS('Desk').height = deskH + 'px';
464 - QS('Desk').width = deskW + 'px';
465 - QS('DeskParent').overflow = 'scroll';
466 - } else {
467 - // Fixed aspect ratio
468 - if ((parentH / parentW) > (deskH / deskW)) {
469 - var hNew = ((deskH * parentW) / deskW) + 'px';
470 - //if (webPageFullScreen || fullscreen) {
471 - //QS('deskarea3x').height = null;
472 - //} else {
473 - // QS('deskarea3x').height = hNew;
474 - //QS('deskarea3x').height = null;
475 - //}
476 - QS('Desk').height = hNew;
477 - QS('Desk').width = '100%';
478 - } else {
479 - var wNew = ((deskW * parentH) / deskH) + 'px';
480 - //if (webPageFullScreen || fullscreen) {
481 - //QS('Desk').height = null;
482 - //} else {
483 - QS('Desk').height = '100%';
484 - //}
485 - QS('Desk').width = wNew;
486 - }
487 - QS('Desk')['margin-top'] = null;
488 - QS('DeskParent').overflow = 'hidden';
489 - }
490 - }
491 -
492 - //
493 - // POPUP DIALOG
494 - //
495 -
496 - // null = Hidden, 1 = Generic Message
497 - var xxdialogMode;
498 - var xxdialogFunc;
499 - var xxdialogButtons;
500 - var xxdialogTag;
501 - var xxcurrentView = -1;
502 -
503 - // Display a dialog box
504 - // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 - function setDialogMode(x, y, b, f, c, tag) {
506 - xxdialogMode = x;
507 - xxdialogFunc = f;
508 - xxdialogButtons = b;
509 - xxdialogTag = tag;
510 - QE('idx_dlgOkButton', true);
511 - QV('idx_dlgOkButton', b & 1);
512 - QV('idx_dlgCancelButton', b & 2);
513 - QV('id_dialogclose', (b & 2) || (b & 8));
514 - QV('idx_dlgDeleteButton', b & 4);
515 - QV('idx_dlgButtonBar', b & 7);
516 - if (y) QH('id_dialogtitle', y);
517 - for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 - QV('dialog', x);
519 - if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 - }
521 -
522 - function dialogclose(x) {
523 - var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 - setDialogMode();
525 - if (((b & 8) || x) && f) f(x, t);
526 - }
527 -
528 - function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 - function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 - function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 - function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 - function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 -
534 - start();
535 - </script>
536 -
537 -</body></html>
\ No newline at end of file
public/translations/player_fr.htm deleted
-537
@@ -1,537 +0,0 @@
1 -<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 - <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 - <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 - <meta name="apple-mobile-web-app-capable" content="yes">
6 - <meta name="format-detection" content="telephone=no">
7 - <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 - <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 - <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 - <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 - <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 - <script type="text/javascript" src="scripts/zlib.js"></script>
13 - <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 - <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 - <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 -</head>
17 -<body style="overflow:hidden;background-color:black">
18 - <div id="p11" class="noselect" style="overflow:hidden">
19 - <div id="deskarea0">
20 - <div id="deskarea1" class="areaHead">
21 - <div class="toright2">
22 - <div class="deskareaicon" title="Toggle View Mode" onclick="toggleAspectRatio(1)">⇲</div>
23 - </div>
24 - <div>
25 - <input id="OpenFileButton" type="button" value="Open File..." onclick="openfile()">
26 - <span id="deskstatus"></span>
27 - </div>
28 - </div>
29 - <div id="deskarea2" style="">
30 - <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 - </div>
32 - <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 - <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 - <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 - <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 - <div id="DeskParent">
37 - <canvas id="Desk" width="640" height="480"></canvas>
38 - </div>
39 - <div id="TermParent" style="display:none">
40 - <pre id="Term"></pre>
41 - </div>
42 - <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 - </div>
44 - <div id="deskarea4" class="areaFoot">
45 - <div class="toright2">
46 - <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 - </div>
48 - <div>
49 - &nbsp;
50 - <input id="PlayButton" type="button" value="Jouer" disabled="disabled" onclick="play()">
51 - <input id="PauseButton" type="button" value="Pause" disabled="disabled" onclick="pause()">
52 - <input id="RestartButton" type="button" value="Redémarrer" disabled="disabled" onclick="restart()">
53 - <select id="PlaySpeed" onchange="this.blur();">
54 - <option value="4">1/4 vitesse</option>
55 - <option value="2">1/2 vitesse</option>
56 - <option value="1" selected="">Vitesse normale</option>
57 - <option value="0.5">2x vitesse</option>
58 - <option value="0.25">4x vitesse</option>
59 - <option value="0.1">10x vitesse</option>
60 - </select>
61 - </div>
62 - </div>
63 - </div>
64 - <div id="dialog" class="noselect" style="display:none">
65 - <div id="dialogHeader">
66 - <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 - <div id="id_dialogtitle"></div>
68 - </div>
69 - <div id="dialogBody">
70 - <div id="dialog1">
71 - <div id="id_dialogMessage" style=""></div>
72 - </div>
73 - <div id="dialog2" style="">
74 - <div id="id_dialogOptions"></div>
75 - </div>
76 - </div>
77 - <div id="idx_dlgButtonBar">
78 - <input id="idx_dlgCancelButton" type="button" value="Annuler" style="" onclick="dialogclose(0)">
79 - <input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)">
80 - <div><input id="idx_dlgDeleteButton" type="button" value="Delete" style="display:none" onclick="dialogclose(2)"></div>
81 - </div>
82 - </div>
83 - </div>
84 - <script>
85 - var recFile = null;
86 - var recFilePtr = 0;
87 - var recFileStartTime = 0;
88 - var recFileLastTime = 0;
89 - var recFileEndTime = 0;
90 - var recFileMetadata = null;
91 - var recFileProtocol = 0;
92 - var agentDesktop = null;
93 - var amtDesktop = null;
94 - var playing = false;
95 - var readState = 0;
96 - var waitTimer = null;
97 - var waitTimerArgs = null;
98 - var deskAspectRatio = 0;
99 - var currentDeltaTimeTotalSec = 0;
100 -
101 - function start() {
102 - window.onresize = deskAdjust;
103 - document.ondrop = ondrop;
104 - document.ondragover = ondragover;
105 - document.ondragleave = ondragleave;
106 - document.onkeypress = onkeypress;
107 - Q('PlaySpeed').value = 1;
108 - cleanup();
109 - }
110 -
111 - function readNextBlock(func) {
112 - if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 - var fr = new FileReader();
114 - fr.onload = function () {
115 - var type = ReadShort(this.result, 0);
116 - var flags = ReadShort(this.result, 2);
117 - var size = ReadInt(this.result, 4);
118 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 - if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 - var fr2 = new FileReader();
121 - fr2.onload = function () {
122 - recFilePtr += (16 + size);
123 - if (recFileEndTime == 0) {
124 - // File pointer progress bar
125 - QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 - } else {
127 - // Time progress bar
128 - QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 - }
130 - func(type, flags, time, this.result);
131 - };
132 - fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 - }
134 - };
135 - fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 - }
137 - }
138 -
139 - function readLastBlock(func) {
140 - if (recFile.size < 32) { func(-1); } else {
141 - var fr = new FileReader();
142 - fr.onload = function () {
143 - var type = ReadShort(this.result, 0);
144 - var flags = ReadShort(this.result, 2);
145 - var size = ReadInt(this.result, 4);
146 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 - if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 - };
149 - fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 - }
151 - }
152 -
153 - function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 -
155 - function addInfoNoEsc(name, value) {
156 - if (value == null) return '';
157 - return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 - }
159 -
160 - function processFirstBlock(type, flags, time, data) {
161 - recFileProtocol = 0;
162 - if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 - try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 - if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 - var x = '';
166 - x += addInfo("Temps", recFileMetadata.time);
167 - if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Duration", format("{0} second{1}", secs, (secs > 1) ? 's' : '')); }
168 - x += addInfo("Nom d'utilisateur", recFileMetadata.username);
169 - x += addInfo("Identifiant d'utilisateur", recFileMetadata.userid);
170 - x += addInfo("ID de session", recFileMetadata.sessionid);
171 - if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Addresses", format("{0} to {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 - if (recFileMetadata.devicename) { x += addInfo("Device Name", recFileMetadata.devicename); }
173 - x += addInfo("NodeID", recFileMetadata.nodeid);
174 - if (recFileMetadata.protocol) {
175 - var p = recFileMetadata.protocol;
176 - if (p == 1) { p = "MeshCentral Terminal"; }
177 - else if (p == 2) { p = "MeshCentral Desktop"; }
178 - else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 - else if (p == 101) { p = "Intel&reg; AMT Redirection"; }
180 - x += addInfoNoEsc("Protocole", p);
181 - }
182 - QV('DeskParent', true);
183 - QV('TermParent', false);
184 - if (recFileMetadata.protocol == 1) {
185 - // MeshCentral remote terminal
186 - recFileProtocol = 1;
187 - x += '<br /><br /><span style=color:gray>' + "Appuyez sur [espace] pour jouer/mettre en pause." + '</span>';
188 - QE('PlayButton', true);
189 - QE('PauseButton', false);
190 - QE('RestartButton', false);
191 - recFileStartTime = recFileLastTime = time;
192 - }
193 - else if (recFileMetadata.protocol == 2) {
194 - // MeshCentral remote desktop
195 - recFileProtocol = 2;
196 - x += '<br /><br /><span style=color:gray>' + "Appuyez sur [espace] pour jouer/mettre en pause." + '</span>';
197 - QE('PlayButton', true);
198 - QE('PauseButton', false);
199 - QE('RestartButton', false);
200 - recFileStartTime = recFileLastTime = time;
201 - agentDesktop = CreateAgentRemoteDesktop('Desk');
202 - agentDesktop.onScreenSizeChange = deskAdjust;
203 - agentDesktop.State = 3;
204 - deskAdjust();
205 - }
206 - else if (recFileMetadata.protocol == 101) {
207 - // Intel AMT Redirection
208 - recFileProtocol = 101;
209 - x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 - QE('PlayButton', true);
211 - QE('PauseButton', false);
212 - QE('RestartButton', false);
213 - recFileStartTime = recFileLastTime = time;
214 - amtDesktop = CreateAmtRemoteDesktop('Desk');
215 - amtDesktop.onScreenSizeChange = deskAdjust;
216 - amtDesktop.State = 3;
217 - amtDesktop.Start();
218 - deskAdjust();
219 - }
220 - QV('metadatadiv', true);
221 - QH('metadatadiv', x);
222 - QH('deskstatus', recFile.name);
223 - }
224 -
225 - function processBlock(type, flags, time, data) {
226 - if (type < 0) { pause(); return; }
227 - var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 - if (waitTime < 5) {
229 - processBlockEx(type, flags, time, data);
230 - } else {
231 - waitTimerArgs = [type, flags, time, data]
232 - waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 - }
234 - }
235 -
236 - function processBlockEx(type, flags, time, data) {
237 - if (playing == false) return;
238 - var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 -
240 - // Update the clock
241 - var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 - if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 - currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 - var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 - deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 - var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 - deltaTimeTotalSec -= (deltaTimeHours * 60)
248 - var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 - QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 - }
251 -
252 - if ((type == 2) && flagBinary && !flagUser) {
253 - // Device --> User data
254 - if (recFileProtocol == 1) {
255 - // MeshCentral Terminal
256 - agentTerminal.ProcessData(data);
257 - } else if (recFileProtocol == 2) {
258 - // MeshCentral Remote Desktop
259 - agentDesktop.ProcessData(data);
260 - } else if (recFileProtocol == 101) {
261 - // Intel AMT KVM
262 - if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 - // We are not authenticated, KVM data starts here.
264 - readState = 1;
265 - if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 - } else if (readState == 1) {
267 - amtDesktop.ProcessData(data);
268 - }
269 - }
270 - } else if ((type == 2) && flagBinary && flagUser) {
271 - // User --> Device data
272 - if (recFileProtocol == 101) {
273 - // Intel AMT KVM
274 - if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 - }
276 - }
277 -
278 - recFileLastTime = time;
279 - if (playing) { readNextBlock(processBlock); }
280 - }
281 -
282 - function cleanup() {
283 - recFile = null;
284 - recFilePtr = 0;
285 - recFileMetadata = null;
286 - playing = false;
287 - if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 - if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 - readState = 0;
290 - waitTimerArgs = null;
291 - currentDeltaTimeTotalSec = 0;
292 - recFileEndTime = 0;
293 - agentTerminal = null;
294 - if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 - QH('deskstatus', '');
296 - QE('PlayButton', false);
297 - QE('PauseButton', false);
298 - QE('RestartButton', false);
299 - QS('progressbar').width = '0px';
300 - QH('timespan', '00:00:00');
301 - QV('metadatadiv', true);
302 - QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Drag & drop a .mcrec file or click \"Open File...\"" + '</span>');
303 - QV('DeskParent', true);
304 - QV('TermParent', false);
305 - }
306 -
307 - function ondrop(e) {
308 - haltEvent(e);
309 - QV('bigfail', false);
310 - QV('bigok', false);
311 -
312 - // Check if these are files we can upload, remove all folders.
313 - if (e.dataTransfer == null) return;
314 - var files = [];
315 - for (var i in e.dataTransfer.files) {
316 - if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 - files.push(e.dataTransfer.files[i]);
318 - }
319 - }
320 - if (files.length == 0) return;
321 - cleanup();
322 - recFile = files[0];
323 - recFilePtr = 0;
324 - readNextBlock(processFirstBlock);
325 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 - }
327 -
328 - var dragtimer = null;
329 - function ondragover(e) {
330 - haltEvent(e);
331 - if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 - var ac = true;
333 - QV('bigok', ac);
334 - QV('bigfail', !ac);
335 - }
336 -
337 - function ondragleave(e) {
338 - haltEvent(e);
339 - dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 - }
341 -
342 - function onkeypress(e) {
343 - if (xxdialogMode) return;
344 - if (e.key == ' ') { togglePause(); haltEvent(e); }
345 - if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 - if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 - if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 - if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 - if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 - if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 - if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 - }
353 -
354 - function openfile() {
355 - var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 - setDialogMode(2, "Open File...", 3, openfileEx, x);
357 - QE('idx_dlgOkButton', false);
358 - }
359 -
360 - function openfileEx() {
361 - var xfiles = Q('p2fileinput').files;
362 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 - if (files.length == 0) return;
364 - cleanup();
365 - recFile = files[0];
366 - recFilePtr = 0;
367 - readNextBlock(processFirstBlock);
368 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 - Q('OpenFileButton').blur();
370 - }
371 -
372 - function openfileChanged() {
373 - var xfiles = Q('p2fileinput').files;
374 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 - QE('idx_dlgOkButton', files.length == 1);
376 - }
377 -
378 - function togglePause() {
379 - if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 - }
381 -
382 - function play() {
383 - Q('PlayButton').blur();
384 - if ((playing == true) || (recFileProtocol == 0)) return;
385 - playing = true;
386 - QV('metadatadiv', false);
387 - QE('PlayButton', false);
388 - QE('PauseButton', true);
389 - QE('RestartButton', false);
390 - if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 - QV('DeskParent', false);
392 - QV('TermParent', true);
393 - agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 - agentTerminal.State = 3;
395 - }
396 - readNextBlock(processBlock);
397 - }
398 -
399 - function pause() {
400 - Q('PauseButton').blur();
401 - if (playing == false) return;
402 - playing = false;
403 - QE('PlayButton', recFilePtr != recFile.size);
404 - QE('PauseButton', false);
405 - QE('RestartButton', recFilePtr != 0);
406 - if (waitTimer != null) {
407 - clearTimeout(waitTimer);
408 - waitTimer = null;
409 - processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 - waitTimerArgs = null;
411 - }
412 - }
413 -
414 - function restart() {
415 - Q('RestartButton').blur();
416 - if (playing == true) return;
417 - recFilePtr = 0;
418 - readState = 0;
419 - currentDeltaTimeTotalSec = 0;
420 - QV('metadatadiv', true);
421 - QE('PlayButton', true);
422 - QE('PauseButton', false);
423 - QE('RestartButton', false);
424 - QS('progressbar').width = '0px';
425 - QH('timespan', '00:00:00');
426 - QV('DeskParent', true);
427 - QV('TermParent', false);
428 - if (agentDesktop) {
429 - agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 - } else if (amtDesktop) {
431 - amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 - amtDesktop = CreateAmtRemoteDesktop('Desk');
433 - amtDesktop.onScreenSizeChange = deskAdjust;
434 - amtDesktop.State = 3;
435 - amtDesktop.Start();
436 - } else if (agentTerminal) {
437 - agentTerminal = null;
438 - }
439 - }
440 -
441 - function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 -
443 - // Toggle the web page to full screen
444 - function toggleAspectRatio(toggle) {
445 - if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 - deskAdjust();
447 - }
448 -
449 - function deskAdjust() {
450 - var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 - var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 -
453 - if (deskAspectRatio == 2) {
454 - // Scale mode
455 - QS('Desk')['margin-top'] = null;
456 - QS('Desk').height = '100%';
457 - QS('Desk').width = '100%';
458 - QS('DeskParent').overflow = 'hidden';
459 - } else if (deskAspectRatio == 1) {
460 - // Zoomed mode
461 - QS('Desk')['margin-top'] = '0px';
462 - //QS('Desk')['margin-left'] = '0px';
463 - QS('Desk').height = deskH + 'px';
464 - QS('Desk').width = deskW + 'px';
465 - QS('DeskParent').overflow = 'scroll';
466 - } else {
467 - // Fixed aspect ratio
468 - if ((parentH / parentW) > (deskH / deskW)) {
469 - var hNew = ((deskH * parentW) / deskW) + 'px';
470 - //if (webPageFullScreen || fullscreen) {
471 - //QS('deskarea3x').height = null;
472 - //} else {
473 - // QS('deskarea3x').height = hNew;
474 - //QS('deskarea3x').height = null;
475 - //}
476 - QS('Desk').height = hNew;
477 - QS('Desk').width = '100%';
478 - } else {
479 - var wNew = ((deskW * parentH) / deskH) + 'px';
480 - //if (webPageFullScreen || fullscreen) {
481 - //QS('Desk').height = null;
482 - //} else {
483 - QS('Desk').height = '100%';
484 - //}
485 - QS('Desk').width = wNew;
486 - }
487 - QS('Desk')['margin-top'] = null;
488 - QS('DeskParent').overflow = 'hidden';
489 - }
490 - }
491 -
492 - //
493 - // POPUP DIALOG
494 - //
495 -
496 - // null = Hidden, 1 = Generic Message
497 - var xxdialogMode;
498 - var xxdialogFunc;
499 - var xxdialogButtons;
500 - var xxdialogTag;
501 - var xxcurrentView = -1;
502 -
503 - // Display a dialog box
504 - // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 - function setDialogMode(x, y, b, f, c, tag) {
506 - xxdialogMode = x;
507 - xxdialogFunc = f;
508 - xxdialogButtons = b;
509 - xxdialogTag = tag;
510 - QE('idx_dlgOkButton', true);
511 - QV('idx_dlgOkButton', b & 1);
512 - QV('idx_dlgCancelButton', b & 2);
513 - QV('id_dialogclose', (b & 2) || (b & 8));
514 - QV('idx_dlgDeleteButton', b & 4);
515 - QV('idx_dlgButtonBar', b & 7);
516 - if (y) QH('id_dialogtitle', y);
517 - for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 - QV('dialog', x);
519 - if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 - }
521 -
522 - function dialogclose(x) {
523 - var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 - setDialogMode();
525 - if (((b & 8) || x) && f) f(x, t);
526 - }
527 -
528 - function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 - function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 - function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 - function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 - function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 -
534 - start();
535 - </script>
536 -
537 -</body></html>
\ No newline at end of file
public/translations/player_ja.htm deleted
-537
@@ -1,537 +0,0 @@
1 -<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 - <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 - <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 - <meta name="apple-mobile-web-app-capable" content="yes">
6 - <meta name="format-detection" content="telephone=no">
7 - <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 - <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 - <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 - <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 - <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 - <script type="text/javascript" src="scripts/zlib.js"></script>
13 - <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 - <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 - <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 -</head>
17 -<body style="overflow:hidden;background-color:black">
18 - <div id="p11" class="noselect" style="overflow:hidden">
19 - <div id="deskarea0">
20 - <div id="deskarea1" class="areaHead">
21 - <div class="toright2">
22 - <div class="deskareaicon" title="表示モードの切り替え" onclick="toggleAspectRatio(1)">⇲</div>
23 - </div>
24 - <div>
25 - <input id="OpenFileButton" type="button" value="ファイルを開く..." onclick="openfile()">
26 - <span id="deskstatus"></span>
27 - </div>
28 - </div>
29 - <div id="deskarea2" style="">
30 - <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 - </div>
32 - <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 - <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 - <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 - <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 - <div id="DeskParent">
37 - <canvas id="Desk" width="640" height="480"></canvas>
38 - </div>
39 - <div id="TermParent" style="display:none">
40 - <pre id="Term"></pre>
41 - </div>
42 - <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 - </div>
44 - <div id="deskarea4" class="areaFoot">
45 - <div class="toright2">
46 - <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 - </div>
48 - <div>
49 - &nbsp;
50 - <input id="PlayButton" type="button" value="遊びます" disabled="disabled" onclick="play()">
51 - <input id="PauseButton" type="button" value="一時停止" disabled="disabled" onclick="pause()">
52 - <input id="RestartButton" type="button" value="再起動" disabled="disabled" onclick="restart()">
53 - <select id="PlaySpeed" onchange="this.blur();">
54 - <option value="4">1/4スピード</option>
55 - <option value="2">1/2速度</option>
56 - <option value="1" selected="">通常速度</option>
57 - <option value="0.5">2倍速</option>
58 - <option value="0.25">4倍速</option>
59 - <option value="0.1">10倍速</option>
60 - </select>
61 - </div>
62 - </div>
63 - </div>
64 - <div id="dialog" class="noselect" style="display:none">
65 - <div id="dialogHeader">
66 - <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 - <div id="id_dialogtitle"></div>
68 - </div>
69 - <div id="dialogBody">
70 - <div id="dialog1">
71 - <div id="id_dialogMessage" style=""></div>
72 - </div>
73 - <div id="dialog2" style="">
74 - <div id="id_dialogOptions"></div>
75 - </div>
76 - </div>
77 - <div id="idx_dlgButtonBar">
78 - <input id="idx_dlgCancelButton" type="button" value="キャンセル" style="" onclick="dialogclose(0)">
79 - <input id="idx_dlgOkButton" type="button" value="OK" style="" onclick="dialogclose(1)">
80 - <div><input id="idx_dlgDeleteButton" type="button" value="削除する" style="display:none" onclick="dialogclose(2)"></div>
81 - </div>
82 - </div>
83 - </div>
84 - <script>
85 - var recFile = null;
86 - var recFilePtr = 0;
87 - var recFileStartTime = 0;
88 - var recFileLastTime = 0;
89 - var recFileEndTime = 0;
90 - var recFileMetadata = null;
91 - var recFileProtocol = 0;
92 - var agentDesktop = null;
93 - var amtDesktop = null;
94 - var playing = false;
95 - var readState = 0;
96 - var waitTimer = null;
97 - var waitTimerArgs = null;
98 - var deskAspectRatio = 0;
99 - var currentDeltaTimeTotalSec = 0;
100 -
101 - function start() {
102 - window.onresize = deskAdjust;
103 - document.ondrop = ondrop;
104 - document.ondragover = ondragover;
105 - document.ondragleave = ondragleave;
106 - document.onkeypress = onkeypress;
107 - Q('PlaySpeed').value = 1;
108 - cleanup();
109 - }
110 -
111 - function readNextBlock(func) {
112 - if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 - var fr = new FileReader();
114 - fr.onload = function () {
115 - var type = ReadShort(this.result, 0);
116 - var flags = ReadShort(this.result, 2);
117 - var size = ReadInt(this.result, 4);
118 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 - if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 - var fr2 = new FileReader();
121 - fr2.onload = function () {
122 - recFilePtr += (16 + size);
123 - if (recFileEndTime == 0) {
124 - // File pointer progress bar
125 - QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 - } else {
127 - // Time progress bar
128 - QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 - }
130 - func(type, flags, time, this.result);
131 - };
132 - fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 - }
134 - };
135 - fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 - }
137 - }
138 -
139 - function readLastBlock(func) {
140 - if (recFile.size < 32) { func(-1); } else {
141 - var fr = new FileReader();
142 - fr.onload = function () {
143 - var type = ReadShort(this.result, 0);
144 - var flags = ReadShort(this.result, 2);
145 - var size = ReadInt(this.result, 4);
146 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 - if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 - };
149 - fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 - }
151 - }
152 -
153 - function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 -
155 - function addInfoNoEsc(name, value) {
156 - if (value == null) return '';
157 - return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 - }
159 -
160 - function processFirstBlock(type, flags, time, data) {
161 - recFileProtocol = 0;
162 - if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 - try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 - if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 - var x = '';
166 - x += addInfo("時間", recFileMetadata.time);
167 - if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("期間", format("{0}秒{1}", secs, (secs > 1) ? 's' : '')); }
168 - x += addInfo("ユーザー名", recFileMetadata.username);
169 - x += addInfo("ユーザーID", recFileMetadata.userid);
170 - x += addInfo("セッションID", recFileMetadata.sessionid);
171 - if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("住所", format("{0}から{1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 - if (recFileMetadata.devicename) { x += addInfo("装置名", recFileMetadata.devicename); }
173 - x += addInfo("NodeID", recFileMetadata.nodeid);
174 - if (recFileMetadata.protocol) {
175 - var p = recFileMetadata.protocol;
176 - if (p == 1) { p = "MeshCentralターミナル"; }
177 - else if (p == 2) { p = "MeshCentralデスクトップ"; }
178 - else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 - else if (p == 101) { p = "Intel&reg; AMTリダイレクト"; }
180 - x += addInfoNoEsc("プロトコル", p);
181 - }
182 - QV('DeskParent', true);
183 - QV('TermParent', false);
184 - if (recFileMetadata.protocol == 1) {
185 - // MeshCentral remote terminal
186 - recFileProtocol = 1;
187 - x += '<br /><br /><span style=color:gray>' + "[スペース]を押して再生/一時停止します。" + '</span>';
188 - QE('PlayButton', true);
189 - QE('PauseButton', false);
190 - QE('RestartButton', false);
191 - recFileStartTime = recFileLastTime = time;
192 - }
193 - else if (recFileMetadata.protocol == 2) {
194 - // MeshCentral remote desktop
195 - recFileProtocol = 2;
196 - x += '<br /><br /><span style=color:gray>' + "[スペース]を押して再生/一時停止します。" + '</span>';
197 - QE('PlayButton', true);
198 - QE('PauseButton', false);
199 - QE('RestartButton', false);
200 - recFileStartTime = recFileLastTime = time;
201 - agentDesktop = CreateAgentRemoteDesktop('Desk');
202 - agentDesktop.onScreenSizeChange = deskAdjust;
203 - agentDesktop.State = 3;
204 - deskAdjust();
205 - }
206 - else if (recFileMetadata.protocol == 101) {
207 - // Intel AMT Redirection
208 - recFileProtocol = 101;
209 - x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 - QE('PlayButton', true);
211 - QE('PauseButton', false);
212 - QE('RestartButton', false);
213 - recFileStartTime = recFileLastTime = time;
214 - amtDesktop = CreateAmtRemoteDesktop('Desk');
215 - amtDesktop.onScreenSizeChange = deskAdjust;
216 - amtDesktop.State = 3;
217 - amtDesktop.Start();
218 - deskAdjust();
219 - }
220 - QV('metadatadiv', true);
221 - QH('metadatadiv', x);
222 - QH('deskstatus', recFile.name);
223 - }
224 -
225 - function processBlock(type, flags, time, data) {
226 - if (type < 0) { pause(); return; }
227 - var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 - if (waitTime < 5) {
229 - processBlockEx(type, flags, time, data);
230 - } else {
231 - waitTimerArgs = [type, flags, time, data]
232 - waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 - }
234 - }
235 -
236 - function processBlockEx(type, flags, time, data) {
237 - if (playing == false) return;
238 - var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 -
240 - // Update the clock
241 - var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 - if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 - currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 - var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 - deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 - var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 - deltaTimeTotalSec -= (deltaTimeHours * 60)
248 - var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 - QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 - }
251 -
252 - if ((type == 2) && flagBinary && !flagUser) {
253 - // Device --> User data
254 - if (recFileProtocol == 1) {
255 - // MeshCentral Terminal
256 - agentTerminal.ProcessData(data);
257 - } else if (recFileProtocol == 2) {
258 - // MeshCentral Remote Desktop
259 - agentDesktop.ProcessData(data);
260 - } else if (recFileProtocol == 101) {
261 - // Intel AMT KVM
262 - if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 - // We are not authenticated, KVM data starts here.
264 - readState = 1;
265 - if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 - } else if (readState == 1) {
267 - amtDesktop.ProcessData(data);
268 - }
269 - }
270 - } else if ((type == 2) && flagBinary && flagUser) {
271 - // User --> Device data
272 - if (recFileProtocol == 101) {
273 - // Intel AMT KVM
274 - if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 - }
276 - }
277 -
278 - recFileLastTime = time;
279 - if (playing) { readNextBlock(processBlock); }
280 - }
281 -
282 - function cleanup() {
283 - recFile = null;
284 - recFilePtr = 0;
285 - recFileMetadata = null;
286 - playing = false;
287 - if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 - if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 - readState = 0;
290 - waitTimerArgs = null;
291 - currentDeltaTimeTotalSec = 0;
292 - recFileEndTime = 0;
293 - agentTerminal = null;
294 - if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 - QH('deskstatus', '');
296 - QE('PlayButton', false);
297 - QE('PauseButton', false);
298 - QE('RestartButton', false);
299 - QS('progressbar').width = '0px';
300 - QH('timespan', '00:00:00');
301 - QV('metadatadiv', true);
302 - QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + ".mcrecファイルをドラッグアンドドロップするか、[ファイルを開く...]をクリックします" + '</span>');
303 - QV('DeskParent', true);
304 - QV('TermParent', false);
305 - }
306 -
307 - function ondrop(e) {
308 - haltEvent(e);
309 - QV('bigfail', false);
310 - QV('bigok', false);
311 -
312 - // Check if these are files we can upload, remove all folders.
313 - if (e.dataTransfer == null) return;
314 - var files = [];
315 - for (var i in e.dataTransfer.files) {
316 - if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 - files.push(e.dataTransfer.files[i]);
318 - }
319 - }
320 - if (files.length == 0) return;
321 - cleanup();
322 - recFile = files[0];
323 - recFilePtr = 0;
324 - readNextBlock(processFirstBlock);
325 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 - }
327 -
328 - var dragtimer = null;
329 - function ondragover(e) {
330 - haltEvent(e);
331 - if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 - var ac = true;
333 - QV('bigok', ac);
334 - QV('bigfail', !ac);
335 - }
336 -
337 - function ondragleave(e) {
338 - haltEvent(e);
339 - dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 - }
341 -
342 - function onkeypress(e) {
343 - if (xxdialogMode) return;
344 - if (e.key == ' ') { togglePause(); haltEvent(e); }
345 - if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 - if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 - if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 - if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 - if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 - if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 - if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 - }
353 -
354 - function openfile() {
355 - var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 - setDialogMode(2, "ファイルを開く...", 3, openfileEx, x);
357 - QE('idx_dlgOkButton', false);
358 - }
359 -
360 - function openfileEx() {
361 - var xfiles = Q('p2fileinput').files;
362 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 - if (files.length == 0) return;
364 - cleanup();
365 - recFile = files[0];
366 - recFilePtr = 0;
367 - readNextBlock(processFirstBlock);
368 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 - Q('OpenFileButton').blur();
370 - }
371 -
372 - function openfileChanged() {
373 - var xfiles = Q('p2fileinput').files;
374 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 - QE('idx_dlgOkButton', files.length == 1);
376 - }
377 -
378 - function togglePause() {
379 - if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 - }
381 -
382 - function play() {
383 - Q('PlayButton').blur();
384 - if ((playing == true) || (recFileProtocol == 0)) return;
385 - playing = true;
386 - QV('metadatadiv', false);
387 - QE('PlayButton', false);
388 - QE('PauseButton', true);
389 - QE('RestartButton', false);
390 - if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 - QV('DeskParent', false);
392 - QV('TermParent', true);
393 - agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 - agentTerminal.State = 3;
395 - }
396 - readNextBlock(processBlock);
397 - }
398 -
399 - function pause() {
400 - Q('PauseButton').blur();
401 - if (playing == false) return;
402 - playing = false;
403 - QE('PlayButton', recFilePtr != recFile.size);
404 - QE('PauseButton', false);
405 - QE('RestartButton', recFilePtr != 0);
406 - if (waitTimer != null) {
407 - clearTimeout(waitTimer);
408 - waitTimer = null;
409 - processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 - waitTimerArgs = null;
411 - }
412 - }
413 -
414 - function restart() {
415 - Q('RestartButton').blur();
416 - if (playing == true) return;
417 - recFilePtr = 0;
418 - readState = 0;
419 - currentDeltaTimeTotalSec = 0;
420 - QV('metadatadiv', true);
421 - QE('PlayButton', true);
422 - QE('PauseButton', false);
423 - QE('RestartButton', false);
424 - QS('progressbar').width = '0px';
425 - QH('timespan', '00:00:00');
426 - QV('DeskParent', true);
427 - QV('TermParent', false);
428 - if (agentDesktop) {
429 - agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 - } else if (amtDesktop) {
431 - amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 - amtDesktop = CreateAmtRemoteDesktop('Desk');
433 - amtDesktop.onScreenSizeChange = deskAdjust;
434 - amtDesktop.State = 3;
435 - amtDesktop.Start();
436 - } else if (agentTerminal) {
437 - agentTerminal = null;
438 - }
439 - }
440 -
441 - function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 -
443 - // Toggle the web page to full screen
444 - function toggleAspectRatio(toggle) {
445 - if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 - deskAdjust();
447 - }
448 -
449 - function deskAdjust() {
450 - var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 - var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 -
453 - if (deskAspectRatio == 2) {
454 - // Scale mode
455 - QS('Desk')['margin-top'] = null;
456 - QS('Desk').height = '100%';
457 - QS('Desk').width = '100%';
458 - QS('DeskParent').overflow = 'hidden';
459 - } else if (deskAspectRatio == 1) {
460 - // Zoomed mode
461 - QS('Desk')['margin-top'] = '0px';
462 - //QS('Desk')['margin-left'] = '0px';
463 - QS('Desk').height = deskH + 'px';
464 - QS('Desk').width = deskW + 'px';
465 - QS('DeskParent').overflow = 'scroll';
466 - } else {
467 - // Fixed aspect ratio
468 - if ((parentH / parentW) > (deskH / deskW)) {
469 - var hNew = ((deskH * parentW) / deskW) + 'px';
470 - //if (webPageFullScreen || fullscreen) {
471 - //QS('deskarea3x').height = null;
472 - //} else {
473 - // QS('deskarea3x').height = hNew;
474 - //QS('deskarea3x').height = null;
475 - //}
476 - QS('Desk').height = hNew;
477 - QS('Desk').width = '100%';
478 - } else {
479 - var wNew = ((deskW * parentH) / deskH) + 'px';
480 - //if (webPageFullScreen || fullscreen) {
481 - //QS('Desk').height = null;
482 - //} else {
483 - QS('Desk').height = '100%';
484 - //}
485 - QS('Desk').width = wNew;
486 - }
487 - QS('Desk')['margin-top'] = null;
488 - QS('DeskParent').overflow = 'hidden';
489 - }
490 - }
491 -
492 - //
493 - // POPUP DIALOG
494 - //
495 -
496 - // null = Hidden, 1 = Generic Message
497 - var xxdialogMode;
498 - var xxdialogFunc;
499 - var xxdialogButtons;
500 - var xxdialogTag;
501 - var xxcurrentView = -1;
502 -
503 - // Display a dialog box
504 - // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 - function setDialogMode(x, y, b, f, c, tag) {
506 - xxdialogMode = x;
507 - xxdialogFunc = f;
508 - xxdialogButtons = b;
509 - xxdialogTag = tag;
510 - QE('idx_dlgOkButton', true);
511 - QV('idx_dlgOkButton', b & 1);
512 - QV('idx_dlgCancelButton', b & 2);
513 - QV('id_dialogclose', (b & 2) || (b & 8));
514 - QV('idx_dlgDeleteButton', b & 4);
515 - QV('idx_dlgButtonBar', b & 7);
516 - if (y) QH('id_dialogtitle', y);
517 - for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 - QV('dialog', x);
519 - if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 - }
521 -
522 - function dialogclose(x) {
523 - var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 - setDialogMode();
525 - if (((b & 8) || x) && f) f(x, t);
526 - }
527 -
528 - function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 - function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 - function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 - function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 - function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 -
534 - start();
535 - </script>
536 -
537 -</body></html>
\ No newline at end of file
public/translations/player_nl.htm deleted
-537
@@ -1,537 +0,0 @@
1 -<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 - <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 - <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 - <meta name="apple-mobile-web-app-capable" content="yes">
6 - <meta name="format-detection" content="telephone=no">
7 - <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 - <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 - <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 - <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 - <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 - <script type="text/javascript" src="scripts/zlib.js"></script>
13 - <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 - <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 - <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 -</head>
17 -<body style="overflow:hidden;background-color:black">
18 - <div id="p11" class="noselect" style="overflow:hidden">
19 - <div id="deskarea0">
20 - <div id="deskarea1" class="areaHead">
21 - <div class="toright2">
22 - <div class="deskareaicon" title="Schakel weergavemodus" onclick="toggleAspectRatio(1)">⇲</div>
23 - </div>
24 - <div>
25 - <input id="OpenFileButton" type="button" value="Open bestand..." onclick="openfile()">
26 - <span id="deskstatus"></span>
27 - </div>
28 - </div>
29 - <div id="deskarea2" style="">
30 - <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 - </div>
32 - <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 - <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 - <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 - <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 - <div id="DeskParent">
37 - <canvas id="Desk" width="640" height="480"></canvas>
38 - </div>
39 - <div id="TermParent" style="display:none">
40 - <pre id="Term"></pre>
41 - </div>
42 - <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 - </div>
44 - <div id="deskarea4" class="areaFoot">
45 - <div class="toright2">
46 - <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 - </div>
48 - <div>
49 - &nbsp;
50 - <input id="PlayButton" type="button" value="Afspelen" disabled="disabled" onclick="play()">
51 - <input id="PauseButton" type="button" value="Pause" disabled="disabled" onclick="pause()">
52 - <input id="RestartButton" type="button" value="Herstarten" disabled="disabled" onclick="restart()">
53 - <select id="PlaySpeed" onchange="this.blur();">
54 - <option value="4">1/4 snelheid</option>
55 - <option value="2">1/2 snelheid</option>
56 - <option value="1" selected="">Normale snelheid</option>
57 - <option value="0.5">2x Snelheid</option>
58 - <option value="0.25">4x snelheid</option>
59 - <option value="0.1">10x Snelheid</option>
60 - </select>
61 - </div>
62 - </div>
63 - </div>
64 - <div id="dialog" class="noselect" style="display:none">
65 - <div id="dialogHeader">
66 - <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 - <div id="id_dialogtitle"></div>
68 - </div>
69 - <div id="dialogBody">
70 - <div id="dialog1">
71 - <div id="id_dialogMessage" style=""></div>
72 - </div>
73 - <div id="dialog2" style="">
74 - <div id="id_dialogOptions"></div>
75 - </div>
76 - </div>
77 - <div id="idx_dlgButtonBar">
78 - <input id="idx_dlgCancelButton" type="button" value="Afbreken" style="" onclick="dialogclose(0)">
79 - <input id="idx_dlgOkButton" type="button" value="Oke" style="" onclick="dialogclose(1)">
80 - <div><input id="idx_dlgDeleteButton" type="button" value="Verwijderen" style="display:none" onclick="dialogclose(2)"></div>
81 - </div>
82 - </div>
83 - </div>
84 - <script>
85 - var recFile = null;
86 - var recFilePtr = 0;
87 - var recFileStartTime = 0;
88 - var recFileLastTime = 0;
89 - var recFileEndTime = 0;
90 - var recFileMetadata = null;
91 - var recFileProtocol = 0;
92 - var agentDesktop = null;
93 - var amtDesktop = null;
94 - var playing = false;
95 - var readState = 0;
96 - var waitTimer = null;
97 - var waitTimerArgs = null;
98 - var deskAspectRatio = 0;
99 - var currentDeltaTimeTotalSec = 0;
100 -
101 - function start() {
102 - window.onresize = deskAdjust;
103 - document.ondrop = ondrop;
104 - document.ondragover = ondragover;
105 - document.ondragleave = ondragleave;
106 - document.onkeypress = onkeypress;
107 - Q('PlaySpeed').value = 1;
108 - cleanup();
109 - }
110 -
111 - function readNextBlock(func) {
112 - if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 - var fr = new FileReader();
114 - fr.onload = function () {
115 - var type = ReadShort(this.result, 0);
116 - var flags = ReadShort(this.result, 2);
117 - var size = ReadInt(this.result, 4);
118 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 - if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 - var fr2 = new FileReader();
121 - fr2.onload = function () {
122 - recFilePtr += (16 + size);
123 - if (recFileEndTime == 0) {
124 - // File pointer progress bar
125 - QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 - } else {
127 - // Time progress bar
128 - QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 - }
130 - func(type, flags, time, this.result);
131 - };
132 - fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 - }
134 - };
135 - fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 - }
137 - }
138 -
139 - function readLastBlock(func) {
140 - if (recFile.size < 32) { func(-1); } else {
141 - var fr = new FileReader();
142 - fr.onload = function () {
143 - var type = ReadShort(this.result, 0);
144 - var flags = ReadShort(this.result, 2);
145 - var size = ReadInt(this.result, 4);
146 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 - if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 - };
149 - fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 - }
151 - }
152 -
153 - function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 -
155 - function addInfoNoEsc(name, value) {
156 - if (value == null) return '';
157 - return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 - }
159 -
160 - function processFirstBlock(type, flags, time, data) {
161 - recFileProtocol = 0;
162 - if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 - try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 - if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 - var x = '';
166 - x += addInfo("Tijd", recFileMetadata.time);
167 - if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Looptijd", format("{0} seconde {1}", secs, (secs > 1) ? 's' : '')); }
168 - x += addInfo("Gebruikersnaam", recFileMetadata.username);
169 - x += addInfo("GebruikersID", recFileMetadata.userid);
170 - x += addInfo("SessieID", recFileMetadata.sessionid);
171 - if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Adressen", format("{0} tot {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 - if (recFileMetadata.devicename) { x += addInfo("Apparaat naam", recFileMetadata.devicename); }
173 - x += addInfo("NodeID", recFileMetadata.nodeid);
174 - if (recFileMetadata.protocol) {
175 - var p = recFileMetadata.protocol;
176 - if (p == 1) { p = "MeshCentral Terminal"; }
177 - else if (p == 2) { p = "MeshCentral Desktop"; }
178 - else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 - else if (p == 101) { p = "Intel&reg; AMT omleiding"; }
180 - x += addInfoNoEsc("Protocol", p);
181 - }
182 - QV('DeskParent', true);
183 - QV('TermParent', false);
184 - if (recFileMetadata.protocol == 1) {
185 - // MeshCentral remote terminal
186 - recFileProtocol = 1;
187 - x += '<br /><br /><span style=color:gray>' + "Druk op [spatie] om te spelen / pauzeren." + '</span>';
188 - QE('PlayButton', true);
189 - QE('PauseButton', false);
190 - QE('RestartButton', false);
191 - recFileStartTime = recFileLastTime = time;
192 - }
193 - else if (recFileMetadata.protocol == 2) {
194 - // MeshCentral remote desktop
195 - recFileProtocol = 2;
196 - x += '<br /><br /><span style=color:gray>' + "Druk op [spatie] om te spelen / pauzeren." + '</span>';
197 - QE('PlayButton', true);
198 - QE('PauseButton', false);
199 - QE('RestartButton', false);
200 - recFileStartTime = recFileLastTime = time;
201 - agentDesktop = CreateAgentRemoteDesktop('Desk');
202 - agentDesktop.onScreenSizeChange = deskAdjust;
203 - agentDesktop.State = 3;
204 - deskAdjust();
205 - }
206 - else if (recFileMetadata.protocol == 101) {
207 - // Intel AMT Redirection
208 - recFileProtocol = 101;
209 - x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 - QE('PlayButton', true);
211 - QE('PauseButton', false);
212 - QE('RestartButton', false);
213 - recFileStartTime = recFileLastTime = time;
214 - amtDesktop = CreateAmtRemoteDesktop('Desk');
215 - amtDesktop.onScreenSizeChange = deskAdjust;
216 - amtDesktop.State = 3;
217 - amtDesktop.Start();
218 - deskAdjust();
219 - }
220 - QV('metadatadiv', true);
221 - QH('metadatadiv', x);
222 - QH('deskstatus', recFile.name);
223 - }
224 -
225 - function processBlock(type, flags, time, data) {
226 - if (type < 0) { pause(); return; }
227 - var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 - if (waitTime < 5) {
229 - processBlockEx(type, flags, time, data);
230 - } else {
231 - waitTimerArgs = [type, flags, time, data]
232 - waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 - }
234 - }
235 -
236 - function processBlockEx(type, flags, time, data) {
237 - if (playing == false) return;
238 - var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 -
240 - // Update the clock
241 - var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 - if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 - currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 - var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 - deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 - var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 - deltaTimeTotalSec -= (deltaTimeHours * 60)
248 - var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 - QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 - }
251 -
252 - if ((type == 2) && flagBinary && !flagUser) {
253 - // Device --> User data
254 - if (recFileProtocol == 1) {
255 - // MeshCentral Terminal
256 - agentTerminal.ProcessData(data);
257 - } else if (recFileProtocol == 2) {
258 - // MeshCentral Remote Desktop
259 - agentDesktop.ProcessData(data);
260 - } else if (recFileProtocol == 101) {
261 - // Intel AMT KVM
262 - if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 - // We are not authenticated, KVM data starts here.
264 - readState = 1;
265 - if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 - } else if (readState == 1) {
267 - amtDesktop.ProcessData(data);
268 - }
269 - }
270 - } else if ((type == 2) && flagBinary && flagUser) {
271 - // User --> Device data
272 - if (recFileProtocol == 101) {
273 - // Intel AMT KVM
274 - if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 - }
276 - }
277 -
278 - recFileLastTime = time;
279 - if (playing) { readNextBlock(processBlock); }
280 - }
281 -
282 - function cleanup() {
283 - recFile = null;
284 - recFilePtr = 0;
285 - recFileMetadata = null;
286 - playing = false;
287 - if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 - if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 - readState = 0;
290 - waitTimerArgs = null;
291 - currentDeltaTimeTotalSec = 0;
292 - recFileEndTime = 0;
293 - agentTerminal = null;
294 - if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 - QH('deskstatus', '');
296 - QE('PlayButton', false);
297 - QE('PauseButton', false);
298 - QE('RestartButton', false);
299 - QS('progressbar').width = '0px';
300 - QH('timespan', '00:00:00');
301 - QV('metadatadiv', true);
302 - QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Sleep een .mcrec-bestand of klik op \"Bestand openen ...\"" + '</span>');
303 - QV('DeskParent', true);
304 - QV('TermParent', false);
305 - }
306 -
307 - function ondrop(e) {
308 - haltEvent(e);
309 - QV('bigfail', false);
310 - QV('bigok', false);
311 -
312 - // Check if these are files we can upload, remove all folders.
313 - if (e.dataTransfer == null) return;
314 - var files = [];
315 - for (var i in e.dataTransfer.files) {
316 - if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 - files.push(e.dataTransfer.files[i]);
318 - }
319 - }
320 - if (files.length == 0) return;
321 - cleanup();
322 - recFile = files[0];
323 - recFilePtr = 0;
324 - readNextBlock(processFirstBlock);
325 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 - }
327 -
328 - var dragtimer = null;
329 - function ondragover(e) {
330 - haltEvent(e);
331 - if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 - var ac = true;
333 - QV('bigok', ac);
334 - QV('bigfail', !ac);
335 - }
336 -
337 - function ondragleave(e) {
338 - haltEvent(e);
339 - dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 - }
341 -
342 - function onkeypress(e) {
343 - if (xxdialogMode) return;
344 - if (e.key == ' ') { togglePause(); haltEvent(e); }
345 - if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 - if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 - if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 - if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 - if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 - if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 - if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 - }
353 -
354 - function openfile() {
355 - var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 - setDialogMode(2, "Open bestand...", 3, openfileEx, x);
357 - QE('idx_dlgOkButton', false);
358 - }
359 -
360 - function openfileEx() {
361 - var xfiles = Q('p2fileinput').files;
362 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 - if (files.length == 0) return;
364 - cleanup();
365 - recFile = files[0];
366 - recFilePtr = 0;
367 - readNextBlock(processFirstBlock);
368 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 - Q('OpenFileButton').blur();
370 - }
371 -
372 - function openfileChanged() {
373 - var xfiles = Q('p2fileinput').files;
374 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 - QE('idx_dlgOkButton', files.length == 1);
376 - }
377 -
378 - function togglePause() {
379 - if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 - }
381 -
382 - function play() {
383 - Q('PlayButton').blur();
384 - if ((playing == true) || (recFileProtocol == 0)) return;
385 - playing = true;
386 - QV('metadatadiv', false);
387 - QE('PlayButton', false);
388 - QE('PauseButton', true);
389 - QE('RestartButton', false);
390 - if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 - QV('DeskParent', false);
392 - QV('TermParent', true);
393 - agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 - agentTerminal.State = 3;
395 - }
396 - readNextBlock(processBlock);
397 - }
398 -
399 - function pause() {
400 - Q('PauseButton').blur();
401 - if (playing == false) return;
402 - playing = false;
403 - QE('PlayButton', recFilePtr != recFile.size);
404 - QE('PauseButton', false);
405 - QE('RestartButton', recFilePtr != 0);
406 - if (waitTimer != null) {
407 - clearTimeout(waitTimer);
408 - waitTimer = null;
409 - processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 - waitTimerArgs = null;
411 - }
412 - }
413 -
414 - function restart() {
415 - Q('RestartButton').blur();
416 - if (playing == true) return;
417 - recFilePtr = 0;
418 - readState = 0;
419 - currentDeltaTimeTotalSec = 0;
420 - QV('metadatadiv', true);
421 - QE('PlayButton', true);
422 - QE('PauseButton', false);
423 - QE('RestartButton', false);
424 - QS('progressbar').width = '0px';
425 - QH('timespan', '00:00:00');
426 - QV('DeskParent', true);
427 - QV('TermParent', false);
428 - if (agentDesktop) {
429 - agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 - } else if (amtDesktop) {
431 - amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 - amtDesktop = CreateAmtRemoteDesktop('Desk');
433 - amtDesktop.onScreenSizeChange = deskAdjust;
434 - amtDesktop.State = 3;
435 - amtDesktop.Start();
436 - } else if (agentTerminal) {
437 - agentTerminal = null;
438 - }
439 - }
440 -
441 - function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 -
443 - // Toggle the web page to full screen
444 - function toggleAspectRatio(toggle) {
445 - if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 - deskAdjust();
447 - }
448 -
449 - function deskAdjust() {
450 - var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 - var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 -
453 - if (deskAspectRatio == 2) {
454 - // Scale mode
455 - QS('Desk')['margin-top'] = null;
456 - QS('Desk').height = '100%';
457 - QS('Desk').width = '100%';
458 - QS('DeskParent').overflow = 'hidden';
459 - } else if (deskAspectRatio == 1) {
460 - // Zoomed mode
461 - QS('Desk')['margin-top'] = '0px';
462 - //QS('Desk')['margin-left'] = '0px';
463 - QS('Desk').height = deskH + 'px';
464 - QS('Desk').width = deskW + 'px';
465 - QS('DeskParent').overflow = 'scroll';
466 - } else {
467 - // Fixed aspect ratio
468 - if ((parentH / parentW) > (deskH / deskW)) {
469 - var hNew = ((deskH * parentW) / deskW) + 'px';
470 - //if (webPageFullScreen || fullscreen) {
471 - //QS('deskarea3x').height = null;
472 - //} else {
473 - // QS('deskarea3x').height = hNew;
474 - //QS('deskarea3x').height = null;
475 - //}
476 - QS('Desk').height = hNew;
477 - QS('Desk').width = '100%';
478 - } else {
479 - var wNew = ((deskW * parentH) / deskH) + 'px';
480 - //if (webPageFullScreen || fullscreen) {
481 - //QS('Desk').height = null;
482 - //} else {
483 - QS('Desk').height = '100%';
484 - //}
485 - QS('Desk').width = wNew;
486 - }
487 - QS('Desk')['margin-top'] = null;
488 - QS('DeskParent').overflow = 'hidden';
489 - }
490 - }
491 -
492 - //
493 - // POPUP DIALOG
494 - //
495 -
496 - // null = Hidden, 1 = Generic Message
497 - var xxdialogMode;
498 - var xxdialogFunc;
499 - var xxdialogButtons;
500 - var xxdialogTag;
501 - var xxcurrentView = -1;
502 -
503 - // Display a dialog box
504 - // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 - function setDialogMode(x, y, b, f, c, tag) {
506 - xxdialogMode = x;
507 - xxdialogFunc = f;
508 - xxdialogButtons = b;
509 - xxdialogTag = tag;
510 - QE('idx_dlgOkButton', true);
511 - QV('idx_dlgOkButton', b & 1);
512 - QV('idx_dlgCancelButton', b & 2);
513 - QV('id_dialogclose', (b & 2) || (b & 8));
514 - QV('idx_dlgDeleteButton', b & 4);
515 - QV('idx_dlgButtonBar', b & 7);
516 - if (y) QH('id_dialogtitle', y);
517 - for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 - QV('dialog', x);
519 - if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 - }
521 -
522 - function dialogclose(x) {
523 - var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 - setDialogMode();
525 - if (((b & 8) || x) && f) f(x, t);
526 - }
527 -
528 - function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 - function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 - function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 - function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 - function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 -
534 - start();
535 - </script>
536 -
537 -</body></html>
\ No newline at end of file
public/translations/player_pt.htm deleted
-537
@@ -1,537 +0,0 @@
1 -<!DOCTYPE html><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head>
2 - <meta http-equiv="X-UA-Compatible" content="IE=edge">
3 - <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
4 - <meta name="viewport" content="user-scalable=1.0,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
5 - <meta name="apple-mobile-web-app-capable" content="yes">
6 - <meta name="format-detection" content="telephone=no">
7 - <link type="text/css" href="styles/style.css" media="screen" rel="stylesheet" title="CSS">
8 - <script type="text/javascript" src="scripts/common-0.0.1.js"></script>
9 - <script type="text/javascript" src="scripts/agent-desktop-0.0.2.js"></script>
10 - <script type="text/javascript" src="scripts/amt-desktop-0.0.2.js"></script>
11 - <script type="text/javascript" src="scripts/amt-terminal-0.0.2.js"></script>
12 - <script type="text/javascript" src="scripts/zlib.js"></script>
13 - <script type="text/javascript" src="scripts/zlib-inflate.js"></script>
14 - <script type="text/javascript" src="scripts/zlib-adler32.js"></script>
15 - <script type="text/javascript" src="scripts/zlib-crc32.js"></script>
16 -</head>
17 -<body style="overflow:hidden;background-color:black">
18 - <div id="p11" class="noselect" style="overflow:hidden">
19 - <div id="deskarea0">
20 - <div id="deskarea1" class="areaHead">
21 - <div class="toright2">
22 - <div class="deskareaicon" title="Alternar modo de exibição" onclick="toggleAspectRatio(1)">⇲</div>
23 - </div>
24 - <div>
25 - <input id="OpenFileButton" type="button" value="Abrir arquivo..." onclick="openfile()">
26 - <span id="deskstatus"></span>
27 - </div>
28 - </div>
29 - <div id="deskarea2" style="">
30 - <div class="areaProgress"><div id="progressbar" style=""></div></div>
31 - </div>
32 - <div id="deskarea3x" style="max-height:calc(100vh - 54px);height:calc(100vh - 54px);" onclick="togglePause()">
33 - <div id="bigok" style="display:none;left:calc((100vh / 2))"><b>✓</b></div>
34 - <div id="bigfail" style="display:none;left:calc((100vh / 2))"><b>✗</b></div>
35 - <div id="metadatadiv" style="padding:20px;color:lightgrey;text-align:left;display:none"></div>
36 - <div id="DeskParent">
37 - <canvas id="Desk" width="640" height="480"></canvas>
38 - </div>
39 - <div id="TermParent" style="display:none">
40 - <pre id="Term"></pre>
41 - </div>
42 - <div id="p11DeskConsoleMsg" style="display:none;cursor:pointer;position:absolute;left:30px;top:17px;color:yellow;background-color:rgba(0,0,0,0.6);padding:10px;border-radius:5px" onclick="clearConsoleMsg()"></div>
43 - </div>
44 - <div id="deskarea4" class="areaFoot">
45 - <div class="toright2">
46 - <div id="timespan" style="padding-top:4px;padding-right:4px">00:00:00</div>
47 - </div>
48 - <div>
49 - &nbsp;
50 - <input id="PlayButton" type="button" value="Play" disabled="disabled" onclick="play()">
51 - <input id="PauseButton" type="button" value="Pausa" disabled="disabled" onclick="pause()">
52 - <input id="RestartButton" type="button" value="Reiniciar" disabled="disabled" onclick="restart()">
53 - <select id="PlaySpeed" onchange="this.blur();">
54 - <option value="4">1/4 de velocidade</option>
55 - <option value="2">1/2 velocidade</option>
56 - <option value="1" selected="">Velocidade normal</option>
57 - <option value="0.5">2x velocidade</option>
58 - <option value="0.25">4x velocidade</option>
59 - <option value="0.1">10x Velocidade</option>
60 - </select>
61 - </div>
62 - </div>
63 - </div>
64 - <div id="dialog" class="noselect" style="display:none">
65 - <div id="dialogHeader">
66 - <div tabindex="0" id="id_dialogclose" onclick="setDialogMode()" onkeypress="if (event.key == 'Enter') setDialogMode()">✖</div>
67 - <div id="id_dialogtitle"></div>
68 - </div>
69 - <div id="dialogBody">
70 - <div id="dialog1">
71 - <div id="id_dialogMessage" style=""></div>
72 - </div>
73 - <div id="dialog2" style="">
74 - <div id="id_dialogOptions"></div>
75 - </div>
76 - </div>
77 - <div id="idx_dlgButtonBar">
78 - <input id="idx_dlgCancelButton" type="button" value="Cancelar" style="" onclick="dialogclose(0)">
79 - <input id="idx_dlgOkButton" type="button" value="Ok" style="" onclick="dialogclose(1)">
80 - <div><input id="idx_dlgDeleteButton" type="button" value="Deletar" style="display:none" onclick="dialogclose(2)"></div>
81 - </div>
82 - </div>
83 - </div>
84 - <script>
85 - var recFile = null;
86 - var recFilePtr = 0;
87 - var recFileStartTime = 0;
88 - var recFileLastTime = 0;
89 - var recFileEndTime = 0;
90 - var recFileMetadata = null;
91 - var recFileProtocol = 0;
92 - var agentDesktop = null;
93 - var amtDesktop = null;
94 - var playing = false;
95 - var readState = 0;
96 - var waitTimer = null;
97 - var waitTimerArgs = null;
98 - var deskAspectRatio = 0;
99 - var currentDeltaTimeTotalSec = 0;
100 -
101 - function start() {
102 - window.onresize = deskAdjust;
103 - document.ondrop = ondrop;
104 - document.ondragover = ondragover;
105 - document.ondragleave = ondragleave;
106 - document.onkeypress = onkeypress;
107 - Q('PlaySpeed').value = 1;
108 - cleanup();
109 - }
110 -
111 - function readNextBlock(func) {
112 - if ((recFilePtr + 16) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
113 - var fr = new FileReader();
114 - fr.onload = function () {
115 - var type = ReadShort(this.result, 0);
116 - var flags = ReadShort(this.result, 2);
117 - var size = ReadInt(this.result, 4);
118 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
119 - if ((recFilePtr + 16 + size) > recFile.size) { QS('progressbar').width = '100%'; func(-1); } else {
120 - var fr2 = new FileReader();
121 - fr2.onload = function () {
122 - recFilePtr += (16 + size);
123 - if (recFileEndTime == 0) {
124 - // File pointer progress bar
125 - QS('progressbar').width = Math.floor(100 * (recFilePtr / recFile.size)) + '%';
126 - } else {
127 - // Time progress bar
128 - QS('progressbar').width = Math.floor(((recFileLastTime - recFileStartTime) / (recFileEndTime - recFileStartTime)) * 100) + '%';
129 - }
130 - func(type, flags, time, this.result);
131 - };
132 - fr2.readAsBinaryString(recFile.slice(recFilePtr + 16, recFilePtr + 16 + size));
133 - }
134 - };
135 - fr.readAsBinaryString(recFile.slice(recFilePtr, recFilePtr + 16));
136 - }
137 - }
138 -
139 - function readLastBlock(func) {
140 - if (recFile.size < 32) { func(-1); } else {
141 - var fr = new FileReader();
142 - fr.onload = function () {
143 - var type = ReadShort(this.result, 0);
144 - var flags = ReadShort(this.result, 2);
145 - var size = ReadInt(this.result, 4);
146 - var time = (ReadInt(this.result, 8) << 32) + ReadInt(this.result, 12);
147 - if ((type == 3) && (size == 16) && (this.result.substring(16, 32) == 'MeshCentralMCREC')) { func(type, flags, time); } else { func(-1); }
148 - };
149 - fr.readAsBinaryString(recFile.slice(recFile.size - 32, recFile.size));
150 - }
151 - }
152 -
153 - function addInfo(name, value) { if (value == null) return ''; return addInfoNoEsc(name, EscapeHtml(value)); }
154 -
155 - function addInfoNoEsc(name, value) {
156 - if (value == null) return '';
157 - return '<span style=color:gray>' + EscapeHtml(name) + '</span>:&nbsp;<span style=font-size:20px>' + value + '</span><br/>';
158 - }
159 -
160 - function processFirstBlock(type, flags, time, data) {
161 - recFileProtocol = 0;
162 - if ((type != 1) || (flags != 0)) { cleanup(); return; }
163 - try { recFileMetadata = JSON.parse(data) } catch (ex) { cleanup(); return; }
164 - if ((recFileMetadata == null) || (recFileMetadata.magic != 'MeshCentralRelaySession') || (recFileMetadata.ver != 1)) { cleanup(); return; }
165 - var x = '';
166 - x += addInfo("Tempo", recFileMetadata.time);
167 - if (recFileEndTime != 0) { var secs = Math.floor((recFileEndTime - time) / 1000); x += addInfo("Duração", format("{0} segundo{1}", secs, (secs > 1) ? 's' : '')); }
168 - x += addInfo("Nome de usuário", recFileMetadata.username);
169 - x += addInfo("ID do usuário", recFileMetadata.userid);
170 - x += addInfo("ID da sessão", recFileMetadata.sessionid);
171 - if (recFileMetadata.ipaddr1 && recFileMetadata.ipaddr2) { x += addInfo("Endereços", format("{0} para {1}", recFileMetadata.ipaddr1, recFileMetadata.ipaddr2)); }
172 - if (recFileMetadata.devicename) { x += addInfo("Nome do Dispositivo", recFileMetadata.devicename); }
173 - x += addInfo("NodeID", recFileMetadata.nodeid);
174 - if (recFileMetadata.protocol) {
175 - var p = recFileMetadata.protocol;
176 - if (p == 1) { p = "MeshCentral Terminal"; }
177 - else if (p == 2) { p = "MeshCentral Desktop"; }
178 - else if (p == 100) { p = "Intel&reg; AMT WSMAN"; }
179 - else if (p == 101) { p = "Intel&reg; Redirecionamento AMT"; }
180 - x += addInfoNoEsc("Protocolo", p);
181 - }
182 - QV('DeskParent', true);
183 - QV('TermParent', false);
184 - if (recFileMetadata.protocol == 1) {
185 - // MeshCentral remote terminal
186 - recFileProtocol = 1;
187 - x += '<br /><br /><span style=color:gray>' + "Pressione [espaço] para reproduzir / pausar." + '</span>';
188 - QE('PlayButton', true);
189 - QE('PauseButton', false);
190 - QE('RestartButton', false);
191 - recFileStartTime = recFileLastTime = time;
192 - }
193 - else if (recFileMetadata.protocol == 2) {
194 - // MeshCentral remote desktop
195 - recFileProtocol = 2;
196 - x += '<br /><br /><span style=color:gray>' + "Pressione [espaço] para reproduzir / pausar." + '</span>';
197 - QE('PlayButton', true);
198 - QE('PauseButton', false);
199 - QE('RestartButton', false);
200 - recFileStartTime = recFileLastTime = time;
201 - agentDesktop = CreateAgentRemoteDesktop('Desk');
202 - agentDesktop.onScreenSizeChange = deskAdjust;
203 - agentDesktop.State = 3;
204 - deskAdjust();
205 - }
206 - else if (recFileMetadata.protocol == 101) {
207 - // Intel AMT Redirection
208 - recFileProtocol = 101;
209 - x += '<br /><br /><span style=color:gray>Press [space] to play/pause.</span>';
210 - QE('PlayButton', true);
211 - QE('PauseButton', false);
212 - QE('RestartButton', false);
213 - recFileStartTime = recFileLastTime = time;
214 - amtDesktop = CreateAmtRemoteDesktop('Desk');
215 - amtDesktop.onScreenSizeChange = deskAdjust;
216 - amtDesktop.State = 3;
217 - amtDesktop.Start();
218 - deskAdjust();
219 - }
220 - QV('metadatadiv', true);
221 - QH('metadatadiv', x);
222 - QH('deskstatus', recFile.name);
223 - }
224 -
225 - function processBlock(type, flags, time, data) {
226 - if (type < 0) { pause(); return; }
227 - var waitTime = Math.round((time - recFileLastTime) * parseFloat(Q('PlaySpeed').value));
228 - if (waitTime < 5) {
229 - processBlockEx(type, flags, time, data);
230 - } else {
231 - waitTimerArgs = [type, flags, time, data]
232 - waitTimer = setTimeout(function () { waitTimer = null; processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]); }, waitTime);
233 - }
234 - }
235 -
236 - function processBlockEx(type, flags, time, data) {
237 - if (playing == false) return;
238 - var flagBinary = (flags & 1) != 0, flagUser = (flags & 2) != 0;
239 -
240 - // Update the clock
241 - var deltaTimeTotalSec = Math.floor((time - recFileStartTime) / 1000);
242 - if (currentDeltaTimeTotalSec != deltaTimeTotalSec) {
243 - currentDeltaTimeTotalSec = deltaTimeTotalSec;
244 - var deltaTimeHours = Math.floor(deltaTimeTotalSec / 3600);
245 - deltaTimeTotalSec -= (deltaTimeHours * 3600)
246 - var deltaTimeMinutes = Math.floor(deltaTimeTotalSec / 60);
247 - deltaTimeTotalSec -= (deltaTimeHours * 60)
248 - var deltaTimeSeconds = Math.floor(deltaTimeTotalSec);
249 - QH('timespan', pad2(deltaTimeHours) + ':' + pad2(deltaTimeMinutes) + ':' + pad2(deltaTimeSeconds))
250 - }
251 -
252 - if ((type == 2) && flagBinary && !flagUser) {
253 - // Device --> User data
254 - if (recFileProtocol == 1) {
255 - // MeshCentral Terminal
256 - agentTerminal.ProcessData(data);
257 - } else if (recFileProtocol == 2) {
258 - // MeshCentral Remote Desktop
259 - agentDesktop.ProcessData(data);
260 - } else if (recFileProtocol == 101) {
261 - // Intel AMT KVM
262 - if ((readState == 0) && (rstr2hex(data) == '4100000000000000')) {
263 - // We are not authenticated, KVM data starts here.
264 - readState = 1;
265 - if (data.length > 8) { amtDesktop.ProcessData(data.substring(8)); }
266 - } else if (readState == 1) {
267 - amtDesktop.ProcessData(data);
268 - }
269 - }
270 - } else if ((type == 2) && flagBinary && flagUser) {
271 - // User --> Device data
272 - if (recFileProtocol == 101) {
273 - // Intel AMT KVM
274 - if (rstr2hex(data) == '0000000008080001000700070003050200000000') { amtDesktop.bpp = 1; } // Switch to 1 byte per pixel.
275 - }
276 - }
277 -
278 - recFileLastTime = time;
279 - if (playing) { readNextBlock(processBlock); }
280 - }
281 -
282 - function cleanup() {
283 - recFile = null;
284 - recFilePtr = 0;
285 - recFileMetadata = null;
286 - playing = false;
287 - if (agentDesktop != null) { agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height); agentDesktop = null; }
288 - if (amtDesktop != null) { amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height); amtDesktop = null; }
289 - readState = 0;
290 - waitTimerArgs = null;
291 - currentDeltaTimeTotalSec = 0;
292 - recFileEndTime = 0;
293 - agentTerminal = null;
294 - if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; }
295 - QH('deskstatus', '');
296 - QE('PlayButton', false);
297 - QE('PauseButton', false);
298 - QE('RestartButton', false);
299 - QS('progressbar').width = '0px';
300 - QH('timespan', '00:00:00');
301 - QV('metadatadiv', true);
302 - QH('metadatadiv', '<span style=\"font-family:Arial,Helvetica Neue,Helvetica,sans-serif;font-size:28px\">MeshCentral Session Player</span><br /><br /><span style=color:gray>' + "Arraste e solte um arquivo .mcrec ou clique em \"Abrir arquivo...\"" + '</span>');
303 - QV('DeskParent', true);
304 - QV('TermParent', false);
305 - }
306 -
307 - function ondrop(e) {
308 - haltEvent(e);
309 - QV('bigfail', false);
310 - QV('bigok', false);
311 -
312 - // Check if these are files we can upload, remove all folders.
313 - if (e.dataTransfer == null) return;
314 - var files = [];
315 - for (var i in e.dataTransfer.files) {
316 - if ((e.dataTransfer.files[i].type != null) && (e.dataTransfer.files[i].size != null) && (e.dataTransfer.files[i].size != 0) && (e.dataTransfer.files[i].name.endsWith('.mcrec'))) {
317 - files.push(e.dataTransfer.files[i]);
318 - }
319 - }
320 - if (files.length == 0) return;
321 - cleanup();
322 - recFile = files[0];
323 - recFilePtr = 0;
324 - readNextBlock(processFirstBlock);
325 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
326 - }
327 -
328 - var dragtimer = null;
329 - function ondragover(e) {
330 - haltEvent(e);
331 - if (dragtimer != null) { clearTimeout(dragtimer); dragtimer = null; }
332 - var ac = true;
333 - QV('bigok', ac);
334 - QV('bigfail', !ac);
335 - }
336 -
337 - function ondragleave(e) {
338 - haltEvent(e);
339 - dragtimer = setTimeout(function () { QV('bigfail', false); QV('bigok', false); dragtimer = null; }, 10);
340 - }
341 -
342 - function onkeypress(e) {
343 - if (xxdialogMode) return;
344 - if (e.key == ' ') { togglePause(); haltEvent(e); }
345 - if (e.key == '1') { Q('PlaySpeed').value = 4; haltEvent(e); }
346 - if (e.key == '2') { Q('PlaySpeed').value = 2; haltEvent(e); }
347 - if (e.key == '3') { Q('PlaySpeed').value = 1; haltEvent(e); }
348 - if (e.key == '4') { Q('PlaySpeed').value = 0.5; haltEvent(e); }
349 - if (e.key == '5') { Q('PlaySpeed').value = 0.25; haltEvent(e); }
350 - if (e.key == '6') { Q('PlaySpeed').value = 0.1; haltEvent(e); }
351 - if (e.key == '0') { pause(); restart(); haltEvent(e); }
352 - }
353 -
354 - function openfile() {
355 - var x = '<input type=file name=files id=p2fileinput style=width:100% accept=".mcrec" onchange="openfileChanged()" />';
356 - setDialogMode(2, "Abrir arquivo...", 3, openfileEx, x);
357 - QE('idx_dlgOkButton', false);
358 - }
359 -
360 - function openfileEx() {
361 - var xfiles = Q('p2fileinput').files;
362 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
363 - if (files.length == 0) return;
364 - cleanup();
365 - recFile = files[0];
366 - recFilePtr = 0;
367 - readNextBlock(processFirstBlock);
368 - readLastBlock(function (type, flags, time) { if (type == 3) { recFileEndTime = time; } else { recFileEndTime = 0; } });
369 - Q('OpenFileButton').blur();
370 - }
371 -
372 - function openfileChanged() {
373 - var xfiles = Q('p2fileinput').files;
374 - if (xfiles != null) { var files = []; for (var i in xfiles) { if ((xfiles[i].type != null) && (xfiles[i].size != null) && (xfiles[i].size != 0) && (xfiles[i].name.endsWith('.mcrec'))) { files.push(xfiles[i]); } } }
375 - QE('idx_dlgOkButton', files.length == 1);
376 - }
377 -
378 - function togglePause() {
379 - if (recFile != null) { if (playing == true) { pause(); } else { if (recFilePtr != recFile.size) { play(); } } } return false;
380 - }
381 -
382 - function play() {
383 - Q('PlayButton').blur();
384 - if ((playing == true) || (recFileProtocol == 0)) return;
385 - playing = true;
386 - QV('metadatadiv', false);
387 - QE('PlayButton', false);
388 - QE('PauseButton', true);
389 - QE('RestartButton', false);
390 - if ((recFileProtocol == 1) && (agentTerminal == null)) {
391 - QV('DeskParent', false);
392 - QV('TermParent', true);
393 - agentTerminal = CreateAmtRemoteTerminal('Term', {});
394 - agentTerminal.State = 3;
395 - }
396 - readNextBlock(processBlock);
397 - }
398 -
399 - function pause() {
400 - Q('PauseButton').blur();
401 - if (playing == false) return;
402 - playing = false;
403 - QE('PlayButton', recFilePtr != recFile.size);
404 - QE('PauseButton', false);
405 - QE('RestartButton', recFilePtr != 0);
406 - if (waitTimer != null) {
407 - clearTimeout(waitTimer);
408 - waitTimer = null;
409 - processBlockEx(waitTimerArgs[0], waitTimerArgs[1], waitTimerArgs[2], waitTimerArgs[3]);
410 - waitTimerArgs = null;
411 - }
412 - }
413 -
414 - function restart() {
415 - Q('RestartButton').blur();
416 - if (playing == true) return;
417 - recFilePtr = 0;
418 - readState = 0;
419 - currentDeltaTimeTotalSec = 0;
420 - QV('metadatadiv', true);
421 - QE('PlayButton', true);
422 - QE('PauseButton', false);
423 - QE('RestartButton', false);
424 - QS('progressbar').width = '0px';
425 - QH('timespan', '00:00:00');
426 - QV('DeskParent', true);
427 - QV('TermParent', false);
428 - if (agentDesktop) {
429 - agentDesktop.Canvas.clearRect(0, 0, agentDesktop.CanvasId.width, agentDesktop.CanvasId.height);
430 - } else if (amtDesktop) {
431 - amtDesktop.canvas.clearRect(0, 0, amtDesktop.CanvasId.width, amtDesktop.CanvasId.height);
432 - amtDesktop = CreateAmtRemoteDesktop('Desk');
433 - amtDesktop.onScreenSizeChange = deskAdjust;
434 - amtDesktop.State = 3;
435 - amtDesktop.Start();
436 - } else if (agentTerminal) {
437 - agentTerminal = null;
438 - }
439 - }
440 -
441 - function clearConsoleMsg() { QH('p11DeskConsoleMsg', ''); }
442 -
443 - // Toggle the web page to full screen
444 - function toggleAspectRatio(toggle) {
445 - if (toggle === 1) { deskAspectRatio = ((deskAspectRatio + 1) % 3); }
446 - deskAdjust();
447 - }
448 -
449 - function deskAdjust() {
450 - var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth;
451 - var deskH = Q('Desk').height, deskW = Q('Desk').width;
452 -
453 - if (deskAspectRatio == 2) {
454 - // Scale mode
455 - QS('Desk')['margin-top'] = null;
456 - QS('Desk').height = '100%';
457 - QS('Desk').width = '100%';
458 - QS('DeskParent').overflow = 'hidden';
459 - } else if (deskAspectRatio == 1) {
460 - // Zoomed mode
461 - QS('Desk')['margin-top'] = '0px';
462 - //QS('Desk')['margin-left'] = '0px';
463 - QS('Desk').height = deskH + 'px';
464 - QS('Desk').width = deskW + 'px';
465 - QS('DeskParent').overflow = 'scroll';
466 - } else {
467 - // Fixed aspect ratio
468 - if ((parentH / parentW) > (deskH / deskW)) {
469 - var hNew = ((deskH * parentW) / deskW) + 'px';
470 - //if (webPageFullScreen || fullscreen) {
471 - //QS('deskarea3x').height = null;
472 - //} else {
473 - // QS('deskarea3x').height = hNew;
474 - //QS('deskarea3x').height = null;
475 - //}
476 - QS('Desk').height = hNew;
477 - QS('Desk').width = '100%';
478 - } else {
479 - var wNew = ((deskW * parentH) / deskH) + 'px';
480 - //if (webPageFullScreen || fullscreen) {
481 - //QS('Desk').height = null;
482 - //} else {
483 - QS('Desk').height = '100%';
484 - //}
485 - QS('Desk').width = wNew;
486 - }
487 - QS('Desk')['margin-top'] = null;
488 - QS('DeskParent').overflow = 'hidden';
489 - }
490 - }
491 -
492 - //
493 - // POPUP DIALOG
494 - //
495 -
496 - // null = Hidden, 1 = Generic Message
497 - var xxdialogMode;
498 - var xxdialogFunc;
499 - var xxdialogButtons;
500 - var xxdialogTag;
501 - var xxcurrentView = -1;
502 -
503 - // Display a dialog box
504 - // Parameters: Dialog Mode (0 = none), Dialog Title, Buttons (1 = OK, 2 = Cancel, 3 = OK & Cancel), Call back function(0 = Cancel, 1 = OK), Dialog Content (Mode 2 only)
505 - function setDialogMode(x, y, b, f, c, tag) {
506 - xxdialogMode = x;
507 - xxdialogFunc = f;
508 - xxdialogButtons = b;
509 - xxdialogTag = tag;
510 - QE('idx_dlgOkButton', true);
511 - QV('idx_dlgOkButton', b & 1);
512 - QV('idx_dlgCancelButton', b & 2);
513 - QV('id_dialogclose', (b & 2) || (b & 8));
514 - QV('idx_dlgDeleteButton', b & 4);
515 - QV('idx_dlgButtonBar', b & 7);
516 - if (y) QH('id_dialogtitle', y);
517 - for (var i = 1; i < 3; i++) { QV('dialog' + i, i == x); } // Edit this line when more dialogs are added
518 - QV('dialog', x);
519 - if (c) { if (x == 2) { QH('id_dialogOptions', c); } else { QH('id_dialogMessage', c); } }
520 - }
521 -
522 - function dialogclose(x) {
523 - var f = xxdialogFunc, b = xxdialogButtons, t = xxdialogTag;
524 - setDialogMode();
525 - if (((b & 8) || x) && f) f(x, t);
526 - }
527 -
528 - function messagebox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t, 1); }
529 - function statusbox(t, m) { setSessionActivity(); QH('id_dialogMessage', m); setDialogMode(1, t); }
530 - function haltEvent(e) { if (e.preventDefault) e.preventDefault(); if (e.stopPropagation) e.stopPropagation(); return false; }
531 - function pad2(num) { var s = '00' + num; return s.substr(s.length - 2); }
532 - function format(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { return typeof args[number] != 'undefined' ? args[number] : match; }); };
533 -
534 - start();
535 - </script>
536 -
537 -</body></html>
\ No newline at end of file