This project demonstrates an example implementation of the Flutter audio_service package with video_player to provide background audio playback functionality for videos.
The project shows how to:
- Use
audio_serviceto handle audio playback in the background - Integrate with
video_playerfor video content - Maintain audio playback when the app is in the background
Currently, this project uses a forked version of the video_player package until a pull request is merged into the main repository. The fork includes necessary functionality for proper integration with audio_service.
On iOS, video playback pauses when the screen is turned off but can be resumed via the notification controls. Audio files, however, continue playing without interruption when the screen is turned off.
- Clone this repository
- Run
flutter pub getto install dependencies - Run the app on your preferred device
Once the pull request for the video_player package is merged, this project will be updated to use the official package version.