tamga-vdesktop 1.2.3 → 1.2.5

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.
package/dist/cli.js CHANGED
@@ -1328,7 +1328,16 @@ var ChromiumDesktopSession = class {
1328
1328
  if (!tab.page || tab.page.isClosed() || tab.mode !== "web") return;
1329
1329
  try {
1330
1330
  tab.suppressSettleUntil = Date.now() + 900;
1331
- const pngBuf = await tab.page.screenshot({ type: "png" });
1331
+ let pngBuf;
1332
+ if (tab.cdp) {
1333
+ const res = await tab.cdp.send("Page.captureScreenshot", {
1334
+ format: "png",
1335
+ fromSurface: true
1336
+ });
1337
+ pngBuf = Buffer.from(res.data, "base64");
1338
+ } else {
1339
+ pngBuf = await tab.page.screenshot({ type: "png", scale: "device" });
1340
+ }
1332
1341
  tab.lastPngAt = Date.now();
1333
1342
  tab.suppressSettleUntil = tab.lastPngAt + 550;
1334
1343
  const packet = Buffer.allocUnsafe(1 + pngBuf.length);
@@ -3785,7 +3794,7 @@ var VSCodeServerManager = class {
3785
3794
  };
3786
3795
 
3787
3796
  // server/index.ts
3788
- var TAMGA_VERSION = "1.2.3";
3797
+ var TAMGA_VERSION = "1.2.5";
3789
3798
  var MIME_MAP = {
3790
3799
  html: "text/html; charset=utf-8",
3791
3800
  htm: "text/html; charset=utf-8",