Video playback that doesn't fight the mobile OS
Official video_player leaves you stitching UI, caching, and subtitles together yourself. Bundling libmpv bloats your mobile app by 30 to 50 MB per ABI. Better Player talks directly to the hardware media engines already built into the OS.
We replaced legacy Objective-C and ExoPlayer 2 with a federated 1.x architecture. Android runs on AndroidX Media3 via JNI. iOS and macOS run on AVPlayer in Swift with Swift Package Manager (SPM). Web runs on Shaka Player with WASM support, and Windows uses libmpv.
Building vertical swipe feeds or video timelines? BetterPlayerFeed and BetterPlayerPool recycle a bounded pool of native player instances with lookahead preloading so scrolling feeds never exhaust hardware decoders.
Protect streams with Widevine L1/L3, FairPlay, and ClearKey. Render styled SRT, WebVTT, TTML, and CEA-608/708 captions, cache segments to disk, and rely on Maestro and Playwright E2E test suites on every commit.
// Bounded decoder pool (3 instances) with lookahead preloading
final feedController = BetterPlayerFeedController(
dataSources: videoUrls.map((url) {
return PlayerDataSource(
DataSourceType.network,
url,
useAsmsTracks: true,
cacheConfiguration: const CacheConfiguration(
useCache: true,
maxCacheSize: 200 * 1024 * 1024,
),
);
}).toList(),
poolConfiguration: const PlayerPoolConfiguration(
poolSize: 3,
preloadForward: 1,
preloadBackward: 1,
),
);
// Inside your build method:
BetterPlayerFeed(
controller: feedController,
configuration: PlayerFeedConfiguration(
scrollDirection: Axis.vertical,
placeholderBuilder: (context, index, source) =>
const Center(child: CircularProgressIndicator()),
),
);
Why teams migrate to Better Player 1.x
How Better Player stacks up against bundled desktop players and basic platform wrappers.
| Capability | Better Player 1.xRecommended | media_kit (libmpv) | video_player + chewie |
|---|---|---|---|
Underlying Engine Platform decoding architecture | ✓ Media3, AVPlayer, Shaka & libmpv Direct JNI & Swift FFI bridges | Bundled C/C++ libmpv Desktop-first engine | Basic OS player wrapper Standard platform channels |
App Size Overhead Impact on mobile build size | ~1–2 MB on mobile Native OS engines (libmpv on Windows) | +30 to 50 MB per ABI Bundles libmpv binaries on mobile | ~1–2 MB No extra binaries |
DRM (Widevine / FairPlay) Hardware content protection | ✓ Widevine L1/L3, FairPlay & ClearKey Native hardware enclave decryption | ✕ None No FairPlay or Widevine L1 enclave | ✕ None Requires custom native code |
Video Feeds & Pooling Vertical swipe feeds & lists | ✓ BetterPlayerFeed & BetterPlayerPool Bounded decoder pool & preloading | ✕ None Manual controller pooling required | ✕ None Exhausts hardware decoders in lists |
Subtitles & Captions Formatting & broadcast standards | ✓ SRT, WebVTT, TTML & CEA-608/708 XML styles, regions & HLS/DASH tracks | Advanced Libass subtitle rendering | Basic SRT only No WebVTT styling or TTML |
Smart Disk Caching Offline buffers & data savings | ✓ Built-in CacheConfiguration Offline disk cache & pre-caching | ✕ None No built-in cache manager | ✕ None 3rd-party plugin needed |
VAST / VMAP Video Ads Client-side ad scheduling | ✓ Pure-Dart VAST 2.0–4.3 & VMAP Zero native IMA SDKs, instant resume & fail-open | ✕ None No ad engine | ✕ None No ad engine |
Telemetry & QoE Startup latency, stalls & export | ✓ Real-Time QoE & Cloud Export TTFF, rebuffer ratio, Bitmovin, Mux & HTTP | ✕ None Raw property streams only | ✕ None Basic position & buffer state |
Background & PiP Lock screen & floating player | ✓ Native PiP & Notifications Lock screen controls on Android & iOS | Platform-dependent Requires external audio services | ✕ None No built-in PiP or media notification |
Open-source core + commercial VAST & telemetry extensions
Use the Apache 2.0 core on pub.dev for free, or add better_player_enterprise when you need client-side VAST/VMAP ads and real-time QoE video telemetry.
Better Player
better_playerThe complete video playback engine for Flutter across Android, iOS, macOS, Web, and Windows.
- Native OS Media Engines: AndroidX Media3 on Android, AVPlayer via Swift FFI on iOS and macOS, Shaka Player on Web (including WASM), and libmpv on Windows.
- Adaptive Streaming & Track Selection: HLS, DASH, and Smooth Streaming with multi-audio tracks, bitrate limits, and live stream scrubbing.
- Hardware DRM & Offline Caching: Widevine L1/L3, Apple FairPlay, and ClearKey DRM alongside configurable LRU disk caching and pre-caching.
- Pooled Video Feeds & Playlists: Built-in controller pooling with lookahead preloading for vertical video feeds so scrolling never exhausts hardware decoders.
- Broadcast Subtitles & Captions: SRT, WebVTT, TTML/DFXP (with XML styling and regions), and embedded CEA-608/708 closed captions.
- Picture-in-Picture & Media Controls: Native PiP mode, lock-screen Now Playing metadata, background audio, and customizable Material and Cupertino UI.
Better Player Enterprise
better_player_enterpriseClient-side VAST/VMAP ad engine and real-time QoE video telemetry for Better Player.
- VAST 2.0–4.x & VMAP 1.0 Scheduling: Pre-rolls, mid-rolls, post-rolls, recursive wrapper resolution, sequenced ad pods, and waterfall fallbacks in pure Dart.
- IAB Beacons & Privacy Macros: Quartile, progress, skip, and error tracking with automatic IAB macro substitution (
[IFA],[GDPRCONSENT],[USPRIVACY],[CACHEBUSTING]). - Companion Ads, AdChoices & Overlays: Companion banner parsing (image, IFrame, HTML), VAST icons, skip countdowns, and localized Material and Cupertino ad UI.
- Dual-Player Stack & Mid-Roll Pre-Warming: Pauses main video in memory while playing HLS/MP4 ads above it, pre-fetches upcoming mid-rolls, and fails open on ad timeouts.
- QoE Playback Metrics: Tracks Time to First Frame (TTFF), player init latency, rebuffer count and ratio, bitrate switches, completion rate, and exit-before-start.
- Bitmovin, Mux & HTTP Batch Exporters: Dispatches
heartbeat,rebuffer,qualityChange, andadBreakevents with offline persistence and exponential backoff.
Catch every HTTP call inside your app. No desktop proxy needed.
Stop squinting at truncated console logs or configuring Charles Proxy on test phones. Shake your device to inspect headers, payloads, timing, and errors directly inside your app.
Visualize staggered requests and spot what is blocking your app's startup sequence. Check total calls, average duration, slowest endpoints, and error ratios at a glance.
Resend any captured HTTP call directly from the detail screen to test auth token refreshes or flaky endpoints. Slice through logs with queries like status:500 or duration:200, and export full HAR files.
Automatically flags duplicate parallel calls and slow responses. Hooks into Dio, http, Chopper, GraphQL, and HttpClient in three lines of code.
// 1. Configure Alice 1.x and attach client adapters
final dioAdapter = AliceDioAdapter();
final alice = Alice(
configuration: AliceConfiguration(
showNotification: true,
showInspectorOnShake: true,
),
)..addAdapter(dioAdapter);
// 2. Hook into Dio or GraphQL
final dio = Dio()..interceptors.add(dioAdapter);
final gqlLink = Link.from([
AliceGraphQLLink(alice: alice, url: 'https://api.hasoft.pl/graphql'),
HttpLink('https://api.hasoft.pl/graphql'),
]);
// 3. Tag request flows or open inspector from code
alice.tag(tag: 'checkout-flow');
await dio.post('https://api.hasoft.pl/orders');
alice.clearTag();
Catcher: Automated Crash & Exception Reporting
Catch unhandled Flutter errors across Android, iOS, Web, and Desktop. Route stack traces and device metadata to Sentry, Crashlytics, Slack, Discord, or email.
Deep dives, benchmarks, and migration guides
Why bundling libmpv costs 30 to 50 MB per ABI on mobile, and how to switch your video stack to native OS engines in under 30 minutes.
Inside our move from ExoPlayer 2 and Objective-C to AndroidX Media3, Swift FFI, JNI, Shaka Player, and Maestro E2E testing.
A tour of Alice's Gantt Chart Timeline, one-tap Request Replay, Stats Dashboard, N+1 detection, and HAR export.
Need VAST ads, QoE telemetry, or an enterprise license?
Request a free evaluation key for staging or talk directly with the author of Better Player and Alice.