Skip to content

Can windowjs run headless? #30

Answered by joaodasilva
guzmonne asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, and thanks for the feedback!

IIUC, you'd like to capture screenshots very often, maybe on every frame, and export them automatically; and ideally, skip showing the main window while doing that. Is the understanding correct?

I guess you've already tried setting window.visible = false; the screenshot capturing doesn't work when you do that? If that's the case then it's a bug to be fixed. I'm surprised that it doesn't work, but will have to investigate why.

Here's 3 different ways to capture a screenshot:

  1. canvas.encode(). This is probably the best solution, and should work even when the window is invisible (there might be a bug in there though)

  2. canvas.getImageData() + imageData.encode()

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by guzmonne
Comment options

You must be logged in to vote
2 replies
@joaodasilva
Comment options

@guzmonne
Comment options

Comment options

You must be logged in to vote
4 replies
@guzmonne
Comment options

@joaodasilva
Comment options

@guzmonne
Comment options

@joaodasilva
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants