Skip to content
CAI
Software that uses CAICheck a score

jhomlala/betterplayer

67.1

Adequate · 5 November 2026

39.4k

lines of production code

Dart

with Swift

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add web platform implementation for Better Player

This change introduces the web-specific implementation for the Better Player plugin, enabling video playback in Flutter web applications. The new code registers a platform view that integrates the Shaka Player library to handle media streaming, including support for adaptive bitrate streaming, audio track selection, text (subtitle) track management, and Picture-in-Picture mode. It exposes standard playback controls (play, pause, seek, volume, speed) and emits video events (buffering, completion, errors) to the Flutter layer, while explicitly marking features like pre-caching and audio mixing as unsupported on the web platform.

_packages/better\_player\web/lib · high confidence

Android native layer migrated to Media3 with configurable DRM and caching

The Android native implementation has been rewritten to use the AndroidX Media3 library, replacing the previous ExoPlayer version. This update introduces configurable DRM security levels (supporting Widevine and ClearKey), a robust background caching system using AndroidX WorkManager, and improved event handling via a queuing event sink to prevent race conditions. Users benefit from more reliable playback, support for protected content, and background pre-caching capabilities.

_packages/better\_player\android/android · high confidence

Better Player platform interface establishes federated architecture and adds pre-cache, DRM, and caption capabilities

This release introduces the \better\_player\_platform\_interface\ as the central contract for the federated plugin architecture, consolidating core models and replacing the legacy \MethodChannelVideoPlayer\ with a modern FFI/JNI implementation. Users gain access to configurable DRM security levels (Widevine L1 on Android, video robustness on Web) via \DrmConfiguration\, and can now select or disable native text and caption tracks using the new \setTextTrack\ method and \captionUpdate\ event. Pre-caching is enhanced with a \PreCacheProgress\ model and a broadcast \preCacheProgressStream\ to report download progress, while playback speed limits are extended to 4.0x. Additionally, \DurationRange\ calculations are guarded against zero or negative durations to prevent NaN exceptions, and a native-to-Dart log streaming system is exposed via \setupLogCallback\.

_packages/better\_player\_platform\interface · high confidence

Major 1.x release with federated architecture and new platform support

Better Player has been upgraded to version 1.x.x, introducing a federated plugin architecture that adds official support for macOS and Windows platforms alongside existing Android, iOS, and Web capabilities. The package has migrated to a new API surface using \PlayerConfiguration\, \PlayerDataSource\, and \PlayerControlsConfiguration\ classes, replacing the legacy \BetterPlayerConfiguration\ and \BetterPlayerDataSource\ structures. This release also includes native HLS/DASH support, DRM protection (Widevine, FairPlay, ClearKey), advanced subtitle parsing (WebVTT, TTML, SRT), and built-in video caching. Users migrating from version 0.0.84 or earlier should consult the provided migration guides to update their configuration and data source initialization code.

(repo-wide) · high confidence

iOS implementation migrated to Swift with native caching and DRM support

The iOS native layer for Better Player has been rewritten in Swift, replacing the previous implementation. This update introduces a new \BetterPlayer\ core class and a \BetterPlayerApi\ for managing player instances and events, alongside a \CacheManager\ that enables media pre-caching and offline playback support. The migration also adds native EZDRM license handling via \BetterPlayerEzDrmAssetsLoaderDelegate\ and includes a \PrivacyInfo.xcprivacy\ manifest to comply with modern iOS privacy requirements.

_packages/better\_player\ios/ios · high confidence

Architecture

Android package extraction and JNI migration

The Android implementation has been extracted into a standalone federated plugin package (\better\_player\_android\), decoupling it from the core package. The native bridge has been migrated to JNI using \jnigen\ for high-performance direct communication with the Android media engine, replacing the previous method channel approach. This change includes a new \.pubignore\ file to exclude internal FFI testing examples and JNI generation tools from published artifacts, and a README clarifying that this package is an internal implementation detail for the main \better\_player\ plugin.

_packages/better\_player\android · high confidence

Behavioural changes

10 commits (2 fixes) modifying scripts

A change to existing behaviour in scripts — 10 commits (2 fixs), 9 files: “feat(macos): scaffold better\_player\_macos package (\#1580)”; “fix(ios): resolve simulator black screen and hot restart crash (\#1632) (\#1634)”; “feat(airplay): implement native AirPlay, remote playback, and pluggable casting architecture (\#1633)”; and 7 more (refs \#1580, \#1632, \#1634, \#1633, \#1525, …).

scripts · medium confidence · unverified

14 commits (4 fixes) modifying packages/better\_player\_ios/lib

A change to existing behaviour in packages/better\_player\_ios/lib — 14 commits (4 fixs), 1 file: “fix: port community PR fixes (\#866, \#872, \#990, \#1041, \#1135, \#1206) (\#1578)”; “Feature/ffi migration (\#1487)”; “fix(ios): resolve simulator black screen and hot restart crash (\#1632) (\#1634)”; and 11 more (refs \#866, \#872, \#990, \#1041, \#1135, …).

_packages/better\_player\ios/lib · medium confidence · unverified

2 commits (0 fixes) modifying packages/better\_player\_android/example\_ffi, packages/better\_player\_ios/example\_ffi

A change to existing behaviour in packages/better\_player\_android/example\_ffi, packages/better\_player\_ios/example\_ffi — 2 commits, 67 files: “Feature/ffi migration (\#1487)”; “refactor: modernize analysis options and resolve lints across platform packages and core (\#1641)” (refs \#1487, \#1641).

_packages/better\_player\_android/example\_ffi, packages/better\_player\_ios/example\ffi · medium confidence · unverified

25 commits (6 fixes) modifying packages/better\_player\_macos

A change to existing behaviour in packages/better\_player\_macos — 25 commits (6 fixs), 21 files: “feat(macos): scaffold better\_player\_macos package (\#1580)”; “chore: prepare release 1.26.0 (\#1613)”; “chore: prepare release 1.20.0 (\#1582)”; and 22 more (refs \#1580, \#1613, \#1582, \#1594, \#1640, …).

_packages/better\_player\macos · medium confidence · unverified

41 commits (16 fixes) modifying packages/better\_player\_ios

A change to existing behaviour in packages/better\_player\_ios — 41 commits (16 fixs), 7 files: “fix: port community PR fixes (\#866, \#872, \#990, \#1041, \#1135, \#1206) (\#1578)”; “Feature/ffi migration (\#1487)”; “Fix iOS player seek crash/freeze (\#1342) and add E2E tests (\#1550)”; and 38 more (refs \#866, \#872, \#990, \#1041, \#1135, …).

_packages/better\_player\ios · medium confidence · unverified

6 commits (2 fixes) modifying packages/better\_player\_windows/lib

A change to existing behaviour in packages/better\_player\_windows/lib — 6 commits (2 fixs), 1 file: “feat: add embedded closed captions (CEA-608 / CEA-708) support across… (\#1594)”; “fix(windows): resolve critical stability issues and feature parity gaps (\#1626)”; “feat(windows): scaffold better\_player\_windows package (\#1583)”; and 3 more (refs \#1594, \#1626, \#1583, \#1614, \#1622, …).

_packages/better\_player\windows/lib · medium confidence · unverified

7 commits (3 fixes) modifying packages/better\_player\_windows/lib/src

A change to existing behaviour in packages/better\_player\_windows/lib/src — 7 commits (3 fixs), 2 files: “feat: add embedded closed captions (CEA-608 / CEA-708) support across… (\#1594)”; “refactor: modernize analysis options and resolve lints across platform packages and core (\#1641)”; “fix(windows): resolve critical stability issues and feature parity gaps (\#1626)”; and 4 more (refs \#1594, \#1641, \#1626, \#1583, \#1623, …).

_packages/better\_player\windows/lib/src · medium confidence · unverified

Android player implementation migrated to JNI

The Android platform implementation for Better Player has been rewritten to use the \jni\ and \jni\_flutter\ packages instead of the previous method channel approach. This change introduces a new \BetterPlayerAndroid\ class that registers itself as the platform instance and manages video playback through direct Java Native Interface bindings, including auto-generated JNI wrappers for the native Android player API. Users benefit from a more robust and extensible native integration, which supports features like configurable logging callbacks and direct event streaming from the native layer to Dart. Also in this area: Pre-cache download progress reporting on Android, iOS, and macOS.

_packages/better\_player\android/lib · high confidence

Better Player v1.x API standardization and migration support

The \better\_player\ package has been updated to version 1.x, introducing a standardized naming convention where internal classes and utilities now use the \Player\ prefix (e.g., \PlayerConfiguration\, \PlayerDataSource\, \PlayerControlsConfiguration\) instead of the legacy \BetterPlayer\ prefix. To assist with this breaking change, the package includes a \fix\_data.yaml\ file that enables automated migration via \dart fix --apply\. This release also introduces a federated plugin architecture, adding native support for macOS (via \better\_player\_macos\) and Windows (via \better\_player\_windows\), while modernizing the Material and Cupertino UI controls and adding support for TTML subtitles and configurable DRM security levels. Also in this area: Better Player version 1.27.0 release; Pre-cache download progress reporting on Android, iOS, and macOS; Controls remain hidden at startup when showControlsOnInitialize is false; Fixes for web controls, settings menu, and about dialog stability.

_packages/better\player · high confidence

Fixes

4 commits (3 fixes) fixing packages/better\_player\_windows/windows

A fix in packages/better\_player\_windows/windows — 4 commits (3 fixs), 8 files: “fix(windows): resolve critical stability issues and feature parity gaps (\#1626)”; “feat(windows): scaffold better\_player\_windows package (\#1583)”; “fix: resolve desktop deadlocks, race conditions, listener leaks, and clean up recent merges (\#1636)”; and 1 more (refs \#1626, \#1583, \#1636, \#1608).

_packages/better\_player\windows/windows · medium confidence · unverified

Test coverage

11 commits adding/updating tests in packages/better\_player\_ios/test; 6 commits adding/updating tests in packages/better\_player\_windows/test; 6 commits adding/updating tests in packages/better\_player\_windows/test/mpv; Add Playwright E2E tests for web player functionality; Added unit tests for the Android platform implementation; Example app scaffolding and macOS/Windows E2E test suites; Initial test suite for Better Player Web.

Dependencies

Scaffold federated plugin packages and workspace structure

The project is restructured into a Dart workspace containing the core \better\_player\ package and its platform-specific implementations (\better\_player\_android\, \better\_player\_ios\, \better\_player\_macos\, \better\_player\_windows\, \better\_player\_web\, and \better\_player\_platform\_interface\). This change introduces the initial \pubspec.yaml\ files for these packages, establishing version constraints (e.g., Android 1.7.0, iOS 1.6.0) and dependencies such as \jni\ for Android and \ffi\/\objective\_c\ for iOS/macOS. It also includes the root workspace definition, example app configurations, and native build files (Gradle, Podspecs, Package.swift) to support the federated plugin architecture.

(dependencies) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 67 (+1.5)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.

Lenses

  • Code Health 72 → 72 (-0.6)
  • Architecture 95 → 95 (+0.1)
  • Maturity 61 → 61 (-0.0)
  • Readiness 64 → 65 (+1.0)
  • Security 64 → 75 (+10.5)
  • Performance 100 → 100 (+0.0)

Resolved (103)

  • Change coupling: player_cupertino_controls.dart ↔ player_material_controls.dart (packages/better_player/lib/src/controls/player_cupertino_controls.dart)
  • Change coupling: player_cupertino_progress_bar.dart ↔ player_material_controls.dart (packages/better_player/lib/src/controls/player_cupertino_progress_bar.dart)
  • Change coupling: player_cupertino_progress_bar.dart ↔ player_with_controls.dart (packages/better_player/lib/src/controls/player_cupertino_progress_bar.dart)
  • Duplicate cache clearing operations. Both BetterPlayerApi and CacheManager expose a clearCache() method. Since CacheManager is a singleton (shared property) and BetterPlayerApi manages the plugin state, calling clearCache on one may not affect the other if they are not properly linked, or it creates confusion about which manager is the source of truth for cache state.
  • Duplicate caching operations with different signatures. BetterPlayerApi exposes a high-level preCache method that likely delegates to CacheManager, but CacheManager also exposes preCacheURL directly. This creates two entry points for the same logical operation (pre-caching a URL) with different parameter types (String vs URL) and potentially different internal logic or caching key handling.
  • Duplicate pre-cache stopping operations. Similar to preCache, both the API layer and the CacheManager layer expose stopPreCache. This redundancy can lead to inconsistent state if one is called but not the other, or confusion for developers about which method to invoke.
  • Duplicated block (11 lines × 2) (packages/better_player_example/lib/pages/welcome_page.dart)
  • Duplicated block (126 lines × 2) (packages/better_player_ios/lib/better_player_ios.dart)
  • Duplicated block (14 lines × 2) (packages/better_player_windows/lib/src/mpv/mpv_player.dart)
  • Duplicated block (19 lines × 2) (packages/better_player_windows/lib/src/mpv/mpv_player.dart)
  • Duplicated block (20 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (21–22 lines × 2) (packages/better_player/lib/src/controls/player_cupertino_progress_bar.dart)
  • Duplicated block (24 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (32–33 lines × 2) (packages/better_player/lib/src/controls/player_cupertino_progress_bar.dart)
  • Duplicated block (5 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (6 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (6 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (7 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (7 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (7 lines × 2) (packages/better_player_windows/lib/src/mpv/mpv_player.dart)
  • …and 83 more

New (154)

  • BetterPlayer.setDataSourcePlayerItem (cognitive 32) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • BetterPlayer.setDataSourcePlayerItem (cyclomatic 18) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • BetterPlayer.setDataSourcePlayerItem (cyclomatic 18) (packages/better_player_macos/macos/better_player_macos/Sources/better_player_macos/BetterPlayer.swift)
  • BetterPlayer.startStalledCheck (cognitive 17) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • BetterPlayerFeedController.insertDataSources (cognitive 21) (packages/better_player/lib/src/list/better_player_feed_controller.dart)
  • BetterPlayerFeedController.onIndexChanged (cognitive 30) (packages/better_player/lib/src/list/better_player_feed_controller.dart)
  • BetterPlayerFeedController.onIndexChanged (cyclomatic 17) (packages/better_player/lib/src/list/better_player_feed_controller.dart)
  • BetterPlayerIOS.cleanupOrphanedPlayers (cognitive 22) (packages/better_player_ios/lib/better_player_ios.dart)
  • BetterPlayerPool._performBindSlot (cognitive 37) (packages/better_player/lib/src/list/better_player_pool.dart)
  • Change coupling: player_cupertino_controls.dart ↔ player_material_progress_bar.dart (packages/better_player/lib/src/controls/player_cupertino_controls.dart)
  • Change-coupling hub: player_material_controls.dart → player_cupertino_controls.dart, player_cupertino_progress_bar.dart, player_material_progress_bar.dart (packages/better_player/lib/src/controls/player_material_controls.dart)
  • ClassTooLong: BetterPlayerIOS (packages/better_player_ios/lib/better_player_ios.dart)
  • ClassTooLong: MpvPlayer (packages/better_player_linux/lib/src/mpv/mpv_player.dart)
  • Duplicated block (10 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayer.swift)
  • Duplicated block (10 lines × 2) (packages/better_player_ios/ios/better_player_ios/Sources/better_player_ios/BetterPlayerApi.swift)
  • Duplicated block (10 lines × 2) (packages/better_player_linux/lib/better_player_linux.dart)
  • Duplicated block (10 lines × 2) (packages/better_player_linux/lib/better_player_linux.dart)
  • Duplicated block (10 lines × 2) (packages/better_player_linux/lib/better_player_linux.dart)
  • Duplicated block (10 lines × 2) (packages/better_player_linux/lib/better_player_linux.dart)
  • Duplicated block (10 lines × 2) (packages/better_player_linux/lib/better_player_linux.dart)
  • …and 134 more

Changes since last survey

  • 20 commits — 14 feature/other, 6 fixes

By area

  • packages/better_player — 8 commits
  • packages/better_player_macos — 4 commits
  • packages/better_player_example — 3 commits
  • packages/better_player_windows — 2 commits
  • e2e/maestro — 1 commit
  • packages/better_player_ios — 1 commit
  • packages/better_player_linux — 1 commit

Notable commits

  • fix: fix(ios): resolve simulator black screen and hot restart crash (#1632) (#1634)
  • fix: fix(windows): resolve critical stability issues and feature parity gaps (#1626)
  • fix: fix: bump better_player_web and windows for platform interface 1.5.0 … (#1624)
  • fix: fix: resolve critical Dart layer crashes, data loss, and resource leaks (#1625)
  • fix: fix: resolve desktop deadlocks, race conditions, listener leaks, and clean up recent merges (#1636)
  • fix: test(e2e): fix mobile CI workflows and expand local file and macos coverage (#1629)
  • change: chore: prepare release 1.28.0 (#1627)
  • change: chore: prepare release 1.30.0 (#1631)
  • change: chore: prepare release 1.31.0 (#1638)
  • change: chore: prepare release 1.32.0 (#1639)
  • change: chore: prepare release 1.33.0 (#1643)
  • change: chore: switch macOS runner to macos-latest (#1623)
  • change: docs: enhance SEO, llms.txt, and migration guides from forks (#1630)
  • change: feat(airplay): implement native AirPlay, remote playback, and pluggable casting architecture (#1633)
  • change: feat(feed): add error state recovery, list mutations, and QoE metrics (#1642)
  • change: feat(linux): implement better_player_linux with libmpv, FlPixelBufferTexture, and integration tests (#1628)
  • change: feat(security): add screen capture protection hooks and extension ove… (#1622)
  • change: refactor: modernize analysis options and resolve lints across platform packages and core (#1641)
  • change: test(e2e): expand pooled feed render verification flows to Android, Web, and Desktop (#1635)
  • change: test: add unit tests for core extensions and enable strict lints (#1640)

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

jhomlala/betterplayer was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 5 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit d9438b37c494641e007626d7b39f9224a8655487 — the exact code this score is about.
  • Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.