Skip to content

screenshot: retry legacy DISPLAY capture at 1920x1080 - #426

Open
mariotaku wants to merge 1 commit into
mainfrom
fix/screenshot-display-size
Open

mariotaku wants to merge 1 commit into
mainfrom
fix/screenshot-display-size

Conversation

@mariotaku

Copy link
Copy Markdown
Member

Fixes #419.

Cause

TVs without com.webos.service.capture fall back to com.webos.service.tv.capture/executeOneShot. On at least the LG 49SM9000PLA (webOS 4.10), that service answers CAPTURE_ERROR_03: Specified size is out of range when the request has no width and height. The reporter showed that the same DISPLAY request succeeds at 1920×1080, 1280×720 and 960×540.

Change

The legacy fallback now retries once at 1920×1080 when it gets CAPTURE_ERROR_03.

  • The first request is unchanged, so legacy TVs that already work send the same request as before.
  • The newer com.webos.service.capture path is unchanged.

Testing

  • tsc --noEmit -p tsconfig.app.json: clean.
  • Not tested on a TV. I have no webOS 4 device that returns this error.

🤖 Generated with Claude Code

com.webos.service.tv.capture on some webOS 4 TVs answers CAPTURE_ERROR_03 when the request has no size. Retry once at 1920x1080 on that error. Requests that already work stay unchanged.

Fixes #419

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mariotaku

Copy link
Copy Markdown
Member Author

Tested the Luna calls on an LK5900 (webOS 4.4.3, rooted):

Request Response
com.webos.service.capture/executeOneShot Service does not exist: com.webos.service.capture. (the existing fallback check matches)
com.webos.service.tv.capture, no size success, 1920×1080 PNG
com.webos.service.tv.capture, 1920×1080 success, same 1920×1080 PNG
com.webos.service.tv.capture, 10000×10000 "errorCode": "CAPTURE_ERROR_03", "errorText": "Specified size is out of range"

Not tested: the retry itself inside the app, since this TV never sends CAPTURE_ERROR_03 without a size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DISPLAY screenshot fails on webOS 4 unless width and height are specified

1 participant