Skip to content

[video_player] Platform view support - #8810

Merged
auto-submit[bot] merged 11 commits into
flutter:mainfrom
leancodepl:feature/video-player-platform-view-support-app-facing
Jun 3, 2025
Merged

[video_player] Platform view support#8810
auto-submit[bot] merged 11 commits into
flutter:mainfrom
leancodepl:feature/video-player-platform-view-support-app-facing

Conversation

@FirentisTFW

@FirentisTFWFirentisTFW commented Mar 6, 2025

Copy link
Copy Markdown
Contributor

This PR adds support for platform views as on optional way of displaying a video (as an alternative to Flutter's Texture widget). Texture-based approach is still the default setting when creating a new player.

Platform interface was updated in #8453
Platform implementations were added in these PRs:

Closesflutter/issues/86613.

Pre-launch Checklist

@nateshmbhat

This comment was marked as off-topic.

@FirentisTFW

Copy link
Copy Markdown
ContributorAuthor

@nateshmbhat Looks like there's an issue with displaying SurfaceViews in Android (see #164899). We'll have to either wait for it to get fixed, try to find a workaround for it first or maybe just release this feature for iOS for now. I'm afraid there's no clear timeline for it yet, but I'll update you once I know more about this.

@nateshmbhat

Copy link
Copy Markdown
Contributor

@nateshmbhat Looks like there's an issue with displaying SurfaceViews in Android (see #164899). We'll have to either wait for it to get fixed, try to find a workaround for it first or maybe just release this feature for iOS for now. I'm afraid there's no clear timeline for it yet, but I'll update you once I know more about this.

@FirentisTFW since most of the performance issues and crashes that we're hearing are more predominant in ios, i think its worth releasing this now for just ios 🙏🏻
Please consider this 🙏🏻

@RobertOdrowaz
RobertOdrowazforce-pushed the feature/video-player-platform-view-support-app-facing branch from 1e6999f to e3b6f2eCompareMay 20, 2025 11:46
@RobertOdrowaz
RobertOdrowazforce-pushed the feature/video-player-platform-view-support-app-facing branch 3 times, most recently from 1321235 to 7c17709CompareMay 23, 2025 07:46

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The latest version of video_player_android requires such constraints

@RobertOdrowaz
RobertOdrowazforce-pushed the feature/video-player-platform-view-support-app-facing branch from 7c17709 to e6cb46dCompareMay 23, 2025 08:35
Comment threadpackages/video_player/video_player/README.md Outdated
@RobertOdrowaz
RobertOdrowaz marked this pull request as ready for review May 23, 2025 09:49
Comment threadpackages/video_player/video_player/README.md Outdated
Comment threadpackages/video_player/video_player/README.md Outdated
Comment threadpackages/video_player/video_player/lib/video_player.dart Outdated
Comment threadpackages/video_player/video_player/lib/video_player.dart Outdated
Comment threadpackages/video_player/video_player/lib/video_player.dart Outdated
@RobertOdrowaz
RobertOdrowazforce-pushed the feature/video-player-platform-view-support-app-facing branch from a1d2299 to 4de56f1CompareMay 26, 2025 05:22
@nateshmbhat

This comment was marked as off-topic.

@stuartmorgan-g

This comment was marked as off-topic.

Comment threadpackages/video_player/video_player/example/lib/main.dart Outdated
@RobertOdrowaz
RobertOdrowazforce-pushed the feature/video-player-platform-view-support-app-facing branch from a0eb439 to f513be0CompareJune 3, 2025 07:26

@stuartmorgan-gstuartmorgan-g 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!

@stuartmorgan-gstuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 3, 2025
@auto-submit
auto-submitBot merged commit 1765c95 into flutter:mainJun 3, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jun 3, 2025
github-merge-queueBot pushed a commit to flutter/flutter that referenced this pull request Jun 3, 2025
flutter/packages@4463066...1765c95
2025-06-03 pawel.jakubowski@leancode.pl [video_player] Platform view
support (flutter/packages#8810)
2025-06-02 kaiquegazola@outlook.com [in_app_purchase_storekit] Add
support to win back offers / promotional offers (flutter/packages#8474)
2025-06-02 rmolivares@renzo-olivares.dev [two_dimensional_scrollables]
Enable multi-cell/single-cell text selection in Simple Table example
(flutter/packages#8189)
2025-05-30 43054281+camsim99@users.noreply.github.com [all_packages]
Bump `compileSdk` version to 35 (flutter/packages#9168)
2025-05-30 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
be698c4 to b25305a (11 revisions) (flutter/packages#9342)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.
To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
This PR adds support for platform views as on optional way of displaying a video (as an alternative to Flutter's `Texture` widget). Texture-based approach is still the default setting when creating a new player.
Platform interface was updated in flutter#8453 Platform implementations were added in these PRs:
- iOS: flutter#8237 - Android: flutter#8466 Closes [flutter/issues/86613](flutter/flutter#86613).
gnprice pushed a commit to rajveermalviya/zulip-flutter that referenced this pull request Jul 7, 2025
Changelog:
https://pub.dev/packages/video_player/changelog#2100
One notable change is, support for opt-in use of
Flutter platform view:
flutter/packages#8810
This commit also reverts the commit that pinned `video_player`
package:
commit 2036178
deps: Pin video_player to 2.9.5
The latest version (2.10.0) makes significant changes internally
and to the test API, which would require us to investigate and
update our FakeVideoPlayerPlatform mock for tests.
So, pin to the currently used version for now.
Upon investigating, the changes to the public API seem mostly
small, namely some deprecations in the platform interface class.
Which is only used in our tests, specifically by
FakeVideoPlayerPlatform. Otherwise, no behaviour change observed
while testing, as we are using the default options, i.e not using
Flutter platform view.
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
This PR adds support for platform views as on optional way of displaying a video (as an alternative to Flutter's `Texture` widget). Texture-based approach is still the default setting when creating a new player.
Platform interface was updated in flutter#8453 Platform implementations were added in these PRs:
- iOS: flutter#8237 - Android: flutter#8466 Closes [flutter/issues/86613](flutter/flutter#86613).
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
This PR adds support for platform views as on optional way of displaying a video (as an alternative to Flutter's `Texture` widget). Texture-based approach is still the default setting when creating a new player.
Platform interface was updated in flutter#8453 Platform implementations were added in these PRs:
- iOS: flutter#8237 - Android: flutter#8466 Closes [flutter/issues/86613](flutter/flutter#86613).
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmitMerge PR when tree becomes green via auto submit Appp: video_player

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[video_player] Feature request: Switch to PlatformView on iOS (and macOS when possible) to fix performance issues

4 participants

@FirentisTFW@nateshmbhat@stuartmorgan-g@RobertOdrowaz