feat: add disableFullScreenRoute to let the embedder own fullscreen#947
Open
Ortes wants to merge 3 commits into
Open
feat: add disableFullScreenRoute to let the embedder own fullscreen#947Ortes wants to merge 3 commits into
Ortes wants to merge 3 commits into
Conversation
When set, toggling fullscreen no longer pushes/pops Chewie's own route. On web that route reparents the <video> platform view and, on exit, forces a full controller re-initialize (an HLS manifest reload + rebuffer). With this flag the player stays mounted in place and the host app drives fullscreen itself (e.g. the browser Fullscreen API). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
89a47a1 to
be2d4c1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #947 +/- ##
==========================================
+ Coverage 43.82% 48.66% +4.84%
==========================================
Files 21 21
Lines 1602 1605 +3
==========================================
+ Hits 702 781 +79
+ Misses 900 824 -76 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Motivation
Chewie's fullscreen is implemented by pushing a dedicated route and re-parenting the player into it. On web this reparents the platform-view
<video>element; on exit the original view goes blank, and the common workaround is to re-initialize the controller — which for an HLS source means a full manifest reload and rebuffer.Some embedders want to own the fullscreen presentation themselves (e.g. expand their own layout and drive the browser's native Fullscreen API) without Chewie's route getting in the way.
What this adds
ChewieController.disableFullScreenRoute(defaultfalse). Whentrue:isFullScreenstill flips, so the fullscreen control icon updates as usual.This sidesteps the platform-view teardown/reload entirely by never moving the element.
API
bool disableFullScreenRouteonChewieController(constructor +copyWith), defaultfalse.Backwards compatibility
Fully backwards compatible — defaults to
false, preserving the current route-based behavior. Opt-in only.Testing
dart analyze— no issues.Complementary to the native web-fullscreen work in #946.