background_runtime_macos 0.1.1 copy "background_runtime_macos: ^0.1.1" to clipboard
background_runtime_macos: ^0.1.1 copied to clipboard

PlatformmacOS

macOS implementation of the background_runtime plugin.

background_runtime_macos #

macOS implementation of the background_runtime Flutter plugin.

Uses Swift, Background URLSession, and AVPlayer.

Supports macOS 12.0+.

Capabilities #

  • Downloads: Background URLSession with download/resume task APIs. Progress callbacks via EventChannel.
  • Audio playback: AVPlayer (streaming, async). addPeriodicTimeObserver for drift-free progress. KVO on AVPlayerItem.status for ready/failed state.
  • Notifications: Control center / Touch Bar integration via MPNowPlayingInfoCenter with album art (MPMediaItemPropertyArtwork). MPRemoteCommandCenter handles Previous/Next/Play/Pause/Stop.
  • Notification actions: Command events mapped to NotificationAction enum and sent to Dart via notificationActionEvents EventChannel.
  • Permissions: Audio permission requested on main thread when enableAudio is enabled.