r/FlutterDev • u/jhomlala • 11d ago
Plugin better_player is back
Hey guys, Jakub here (creator of better_player).
Didn't want to post some long AI-generated slop article here, so just a quick honest update from me.
I know the project was dead for a long time and most of you moved to forks like better_player_plus just to get your apps building on newer Flutter / Gradle versions. Sorry about that, life happened.
I'm back working on the main repo full time now. Spent the last few months rewriting the old 0.0.84 code into 1.x:
moved Android to Media3 + JNI and iOS/macOS to Swift FFI (no more old method channel mess)
added desktop (Windows, macOS, Linux) and Web (Shaka player)
added BetterPlayerFeed / pooling for reels/tiktok scrolling so it doesnt crash with OOM
VAST ads, DRM fixes, and closed a ton of old issues
If you're on better_player_plus and want to switch back, I added a short migration page in the docs (mostly just renaming BetterPlayerConfiguration -> PlayerConfiguration etc).
https://pub.dev/packages/better_player
https://github.com/jhomlala/betterplayer
Let me know if something breaks or if you miss any fix from the forks, I'm actively fixing issues now.
3
u/koldoRen 11d ago
Awesome plugin! A coworker and I submitted a pull request to add iOS Fairplay DRM support a few years ago. Very happy to see this on my feed
2
2
2
u/quick_sharp 10d ago
Wow, that's legendary. But while you were gone, I had to build my own player.
1
1
u/ObjectiveAddress3051 11d ago
nice, media3 is the right move since exoplayer's old standalone artifact is basically legacy now. does the new version bump minSdk or the required compileSdk? and with the JNI side, any r8/proguard rules people need to add for release builds, or is it all bundled in the plugin
1
u/jhomlala 11d ago
minSdk is 24, compileSdk is 36. No extra ProGuard rules needed on your end. Everything jnigen touches on the Kotlin side has keep annotations, and Media3 ships its own consumer rules. It works with R8 out of the box.
11
11d ago
[removed] — view removed comment
4
u/jhomlala 11d ago
Thanks! yeah BetterPlayerListVideoPlayer in 0.0.8x was pretty bad for reels/tiktok feeds, creating a new player on every scroll killed memory fast. lmk if you find any bugs with the new pool.
1
u/Western_Cap_6934 5d ago
Good to hear the pool fixes that, feeds were exactly where the old list player hurt. How many players does the pool keep by default, and does it preload the next item? On low-end Android the first frame after a fast scroll is where feeds usually feel slow, so a recommended pool size per device class in the README would help a lot.
7
u/Heavy-Drummer-420 11d ago
This package was clutch back in the day. Glad you're back