Skip to content

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

Open
Ortes wants to merge 4 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 4 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
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 53.01%. Comparing base (7a4631c) to head (d87a5c3).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #947      +/-   ##
==========================================
+ Coverage   51.21%   53.01%   +1.80%     
==========================================
  Files          25       25              
  Lines        1728     1741      +13     
==========================================
+ Hits          885      923      +38     
+ Misses        843      818      -25     

☔ View full report in Codecov by Harness.
📢 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.

Ortes added a commit to Ortes/chewie that referenced this pull request Aug 12, 2026
@Ortes
Ortes force-pushed the feat/disable-fullscreen-route-upstream branch from 1c4e19a to 8c43061 Compare August 12, 2026 07:25
Ortes and others added 4 commits August 15, 2026 13:10
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>
@Ortes
Ortes force-pushed the feat/disable-fullscreen-route-upstream branch from 8c43061 to d87a5c3 Compare August 15, 2026 11:13
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