Skip to content

Releases: plug-and-pay/flutter-native-video-player

v1.4.0 — embedded caption text-size scaling

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 02 Jul 08:29
d7f0d61

Added

  • Embedded caption text-size scaling (#43): NativeVideoPlayerSubtitleStyle.embeddedTextScale (default 1.0 = platform default) and the convenience method controller.setNativeSubtitleTextScale(double) scale the text size of EMBEDDED (native-rendered) subtitle tracks — ExoPlayer's SubtitleView on Android (both the lightweight and PlayerView display paths), AVPlayerItem.textStyleRules on iOS. Takes effect live without a playback restart, survives quality/audio/variant switches, item reloads, and native view recreation, and scales relative to the user's system caption size preference. Sidecar overlay sizing (subtitleStyle.fontSize) is unaffected.

v1.3.1 — iOS Swift Package Manager build fix

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 24 Jun 12:19

iOS Swift Package Manager build fix

Fixes a build failure on iOS when the host app uses Flutter's Swift Package Manager integration (issues #36, #42):

Swift Compiler Error: Cannot find 'npLog' in scope
.../ios/better_native_video_player/Sources/better_native_video_player/View/VideoPlayerView.swift

Root cause

The plugin ships two parallel iOS source trees. CocoaPods compiles everything under ios/Classes/ (s.source_files = 'Classes/**/*.swift'), while the SwiftPM target (ios/better_native_video_player) symlinks each subdirectory of Classes/ into its Sources/ folder. Logging.swift — which defines npLog and is the only file at the top level of Classes/ — had no symlink, so it was excluded from the SwiftPM target. Any call site then failed to compile under a SwiftPM build. CocoaPods builds were never affected.

Fix

Added the missing Logging.swift symlink to the SwiftPM target. Verified by building the example app on an iOS simulator with flutter config --enable-swift-package-manager: it fails with the reported error before the change and builds cleanly after.

Upgrading

Bump to better_native_video_player: ^1.3.1. If you hit this on 1.3.0, also clear caches after upgrading — SwiftPM caches in DerivedData, or cd ios && pod deintegrate && pod install for CocoaPods.

Full changelog: https://github.com/plug-and-pay/flutter-native-video-player/blob/master/CHANGELOG.md

v1.3.0 — quality audio fix, qualityChangedStream, Android background playback

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 23 Jun 13:03

Quality-selection and Android background-playback fixes.

Fixed

  • Quality switching no longer drops audio (iOS + Android). Selecting an HLS quality — or switching back to Auto — previously reloaded a single video-only variant playlist, replacing the master. On adaptive streams that carry audio as a separate rendition (#EXT-X-MEDIA:TYPE=AUDIO), that silenced the audio while video kept playing. The plugin now keeps the master loaded and constrains the video track via the player's track selector (preferredMaximumResolution/preferredPeakBitRate on iOS, setMaxVideoSize/setMaxVideoBitrate on Android), so audio is untouched and the switch is instant (no buffering reload). (#40)
  • qualityChangedStream now emits the selected quality. Native emits the quality fields flat in the event map, but the Dart handler only accepted a nested quality key, so the stream stayed silent and any UI bound to it was stuck on "Auto". The handler now accepts both shapes. (#39)
  • iOS: position/time updates no longer stop when Auto quality is enabled. The old auto-quality monitor reused the shared periodic time observer that drives timeUpdate, clobbering position reporting. The monitor is removed — AVPlayer's native ABR handles Auto. (#40)
  • Android: background playback (live + VOD) no longer dies after a few minutes. The plugin posted a media notification but never ran a real foreground service, so Doze/App-Standby cut the app's network and ExoPlayer failed with UnknownHostException. Playback now runs as a real foreground service while playing (stopped on pause/stop), and the shared player uses setWakeMode(WAKE_MODE_NETWORK) (partial WakeLock + WifiLock). Adds the WAKE_LOCK permission to the plugin manifest. (#38)

Full Changelog: v1.2.1...v1.3.0

v1.0.0

Choose a tag to compare

@DaniKemper010 DaniKemper010 released this 11 Jun 10:45

What's Changed

New Contributors

Full Changelog: https://github.com/plug-and-pay/flutter-native-video-player/commits/v1.0.0