From 22bee224e8a3cd403c9c7a83955984f95db15d95 Mon Sep 17 00:00:00 2001 From: Nikey646 Date: Sun, 3 Jul 2022 01:45:25 +1000 Subject: [PATCH 1/2] Allow screensaver when video is paused. Update mpvVideoPlayer.js. Related to #141. This is more ideal, especially in a desktop scenario where I might leave a video open after finishing it (but paused) before going to sleep. --- native/mpvVideoPlayer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/mpvVideoPlayer.js b/native/mpvVideoPlayer.js index 4fed4a8e..0f26d35e 100644 --- a/native/mpvVideoPlayer.js +++ b/native/mpvVideoPlayer.js @@ -648,6 +648,7 @@ pause() { window.api.player.pause(); + window.api.power.setScreensaverEnabled(true); } // This is a retry after error @@ -818,4 +819,4 @@ } /* eslint-enable indent */ -window._mpvVideoPlayer = mpvVideoPlayer; \ No newline at end of file +window._mpvVideoPlayer = mpvVideoPlayer; From deca2d15f41f05689791b1be2590beab5db88bdd Mon Sep 17 00:00:00 2001 From: Nikey646 Date: Sun, 3 Jul 2022 03:07:45 +1000 Subject: [PATCH 2/2] Re-disable screensaver on resume --- native/mpvVideoPlayer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/native/mpvVideoPlayer.js b/native/mpvVideoPlayer.js index 0f26d35e..3c65749f 100644 --- a/native/mpvVideoPlayer.js +++ b/native/mpvVideoPlayer.js @@ -659,6 +659,7 @@ unpause() { window.api.player.play(); + window.api.power.setScreensaverEnabled(false); } paused() {