fix: wakelock follows play state

close #180
This commit is contained in:
edde746
2025-12-20 15:47:42 +01:00
parent 1bce10a6a4
commit b27aa9cbda
+7
View File
@@ -953,6 +953,13 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
}
void _onPlayingStateChanged(bool isPlaying) {
// Toggle wakelock based on playback state
if (isPlaying) {
WakelockPlus.enable();
} else {
WakelockPlus.disable();
}
// Send timeline update when playback state changes
_progressTracker?.sendProgress(isPlaying ? 'playing' : 'paused');