native_cache_video_player 0.1.12 copy "native_cache_video_player: ^0.1.12" to clipboard
native_cache_video_player: ^0.1.12 copied to clipboard

High-performance Flutter video player with native caching for Android and iOS.

0.1.12 #

  • Fix: Thread-safe event dispatch — all eventSink calls now dispatch to main thread with try-catch on both Android and iOS, preventing crashes from background thread callbacks.
  • Fix: Eliminated LegacyMessageQueue "dead thread" warnings on Android by reordering dispose sequence (remove listeners → pause → clear surface → stop → release).
  • Fix: Prevented audio focus interruptions — disabled handleAudioFocus on Android and set mixWithOthers on iOS so playback is never paused by other apps.
  • Fix: Broke CADisplayLink retain cycle on iOS using weak DisplayLinkProxy pattern.
  • Fix: Cache TTL support — added maxCacheAge config to expire old cached videos.
  • Fix: In-flight download deduplication to prevent double-fetching the same URL.
  • Fix: Metadata (.meta) files now cleaned up alongside cached video files on iOS.
  • Fix: Used ephemeral URLSession on iOS to avoid system HTTP cache conflicts.
  • Perf: Prioritized visible video initialization over adjacent preloads in example TikTok page.
  • Chore: Removed CocoaPods integration from example app — now fully Swift Package Manager.

0.1.11 #

  • Chore: Migrated Android to Built-in Kotlin support and restructured iOS Swift implementation.

0.1.9 #

  • Fix: Reduced aggressiveness of native memory purge (now keeps up to 2 inactive players alive instead of killing all paused players).
  • Fix: Plugin methods (like play) now return {"wasDisposed": true} instead of silently succeeding when called on a player that was already evicted by the memory manager. This allows the Dart side (isDisposed()) to correctly detect when a player was killed by memory pressure.

0.1.8 #

  • Fix: Resolve video appearing as black on slower devices where ExoPlayer's STATE_READY (Android) or readyToPlay (iOS) fires before the video decoder reports the actual frame dimensions. The initialized event now re-sends with correct width/height when the native size callback arrives after a 0×0 initialization.

0.1.7 #

  • Fix: Resolve MissingPluginException when disposing video players by correctly unregistering the EventChannel stream handler with the texture ID on both Android and iOS.

0.1.6 #

  • Chore: Bumped video_player dependency to ^2.11.1.

0.1.5 #

  • Fix: Resolved issue where setMixWithOthers was not propagated to existing player instances on Android and iOS. This ensures that audio focus settings are applied immediately to all active players.

0.1.4 #

  • Fix: Resolved java.lang.OutOfMemoryError on Android by properly unregistering the EventChannel stream handler when FLTVideoPlayer is disposed, allowing native ExoPlayer instances to be garbage collected.

0.1.2 #

  • New Feature: Added isDisposed() method to NativeCacheVideoPlayer to allow checking if the underlying native player has been evicted due to memory pressure or LRU cache limits.
  • Fix: Suppress position warnings when a player is already natively disposed.

0.1.1 #

0.1.0 #

  • Initial release of native_cache_video_player.
  • Core Features:
    • Simultaneous video download and caching.
    • LRU (Least Recently Used) cache management.
    • Background thread processing for cache operations.
  • Android: Implementation using Media3/ExoPlayer with CacheDataSource.
  • iOS: Implementation using AVFoundation with AVAssetResourceLoaderDelegate.
0
likes
160
points
46
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

High-performance Flutter video player with native caching for Android and iOS.

Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

flutter, video_player, video_player_platform_interface

More

Packages that depend on native_cache_video_player

Packages that implement native_cache_video_player