tamga-vdesktop 1.2.2 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
6
  <title>TamgaVDesktop</title>
7
- <script type="module" crossorigin src="/assets/index-zQEP78M7.js"></script>
7
+ <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><rect width='64' height='64' rx='16' fill='%2318181b'/><text x='50%25' y='54%25' text-anchor='middle' dominant-baseline='middle' fill='%23fff' font-family='sans-serif' font-size='32' font-weight='bold'>T</text></svg>" />
8
+ <script type="module" crossorigin src="/assets/index-w9d1s8Jy.js"></script>
8
9
  <link rel="stylesheet" crossorigin href="/assets/index-BpTZrftb.css">
9
10
  </head>
10
11
  <body class="overflow-hidden select-none">
package/dist/server.js CHANGED
@@ -1420,6 +1420,15 @@ var ChromiumDesktopSession = class {
1420
1420
  cdp.on("Page.screencastFrame", (payload) => {
1421
1421
  cdp.send("Page.screencastFrameAck", { sessionId: payload.sessionId }).catch(() => {
1422
1422
  });
1423
+ const now = Date.now();
1424
+ if (payload.data === tab.lastScreencastData) {
1425
+ return;
1426
+ }
1427
+ if (now < (tab.suppressSettleUntil || 0) && (tab.lastUserInputAt || 0) <= (tab.lastPngAt || 0)) {
1428
+ tab.lastScreencastData = payload.data;
1429
+ return;
1430
+ }
1431
+ tab.lastScreencastData = payload.data;
1423
1432
  const jpegBuf = Buffer.from(payload.data, "base64");
1424
1433
  const packet = Buffer.allocUnsafe(1 + jpegBuf.length);
1425
1434
  packet[0] = PACKET_VIDEO_JPEG;
@@ -1428,15 +1437,13 @@ var ChromiumDesktopSession = class {
1428
1437
  this.recordFrameTick();
1429
1438
  if (this.activeTabId === tab.id && tab.mode === "web") {
1430
1439
  this.broadcastBinary(packet);
1431
- if (Date.now() > (tab.suppressSettleUntil || 0)) {
1432
- if (tab.settleTimer) clearTimeout(tab.settleTimer);
1433
- tab.settleTimer = setTimeout(() => {
1434
- if (this.activeTabId === tab.id && tab.mode === "web") {
1435
- this.captureImmediateFrame(tab).catch(() => {
1436
- });
1437
- }
1438
- }, 220);
1439
- }
1440
+ if (tab.settleTimer) clearTimeout(tab.settleTimer);
1441
+ tab.settleTimer = setTimeout(() => {
1442
+ if (this.activeTabId === tab.id && tab.mode === "web") {
1443
+ this.captureImmediateFrame(tab).catch(() => {
1444
+ });
1445
+ }
1446
+ }, 220);
1440
1447
  }
1441
1448
  });
1442
1449
  const syncPageMeta = async () => {
@@ -1553,8 +1560,10 @@ var ChromiumDesktopSession = class {
1553
1560
  async captureImmediateFrame(tab) {
1554
1561
  if (!tab.page || tab.page.isClosed() || tab.mode !== "web") return;
1555
1562
  try {
1556
- tab.suppressSettleUntil = Date.now() + 380;
1563
+ tab.suppressSettleUntil = Date.now() + 900;
1557
1564
  const pngBuf = await tab.page.screenshot({ type: "png" });
1565
+ tab.lastPngAt = Date.now();
1566
+ tab.suppressSettleUntil = tab.lastPngAt + 550;
1558
1567
  const packet = Buffer.allocUnsafe(1 + pngBuf.length);
1559
1568
  packet[0] = PACKET_VIDEO_JPEG;
1560
1569
  pngBuf.copy(packet, 1);
@@ -1575,6 +1584,8 @@ var ChromiumDesktopSession = class {
1575
1584
  tab.mode = parsed.mode;
1576
1585
  tab.filePath = parsed.filePath;
1577
1586
  tab.url = parsed.url;
1587
+ tab.lastScreencastData = void 0;
1588
+ tab.suppressSettleUntil = 0;
1578
1589
  if (parsed.mode === "newtab") {
1579
1590
  await this.stopScreencast(tab);
1580
1591
  tab.title = "Yeni Sekme";
@@ -1679,6 +1690,8 @@ var ChromiumDesktopSession = class {
1679
1690
  const active = this.activeTabId ? this.tabs.get(this.activeTabId) : void 0;
1680
1691
  if (active?.mode === "web" && active.page && !active.page.isClosed()) {
1681
1692
  try {
1693
+ active.lastScreencastData = void 0;
1694
+ active.suppressSettleUntil = 0;
1682
1695
  await this.stopScreencast(active);
1683
1696
  await this.applyTabMetrics(active);
1684
1697
  await this.startScreencast(active);
@@ -1692,6 +1705,7 @@ var ChromiumDesktopSession = class {
1692
1705
  if (!tabId) return;
1693
1706
  const tab = this.tabs.get(tabId);
1694
1707
  if (!tab || tab.mode !== "web" || !tab.page || !tab.cdp || tab.page.isClosed()) return;
1708
+ tab.lastUserInputAt = Date.now();
1695
1709
  const kind = payload.kind;
1696
1710
  if (kind === "mouse") {
1697
1711
  const eventType = payload.eventType;
@@ -3714,7 +3728,7 @@ var VSCodeServerManager = class {
3714
3728
  };
3715
3729
 
3716
3730
  // server/index.ts
3717
- var TAMGA_VERSION = "1.2.2";
3731
+ var TAMGA_VERSION = "1.2.4";
3718
3732
  var MIME_MAP = {
3719
3733
  html: "text/html; charset=utf-8",
3720
3734
  htm: "text/html; charset=utf-8",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamga-vdesktop",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "TamgaVDesktop — Self-hostable Linux Virtual Desktop OS platform with native web shell, real Linux terminal, built-in HiDPI Playwright Chromium browser, and seamless native Linux GUI apps.",