-
Notifications
You must be signed in to change notification settings - Fork 30.3k
Design Doc: video_player background playback with system media notifications #181595
Copy link
Copy link
Open
Labels
📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterdesign docTracks a design discussion documentTracks a design discussion documentp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Metadata
Metadata
Assignees
Labels
📜Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")Issue was posted to Discord. Remove to have the issue reannounced. (For "design doc", "emergency")P2Important issues not at the top of the work listImportant issues not at the top of the work listc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterdesign docTracks a design discussion documentTracks a design discussion documentp: video_playerThe Video Player pluginThe Video Player pluginpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-ecosystemOwned by Ecosystem teamOwned by Ecosystem teamtriaged-ecosystemTriaged by Ecosystem teamTriaged by Ecosystem team
Summary
This design document describes adding system media notification support to the
video_playerplugin, 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-background-playback
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_playersupports basic background audio viaallowBackgroundPlayback, there is no built-in way to: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
NotificationMetadataclass andnotificationMetadataparameter toVideoPlayerOptionsthat enables system media notifications when combined withallowBackgroundPlayback: true.Platform implementations:
MediaSessionServicewith foreground service notificationsMPNowPlayingInfoCenterandMPRemoteCommandCenterRelated PR
flutter/packages#10915
See also #62739