feat: screenshot options

This commit is contained in:
karishmas6
2024-07-13 17:07:23 +05:30
parent 0b1fd5dcb8
commit 76d50194e8

View File

@@ -180,7 +180,9 @@ export class RemoteBrowser {
*/
public makeAndEmitScreenshot = async (): Promise<void> => {
try {
const screenshot = await this.currentPage?.screenshot();
const screenshot = await this.currentPage?.screenshot(
{ type: 'jpeg', quality: 90, fullPage: true }
);
if (screenshot) {
this.emitScreenshot(screenshot.toString('base64'));
}