Headless brower is playing a video, and I want get every frame data.

Sometimes frameData can not get screenshot data but sometimes it work. And I don't know how to debugger this issue.

Here is my code:

const frameData = await Promise.race([
     this.cdpSession.send("HeadlessExperimental.beginFrame", { screenshot: { format: "jpeg", quality: 80 } }),
     new Promise(resolve => timer = setTimeout(() => resolve(false), 30000))
]);

frameData can not get screenshot data because of the 30000ms timer is trigger.

Please help me to deuuger this issue and find what reason cause this issue.

0

There are 0 answers