From 78198a3b13f3ec517e3bd7ec9a531010e5037f32 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 13 Aug 2019 14:22:55 -0700 Subject: [PATCH] MeshPlayer can now play MeshCentral terminal sessions. --- public/player.htm | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/public/player.htm b/public/player.htm index 9a250666..307cad78 100644 --- a/public/player.htm +++ b/public/player.htm @@ -31,15 +31,15 @@
-
+
-
-

+                
                 
             
@@ -180,7 +180,6 @@ else if (p == 101) { p = 'Intel® AMT Redirection'; } x += addInfoNoEsc('Protocol', p); } - console.log('desk'); QV('DeskParent', true); QV('TermParent', false); if (recFileMetadata.protocol == 1) { @@ -191,8 +190,6 @@ QE('PauseButton', false); QE('RestartButton', false); recFileStartTime = recFileLastTime = time; - agentTerminal = CreateAmtRemoteTerminal('Term', {}); - agentTerminal.State = 3; } else if (recFileMetadata.protocol == 2) { // MeshCentral remote desktop @@ -288,6 +285,7 @@ waitTimerArgs = null; currentDeltaTimeTotalSec = 0; recFileEndTime = 0; + agentTerminal = null; if (waitTimer != null) { clearTimeout(waitTimer); waitTimer = null; } QH('deskstatus', ''); QE('PlayButton', false); @@ -297,8 +295,6 @@ QH('timespan', '00:00:00'); QV('metadatadiv', true); QH('metadatadiv', 'MeshCentral Session Player

Drag & drop a .mcrec file or click "Open File..."'); - QH('Term', ''); - console.log('desk'); QV('DeskParent', true); QV('TermParent', false); } @@ -384,10 +380,11 @@ QE('PlayButton', false); QE('PauseButton', true); QE('RestartButton', false); - if (recFileProtocol == 1) { - console.log('term'); + if ((recFileProtocol == 1) && (agentTerminal == null)) { QV('DeskParent', false); QV('TermParent', true); + agentTerminal = CreateAmtRemoteTerminal('Term', {}); + agentTerminal.State = 3; } readNextBlock(processBlock); } @@ -419,8 +416,6 @@ QE('RestartButton', false); QS('progressbar').width = '0px'; QH('timespan', '00:00:00'); - QH('Term', ''); - console.log('desk'); QV('DeskParent', true); QV('TermParent', false); if (agentDesktop) { @@ -431,6 +426,8 @@ amtDesktop.onScreenSizeChange = deskAdjust; amtDesktop.State = 3; amtDesktop.Start(); + } else if (agentTerminal) { + agentTerminal = null; } } @@ -443,7 +440,6 @@ } function deskAdjust() { - return; var parentH = Q('DeskParent').clientHeight, parentW = Q('DeskParent').clientWidth; var deskH = Q('Desk').height, deskW = Q('Desk').width;