feat: screenshot queue
This commit is contained in:
@@ -9,6 +9,8 @@ import { chromium } from 'playwright-extra';
|
||||
import stealthPlugin from 'puppeteer-extra-plugin-stealth';
|
||||
import { PlaywrightBlocker } from '@cliqz/adblocker-playwright';
|
||||
import fetch from 'cross-fetch';
|
||||
import { throttle } from 'lodash';
|
||||
import sharp from 'sharp';
|
||||
|
||||
import logger from '../../logger';
|
||||
import { InterpreterSettings, RemoteBrowserOptions } from "../../types";
|
||||
@@ -81,6 +83,10 @@ export class RemoteBrowser {
|
||||
|
||||
private performanceMonitor: BackendPerformanceMonitor;
|
||||
|
||||
private screenshotQueue: Buffer[] = [];
|
||||
private isProcessingScreenshot = false;
|
||||
private screencastInterval: NodeJS.Timeout | null = null;
|
||||
|
||||
private startPerformanceReporting() {
|
||||
setInterval(() => {
|
||||
const report = this.performanceMonitor.getPerformanceReport();
|
||||
|
||||
Reference in New Issue
Block a user