You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mobile): HTML file previews play video inline on iPhone - #32343
On iPhone, an HTML file opened in the mobile file viewer could not play video inline. A video the page marked playsinline still jumped into the native fullscreen player on Play, which covered the page's own controls (pause, seek, voice switching). Reproduced on main (33f8584) in T3 Code Dev on an iPhone 17 Pro simulator: open a self-contained HTML player from the thread's file tree, tap its Play button, and the video goes fullscreen. A following tap on the page's "Voice B" button never reaches the page.
Change
The file viewer's WebView (WorkspaceFileWebPreview) now passes allowsInlineMediaPlayback, matching the inline HTML renderer (HtmlRenderWebView). WKWebView defaults this to false on iPhone, which ignores playsinline. The prop is iOS-only, so Android and web are unchanged. Autoplay, sandboxing and URL handling are untouched. A video without playsinline still opens native fullscreen, as before.
The same driver ran on a fresh isolated dev server, against T3 Code Dev on an iPhone 17 Pro simulator. It opens a synthetic self-contained player from the thread file tree: a muted playsinline MP4, two AAC tracks routed through Web Audio gain nodes, an explicit Play button, and a status line reading video.webkitDisplayingFullscreen. It then taps Play, waits 4 s, taps Voice B and waits 3 s.
The file viewer's WebView left allowsInlineMediaPlayback at WKWebView's
iPhone default (false), so every <video> play went to the native
fullscreen player and covered the page's own controls. Opt in like the
inline HTML renderer already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Macroscope's review found this PR requires human approval — Mobile document previews now allow eligible iPhone videos to play inline while retaining fullscreen support. This changes the default preview behavior and requires human confirmation of the intended playback experience.
No code changes detected at 9cddbf0. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
The preview enables inline playback on iPhone. No actionable merge-blocking risk is identified.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: HTML file previews on iPhone now play video inline. It uses the conventional commit form and matches the one-line change that sets allowsInlineMediaPlayback in Workspa…
Description check
The description follows the template well. It has Problem, Change, Scope and approval, and Verification sections. The Problem section gives the symptom, the reproduction steps, and the environment. Th…
Linked Issues check
[#32338] The issue asks for a reproducible iOS/WebKit failure and a repair for the local HTML file viewer. The issue names the missing allowsInlineMediaPlayback setting in WorkspaceFileWebPreview.tsx …
Out of Scope Changes check
The whole-PR diff against the merge base changes one file and adds one prop line: allowsInlineMediaPlayback in apps/mobile/src/features/files/WorkspaceFileWebPreview.tsx. This prop directly implements…
Full details: Title check
Explanation
The title names the main change: HTML file previews on iPhone now play video inline. It uses the conventional commit form and matches the one-line change that sets allowsInlineMediaPlayback in WorkspaceFileWebPreview. The title is specific and accurate, and it fits the raw summary and PR objectives.
Full details: Description check
Explanation
The description follows the template well. It has Problem, Change, Scope and approval, and Verification sections. The Problem section gives the symptom, the reproduction steps, and the environment. The Change section explains the prop, why it is needed, and that Android and web are unaffected. The Verification section gives before and after results, the checks not run, and the lack of an automated test. It links the issue (fixes #32338). Gaps: the Scope and approval section gives only a bare issue link and does not point to a maintainer approval comment or triage, which the template asks for. The before and after screenshots and recordings are still to be attached, and the template asks for them on UI changes. The template's HTML comments were left in place, and the model and harness line is not clearly stated. These gaps are non-critical, so the description is mostly complete.
Full details: Linked Issues check
Explanation
[#32338] The issue asks for a reproducible iOS/WebKit failure and a repair for the local HTML file viewer. The issue names the missing allowsInlineMediaPlayback setting in WorkspaceFileWebPreview.tsx as the lead to test. The diff adds allowsInlineMediaPlayback to the WebView in DocumentWebPreview at the reviewed head (431ea25). This is the only code change between merge base d4247a5 and head. The PR reports an iPhone 17 Pro simulator run. Before the change, Play entered native fullscreen and covered the page's Voice B control. After the change, the video stayed inline and Voice B switched voice while playback continued (t=12.02, playing, fullscreen=false). The audio route reported audio=running in both runs. The opaque-origin sandbox, originWhitelist, and URL handling are unchanged in the diff, as the issue requires. Coding requirements for pause and seek on iPhone are not directly exercised in the PR's run. The issue reports pause and seek working in the Chromium file viewer, and the code change enables the same inline playback path. Audible speaker output and physical-device behavior are not verified. The issue does not make these coding requirements. No automated test is required by the issue.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff against the merge base changes one file and adds one prop line: allowsInlineMediaPlayback in apps/mobile/src/features/files/WorkspaceFileWebPreview.tsx. This prop directly implements the iOS inline-playback lead named in #32338 for the local HTML file viewer. No unrelated files, sandbox settings, autoplay settings, or URL handling changed. The prop is iOS-only in effect, so Android and web behavior is not changed by this line, as the PR states.
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Environment for both recordings: real iOS development app on the same pooled iPhone 17 Pro simulator, portrait 402×874 points, light theme. Separate worktrees, Metro servers, and fresh databases; byte-identical synthetic HTML fixture.
Steps: open the thread’s Files → player.html; tap Play; wait four seconds; tap the Voice B button’s position; wait four seconds. The same script and coordinates were used on both sides.
AI-assisted; verified with the tests and tools listed above.
Not shown:
Audible soundtrack switching was not verified: simulator recordings contain video only. The head recording shows the Voice B handler changing the visible state during uninterrupted video playback.
Physical iPhone behavior was not checked; both runs used the same pooled iPhone simulator.
This branch has not been deployed
No deployments
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
bugfixFix PR opened by an issue lead; enters the PR looppr:gate-failedA land gate failedsize:XS0-9 changed lines (additions + deletions).vouch:trustedPR author is trusted by repo permissions or the VOUCHED list.
1 participant
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.
Problem
On iPhone, an HTML file opened in the mobile file viewer could not play video inline. A video the page marked
playsinlinestill jumped into the native fullscreen player on Play, which covered the page's own controls (pause, seek, voice switching). Reproduced on main (33f8584) in T3 Code Dev on an iPhone 17 Pro simulator: open a self-contained HTML player from the thread's file tree, tap its Play button, and the video goes fullscreen. A following tap on the page's "Voice B" button never reaches the page.Change
The file viewer's WebView (
WorkspaceFileWebPreview) now passesallowsInlineMediaPlayback, matching the inline HTML renderer (HtmlRenderWebView). WKWebView defaults this to false on iPhone, which ignoresplaysinline. The prop is iOS-only, so Android and web are unchanged. Autoplay, sandboxing and URL handling are untouched. A video withoutplaysinlinestill opens native fullscreen, as before.Scope and approval
Fixes #32338
Verification
The same driver ran on a fresh isolated dev server, against T3 Code Dev on an iPhone 17 Pro simulator. It opens a synthetic self-contained player from the thread file tree: a muted
playsinlineMP4, two AAC tracks routed through Web Audio gain nodes, an explicit Play button, and a status line readingvideo.webkitDisplayingFullscreen. It then taps Play, waits 4 s, taps Voice B and waits 3 s.t=0.00 paused fullscreen=falset=0.00 paused fullscreen=falset=5.78 playing fullscreen=true fullscreenEntries=1 audio=runningt=5.17 playing fullscreen=false fullscreenEntries=0 audio=runningt=12.10 fullscreen=true voice=A(tap covered by the native player)t=12.02 playing fullscreen=false voice=BOther checks:
playsinline: Play still enters native fullscreen (fullscreen=true), unchanged from main.fullscreen=false, audio running). The prop does not apply on Android.AI-assisted; verified with the tests and tools listed above.