wang-bin / fvp

Flutter video player plugin for all desktop+mobile platforms. download prebuilt examples from github actions. https://pub.dev/packages/fvp
BSD 3-Clause "New" or "Revised" License
197 stars 31 forks source link

Use in conjunction with other video_player implementation #170

Closed Bonfra04 closed 1 month ago

Bonfra04 commented 1 month ago

Describe the bug I'd like to use FVP only for Linux builds. For MacOS I'm fine with the default video_player implementation so i can just not include it in the register_with call. For Windows, instead, I'm trying to experiment with the video_player_win package; this is sadly not possible since FVP implements all the interfaces at once, leading to the following error:

Plugin video_player:windows has conflicting direct dependency implementations:
  fvp
  video_player_win
To fix this issue, remove all but one of these dependencies from pubspec.yaml.

Please resolve the plugin implementation selection errors

Expected behavior Some way to be more specific about which platform to include plugin-wise.

wang-bin commented 1 month ago

both fvp and video_player_win implement video_player, you must choose one, I can do nothing. you can also report to flutter team.

Bonfra04 commented 1 month ago

Maybe is possible to split fvp into a main core and some "addons" like fvp_windows, fvp_linux and so on, and one includes only the needed ones? idk maybe its just too complicated and out of scope

wang-bin commented 1 month ago

Maybe is possible to split fvp into a main core and some "addons" like fvp_windows, fvp_linux and so on, and one includes only the needed ones? idk maybe its just too complicated and out of scope

then the project will not be maintainable, because about 95% code are the same, the only difference is rendering code. what if a plugin supports all platforms and share the same code? i think it's a flaw of flutter. you can fork the repo and modify pubspec.yml to keep only linux platform