feat(pip): PiP ウィンドウのサイズを Canvas のアスペクト比に合わせる - #19
Draft
lollipop-onl wants to merge 1 commit into
Draft
Conversation
Compute the Document Picture-in-Picture window size from the game canvas aspect ratio (16:9) instead of the fixed 360x270 (4:3), so the video fills the window without letterboxing. The size targets roughly a third of the available screen, with a 480x270 floor. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011sUVjio9hRnfXVfpZBwKrn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
Document Picture-in-Picture API の
requestWindow()に渡すサイズが360x270(4:3)固定だったため、16:9 のシャニマスの Canvas を表示すると上下に黒帯が出ていました。Canvas のアスペクト比からウィンドウサイズを計算するように変更します。変更内容
entrypoints/background/pip.tsmaxHeight * aspectRatioで縦方向にも収まるように抑制。1920x1080 のディスプレイなら640x360480x270。小さい画面でもウィンドウが潰れないようにDocument PiP 非対応環境での
video.requestPictureInPicture()へのフォールバックは変更していません。確認事項
pnpm buildが通ることを確認済みGenerated by Claude Code