Portrait fullscreen rebuild, Material 3 Expressive on-video controls, and a run of playback fixes - #1067
Merged
Conversation
…it, and give the portrait layout YouTube's title and channel line
…he player tokens and give its buttons haptics
…, toggle buttons and an animated play-pause swap
…d pill beside the quality badge, and add gesture overlay styles
…or, place them clear of the thumb and the cutout, and accumulate each drag locally
…sted level survives the next gesture
…de pane only to windows wider than they are tall
…ad-out styles and the tablet layout fix
… size on tablets, highlight a tapped chapter at once, and make the surface resync actually flush the codec
…e fullscreen width
…the tap-to-highlight behaviour
…autoplay and the queue
…insets instead of switching them
…e animation cannot produce a negative padding
…t and the speed pill see it, and drop the side pane when it would be empty
… the side pane useful when related videos are off
…on in the fullscreen drawer
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.
Summary
Polishes the layer drawn on top of the video — the layer the adaptive and InnerTube work left untouched — and fixes a run of playback and layout bugs found alongside it.
Portrait fullscreen is rebuilt around the video with the title and channel above it, and is now reached the same way whether you swipe into it or press the button. The on-video controls move to Material 3 Expressive with haptics throughout, the volume and brightness read-outs gain four styles, and volume boost above 100% works for the first time.
Related issue
Closes #867
Closes #977
Closes #978
Closes #991
Closes #1029
Closes #1051
Closes #1062
Closes #1066
Partially addresses #1022 — the player items only. Related videos off no longer leaves the side pane empty, and the fullscreen title opens the description so landscape has a route to it. The search-result suggestions are out of scope here; they were designed differently during the search refactor. The two remaining gesture items (swipe-down-to-close only reacting in the middle of the player, and the landscape body scroll competing with swipe-up) are gesture-budget trade-offs that need a product decision rather than a fix.
Partially addresses #1065 — the seek bar no longer jumps to the edge during the transition. The broader "glitchy" feel of entering fullscreen is not addressed; it needs a more specific description of what looks wrong.
Likely fixes #967 and #1064 but neither is confirmed, so neither is closed here. #967 describes empty space on an upright HyperOS tablet, which is exactly what the two-pane split produced before this branch, but the evidence is a video I could not review. #1064 shares its root cause with the resume freeze fixed here — a surface re-attach that never flushed the codec — but it is random and I could not reproduce it.
Change type
Validation
./gradlew :app:assembleGithubDebug./gradlew :app:testGithubDebugUnitTest— 1,907 tests, 0 failures./gradlew :app:compileFossDebugKotlinand./gradlew spotlessCheckTest device and Android version: Xiaomi POCO X6 Pro, Android 16
Verified on the device by driving it over adb and reading the logs, not by eye alone:
surfaceReattachResync pos=373498 target=373497and the reported position actually moved, which it never did before. Video resumed at pts 373.54 s against a playhead of 373.497 s, with following frames attimediff: 9and24ms. Previously video sat 13 s ahead of audio and the picture held for 14.5 s.Volume set to: 2.0 (player=1.0, boost=602mB)with the effect at1202mB— the boost summed with stable volume's 600 rather than overwriting it.Padding must be non-negative.Not verified on hardware, and stated as such: the mini player size cap (#991) only applies to large windows and could not be exercised on a phone, and #1064 is not reproducible on demand.
Screenshots or recordings
Not included.
Risk and compatibility
Player-path changes.
attachVideoSurfacenow seeks one millisecond short of the current position instead of to it. A seek resolving to the millisecond the player already reports returns fromExoPlayerImplInternal.seekToInternalbefore the renderers are disabled — and the resync's own guard required exactly the state that triggers that early return, so the workaround had never flushed anything. Exact seek parameters keep the one-millisecond step from snapping to a sync frame, and SABR sessions are excluded because a SABR seek rebuilds the whole session. A watchdog forces the same flush if a re-attached surface has drawn nothing after 1.2 s, guarded on READY and playing so a slow first load cannot trip it; measured first-frame latency on a real load is about 120 ms, and an 8.4 s extraction load left it correctly untouched.Preference removed.
show_fullscreen_titleis gone and the title always shows in fullscreen — it is now the control that opens the description, so it is no longer optional. The stored key is simply left unread.player_show_title_title/_subtitlewere removed from the default locale; the translations still carry them until Weblate's next sync, which lint reports without failing (abortOnError = false).Preferences added: gesture overlay style (default Circular, the existing look) and player vibration (default on). Both are additive with existing behaviour as the default.
Volume boost now applies real gain. Above unity it drives
LoudnessEnhancerrather thanExoPlayer.volume, which is documented 0..1 and was silently constraining it. Gain is capped at 2000 mB and shares one effect with stable volume rather than the two overwriting each other.Blocked channels are filtered where related videos are derived, so they leave the cards, the autoplay candidates and the queue together. Items arriving without a channel id still pass, the same gap the search PR recorded.
Fullscreen picks its layout from the orientation it is about to request rather than the one the window currently has, so entering fullscreen on a landscape video no longer renders a portrait frame first.
The mini player size preference now applies on tablets, bounded by an absolute width instead of a fraction of the screen. On phones the result is unchanged.
No dependency, Room schema, or permission changes.
The change does not introduce secrets, private data, or unexpected telemetry.
New user-facing text uses Android string resources.
Dependency and lockfile changes are intentional and limited to this PR — none.
Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
Breaking changes and upgrade steps are clearly documented — none.