Skip to content

feat: add disableFullScreenRoute to let the embedder own fullscreen#947

Open
Ortes wants to merge 3 commits into
fluttercommunity:masterfrom
Ortes:feat/disable-fullscreen-route-upstream
Open

feat: add disableFullScreenRoute to let the embedder own fullscreen#947
Ortes wants to merge 3 commits into
fluttercommunity:masterfrom
Ortes:feat/disable-fullscreen-route-upstream

Conversation

@Ortes

@Ortes Ortes commented May 31, 2026

Copy link
Copy Markdown
Contributor

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 (default false). When true:

  • Toggling fullscreen no longer pushes/pops Chewie's internal route.
  • isFullScreen still flips, so the fullscreen control icon updates as usual.
  • The player widget stays mounted in place; the host app is responsible for the fullscreen presentation.

This sidesteps the platform-view teardown/reload entirely by never moving the element.

API

  • bool disableFullScreenRoute on ChewieController (constructor + copyWith), default false.

Backwards compatibility

Fully backwards compatible — defaults to false, preserving the current route-based behavior. Opt-in only.

Testing

  • dart analyze — no issues.
  • In production use in an HLS web player, where it eliminates the manifest reload/rebuffer on fullscreen exit.

Complementary to the native web-fullscreen work in #946.

Ortes and others added 2 commits May 31, 2026 15:47
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>
@Ortes Ortes force-pushed the feat/disable-fullscreen-route-upstream branch from 89a47a1 to be2d4c1 Compare June 1, 2026 00:04
@Ortes Ortes marked this pull request as ready for review June 1, 2026 00:05
@codecov

codecov Bot commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 48.66%. Comparing base (69a8fc7) to head (1c4e19a).
⚠️ Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant