Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.10
-
None
Description
In the context of this ticket, background playback refers to playing music / video while the application is minimized, or the device is locked. This ticket focuses primarily on audio, but there are some video-related features we could add here as well.
The current situation is that background playback is not supported on Android and iOS. If we use QMediaPlayer as an example: On iOS, if you minimize the application, playback is cancelled immediately. On Android, the playback will continue for anywhere between a few seconds up to roughly a minute before it is stopped.
Being able to leverage similar experiences as popular video and audio applications is important for Qt Multimedia to be competitive in the mobile space. My suggestion is that Qt Multimedia should be able to power the following use-cases with a cross-platform solution:
- Allow Qt applications to keep playing audio seamlessly when minimizing the app, or locking the device. This is very common functionality, and is seen in Spotify and YouTube Premium on Android.
- Allow developers of Qt applications to choose when background playback should not be applied, such as whether the background playback applies when the app is minimized, but disable playback when the device is locked. This functionality can be seen in YouTube Premium on Android, where shorts will keep playing when the application is minimized but they will not keep playing if the device is locked.
- Be able to automatically change track while application is in background, such as when playing a playlist of audio tracks
This functionality can be considered a prerequisite for adding APIs for media sessions controls, such as play, pause, next track controls appearing on the lock screen and system tray on the device. Media session controls would also be useful on desktop devices, as it allows us to respond to media keys on i.e keyboards and headsets. There is a possibility that media session controls have to be implemented simultaneously on some platforms (such as Android).
Any work we do on this for Android, should in theory work out of the box on Android Automotive.
This kind of functionality can be expanded upon in the future with features such as Picture-in-Picture, where the mobile device will show a small overlay on the screen containing the video-output along with some on-screen controls.
Attachments
Issue Links
- relates to
-
QTBUG-119410 Support Media Session control via Qt API
-
- Reported
-