flutter / flutter/flutter

[video_player] Adopt platform-specific option/extension subclass pattern

Open
#188,308 0 comments 0 reactions 0 assignees View on GitHub
c: tech-debt p: requires breaking change p: video_player P2 package team-ecosystem triaged-ecosystem
Dominant language
Dart
Stars
179k
Forks
31.1k
PR merge metrics
PR metrics pending

Description

`video_player`'s API surface has grown over time and has adopted web-specific options directly into the platform interface layer. There's pressure to do the same for Android and iOS as people want more configuration over things like ExoPlayer internal configuration. This isn't a scalable or federation-friendly solution.

We should do a one-time breaking change to adopt the pattern we are using in our newer federated plugin designs (e.g., webview_flutter), where we have a generic options class (often empty) and extension class in the platform interface, exposed at the app-facing layer, and then platform implementation packages can subclass them to add additional functionality.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the video_player platform interface and app-facing API, then compare the federated options and extension pattern used by webview_flutter. Done means the generic options and extension classes are exposed at the app-facing layer and Android and iOS implementations can subclass them for platform-specific configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
api, mobile
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.