Open ildar opened 6 years ago
Yes, the screen shuts off while the video is playing. That's not right for a video player. Please fix this.
Same here, version 1.2 from F-Droid on LineageOS 18.1 (Android 11).
After exploring the boundaries of this issue, it seems this behavior only occurs under certain circumstances, namely if the screen is rotated or if immersive mode is enabled/disabled while the video is already playing. As a workaround, pausing and restarting the video after rotating or toggling immersive mode will keep the screen on.
My suspicion is that the app is designed to keep the screen on while playing, but the implementation is buggy. Rotating by 90° will destroy and recreate the activity (a 180° rotation may not, as dimensions do not change); presumably toggling immersive mode also recreates the activity. Presumably, the flag to keep the screen on is set when playback starts and cleared when it ends, but is attached to the main activity or one of its views (e.g. by means of View.keepScreenOn(true)
). Therefore, it is lost when the activity (or the view on which the flag was set) is discarded and recreated. The solution would then be to store the playback with the state of the activity (or somewhere outside the activity instance), and restore it when the activity is recreated.
The app is good and quite complete except 1 thing: a video app must hold the screen off. Please?