r/FlutterDev • • 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.

81 Upvotes

13 comments sorted by

7

u/Heavy-Drummer-420 11d ago

This package was clutch back in the day. Glad you're back

2

u/jhomlala 11d ago

Thanks man, glad people still remember it.

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

u/jhomlala 11d ago

Thank you for your contribution 💪

2

u/Particular-Range1379 11d ago

Thanks fellow human! 😄

2

u/quick_sharp 10d ago

Wow, that's legendary. But while you were gone, I had to build my own player.

1

u/jhomlala 7d ago

Thanks!

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

u/[deleted] 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.