better_player_ios 1.16.0
better_player_ios: ^1.16.0 copied to clipboard
The iOS implementation of the better_player plugin, providing high-performance video playback using AVPlayer and FFI for seamless integration in Flutter apps.
1.16.0 #
- Fixed: Dispatched
URLSessiondelegate callbacks to.maininCachingPlayerItemto eliminate race conditions betweenAVAssetResourceLoaderand background download delegates. - Fixed: Cleaned up stuck
AVPlayerLayeron Picture in Picture start failure, and added audio session interruption and route change observers to pause playback on disconnect or incoming calls. - Fixed: Safely handled content-info-only probe requests in
CachingPlayerItemto prevent nil force-unwrap crashes, rejected non-2xx HTTP responses from disk cache, boundedCacheManagermemory cache, and forwarded HTTP headers inpreCache. - Fixed: Prevented stall recovery and
seekTocompletion from resuming paused or disposed players. - Fixed: Bypassed
CacheManagerfor FairPlay DRM streams whenuseCacheis enabled and forwarded custom HTTP headers to FairPlay certificate and license requests. - Fixed: Prevented Release dead-code stripping of
BetterPlayerLogCallback, corrected Swift Package Manager target dependency direction betweenbetter_player_iosandbetter_player_ios_objc, and declaredhyperoslo/Cacherequired-reason APIs inPrivacyInfo.xcprivacy. - Fixed: Added
translatesAutoresizingMaskIntoConstraints = falseand iOS 17+ sublayer lookup for screen capture protection.
1.15.0 #
- Fixed: Restored iOS media playback notifications and Lock Screen and Control Center controls via
MPNowPlayingInfoCenterandMPRemoteCommandCenter(#1660). - Fixed: Audio muted on iPhone when hardware Silent switch is active by configuring
AVAudioSessioncategory to.playbackand activating the audio session on playback (#1663). - Fixed: Uncached sources now honor
videoExtensionthrough the publicAVURLAssetOverrideMIMETypeKeyon iOS 17+, so files without an extension can play. The MIME type comes from the existingCacheManagerlookup (by @Henry-Hiles).
1.14.0 #
- Fixed: Video stutters when it resumes from Picture in Picture, and a video paused from the PiP controls can resume on its own. The stall check and
updatePlayingStateno longer forceplayImmediately(atRate:)while AVKit plays or buffers in PiP, andisPlayingnow follows the PiP play and pause controls (by @Marionetista). - Added:
FlutterFrameworkdependency toPackage.swiftfor Swift Package Manager support (by @hellohuanlin). - Updated: Bumped
better_player_platform_interfaceconstraint to^1.8.0to resolve constructor compatibility during dependency lower-bound analysis.
1.13.0 #
- Added:
getAudioTracksimplementation to query audible options on AVPlayer's current media asset. - Updated: Increased playback speed ceiling from
4.0to10.0insetSpeed.
1.12.0 #
- [BREAKING_CHANGE] Fixed: Resolved FairPlay key loading thread deadlocks by removing blocking
DispatchSemaphore, madeassetIdstrictly local per request to prevent race conditions, added thread-safe certificate caching with in-flight request deduplication, and scoped EZDRM URL path rewriting to EZDRM domains only. Non-EZDRM license servers now receive standard direct POST requests. - Fixed: CacheManager shared state race condition during concurrent pre-caching and dynamic maxCacheSize updates.
1.11.1 #
- Updated: Modernized
analysis_options.yamlto inherit root options and resolved static analysis lints.
1.11.0 #
- Added: Native AirPlay route picker (
AVRoutePickerView) andexternalPlaybackActiveKVO state stream. - Updated: Bumped
better_player_platform_interfacedependency to^1.7.0.
1.10.1 #
- Fixed: Kept KVO and legible output observers attached on playback completion and updated
isPlayingstate so replay and post-completion seeks remain functional. - Fixed: Implemented secure screen capture and recording protection on window layer using
UITextField.isSecureTextEntryhierarchy. - Fixed: Ensured screen capture protection is disabled on plugin cleanup.
- Fixed: Resolved black screen on iOS Simulator by returning stable
FlutterPlatformViewinstances per platform view ID, skippingAVMutableVideoCompositionfor unrotated videos, and resolving video track dimensions before presentation size checks (#1632). - Fixed: App crash on hot restart by using asynchronous listener callbacks (
implementAsListener), dispatching KVO observer updates to the main thread, trackingobservedItemfor observer removal, and cleaning up orphaned native players on initialization (#1632).
1.10.0 #
- Added: Screen capture and recording protection via secure text field view hierarchy and
UIScreen.capturedDidChangeNotification. - Updated: Dependency
better_player_platform_interfaceto^1.6.0.
1.9.0 #
- Fixed: Forwarded data source HTTP headers to native iOS playback, with and without caching (by @by291).
- Added: Native pre-cache progress reporting in
CacheManagerviaBetterPlayerPreCacheCallback.
1.8.0 #
- Fixed: Added fallback matching by displayName, language, and index in
setAudioTrackto support HLS audio tracks lacking common title metadata.
1.7.0 #
- Added:
setTextTrackmethod onBetterPlayerto select or disable legible media selection group tracks inAVPlayerItem(#1066). - Added:
AVPlayerItemLegibleOutputpush delegate andonCuescallback onBetterPlayerCallbackemitting parsed subtitle cues. - Fixed: Forwarded dynamic presentation size changes to Flutter to resolve black screen on HLS playback with delayed track resolution (#1595).
1.6.1 #
- Added: Better Player logo screenshot and branding metadata for pub.dev package listing.
1.6.0 #
- Fixed: Guarded
getAbsolutePositionagainst out-of-range epoch values on live streams (#1206) (by @RtypeStudios). - Fixed: Forwarded
videoExtensionascustomFileExtensionwhen creating uncachedCachingPlayerIteminstances inCacheManager(#990) (by @ajzome). - Fixed: Passed
assetIdinstead of the full URL string ascontentIdentifierinBetterPlayerEzDrmAssetsLoaderDelegate(#866) (by @aeonmine).
1.5.2 #
- Fixed: Disabled automatic native closed caption selection (
appliesMediaSelectionCriteriaAutomatically = false) onAVPlayerto prevent duplicate subtitles on iOS (#1103).
1.5.1 #
- Fixed: Reset
isInitializedwhen swappingAVPlayerItemdata sources so the new stream emitsonInitializedproperly.
1.5.0 #
- Fixed: Blocked HLS pre-caching attempts. Pre-caching HLS streams natively caches only the playlist file (causing silent bypasses on iOS).
- Updated: Documented the fallback to
mp4inCacheManagerfor streams with unknown extensions. - Fixed: Enhanced error logging to include
NSErrordetails inFlutterErrorpayload forAVPlayerItemfailures. - Fixed: iOS player crash and freeze during seek operations (#1342).
1.4.0 #
- Updated: Increased playback speed limit to 4x and improved audio quality at high speeds using
.timeDomainpitch algorithm. - Fixed: Programmatic PiP dismissal no longer stops the parent media player.
1.3.1 #
- Updated: package metadata
1.3.0 #
- Fixed: Resolved a race condition where video duration was reported as zero on iOS for non-live sources.
- Fixed: Resolved CocoaPods build issues including protocol loading exceptions, static linking stripping, and podspec alignments.
1.2.0 #
- Added: Support for native-to-Dart log streaming (
setupLogCallback) via FFI for AVPlayer. - Added: Reintroduced
exampledirectory with documentation to the package. - Updated: Enhanced package description in
pubspec.yamlfor better discoverability.
1.1.0 #
- Added: Migrated native implementation to Swift FFI using
swiftgen, enabling directAVPlayerinteraction without MethodChannel overhead.
1.0.2 #
- Docs: Updated model name references in example.md.
1.0.1 #
- Add thin examples to platform packages and decoupled example app.
1.0.0 #
- Updated: Extracted iOS native code from the core package into a standalone federated plugin package (
better_player_ios). - Fixed: Restored remote notification (lock screen) controls by correctly storing data source information.
