Use case
The video_player plugin keeps the screen awake during playback. Some apps (e.g. login screens with background videos, ambient content) want the screen to be able to auto-lock while video plays. There is currently no way to allow this on iOS.
Proposal
Add an option to VideoPlayerOptions (e.g. allowScreenAutoLock) that lets apps opt in to allowing screen auto-lock during playback. When enabled, the screen can auto-lock as usual while video continues playing.
Using wakelock_plus – does not reliably control screen auto-lock during video playback on iOS.
Using other video packages (e.g. Chewie, Better Player) – they have similar limitations; see fluttercommunity/chewie#808.
Additional context
On iOS, AVPlayer has preventsDisplaySleepDuringVideoPlayback, which is enabled by default and keeps the screen awake. Setting it to false when the app opts in would allow the screen to auto-lock during playback.
Use case
The video_player plugin keeps the screen awake during playback. Some apps (e.g. login screens with background videos, ambient content) want the screen to be able to auto-lock while video plays. There is currently no way to allow this on iOS.
Proposal
Add an option to VideoPlayerOptions (e.g. allowScreenAutoLock) that lets apps opt in to allowing screen auto-lock during playback. When enabled, the screen can auto-lock as usual while video continues playing.
Using wakelock_plus – does not reliably control screen auto-lock during video playback on iOS.
Using other video packages (e.g. Chewie, Better Player) – they have similar limitations; see fluttercommunity/chewie#808.
Additional context
On iOS, AVPlayer has preventsDisplaySleepDuringVideoPlayback, which is enabled by default and keeps the screen awake. Setting it to false when the app opts in would allow the screen to auto-lock during playback.