-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Description
Summary
This design document describes adding system media notification support to the video_player plugin, enabling Flutter developers to display media controls on the lock screen, notification shade (Android), and Control Center (iOS/macOS) when playing video/audio in the background.
Design Doc
flutter.dev/go/video-player-media-notifications
Problem Statement
Flutter app developers building media applications expect video/audio playback to continue when the app is backgrounded, with system-level media controls that users are accustomed to from native apps.
Currently, while video_player supports basic background audio via allowBackgroundPlayback, there is no built-in way to:
- Display media metadata (title, artist, album art) on system UI
- Provide play/pause/seek controls from lock screen or notification shade
- Integrate with platform media session APIs
This forces developers to implement complex native code or use third-party packages for a feature that should be part of the core video player experience.
Proposed Solution
Add a new NotificationMetadata class and notificationMetadata parameter to VideoPlayerOptions that enables system media notifications when combined with allowBackgroundPlayback: true.
Platform implementations:
- Android: Media3
MediaSessionServicewith foreground service notifications - iOS/macOS:
MPNowPlayingInfoCenterandMPRemoteCommandCenter - Web: Not supported (browser limitations)