Skip to content

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

Merged
diegotori merged 3 commits into
fluttercommunity:masterfrom
Fullphysio:feat/disable-fullscreen-route-upstream
Sep 14, 2026
Merged

diegotori merged 3 commits into
fluttercommunity:masterfrom
Fullphysio: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 66.40%. Comparing base (141aa7e) to head (1239f69).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #947      +/-   ##
==========================================
+ Coverage   66.36%   66.40%   +0.04%     
==========================================
  Files          40       40              
  Lines        2402     2405       +3     
==========================================
+ Hits         1594     1597       +3     
  Misses        808      808              

☔ 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 Fullphysio/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 added a commit to Fullphysio/chewie that referenced this pull request Aug 15, 2026
@Ortes
Ortes force-pushed the feat/disable-fullscreen-route-upstream branch from 8c43061 to d87a5c3 Compare August 15, 2026 11:13
Ortes added a commit to Fullphysio/chewie that referenced this pull request Sep 9, 2026
@Ortes
Ortes force-pushed the feat/disable-fullscreen-route-upstream branch from d87a5c3 to 70d61f2 Compare September 9, 2026 09:34
Ortes and others added 3 commits September 14, 2026 23:01
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 70d61f2 to 1239f69 Compare September 14, 2026 21:03

@diegotori diegotori left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@diegotori
diegotori merged commit 5692641 into fluttercommunity:master Sep 14, 2026
5 checks passed
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.

2 participants