From 0cd94da7ce95fe17c037cdb3fc4f4be17bd95265 Mon Sep 17 00:00:00 2001 From: Saif Shaikh Date: Tue, 13 Jan 2026 05:30:56 -0800 Subject: [PATCH 1/3] fix: brightness issue #299 --- src/components/player/android/hooks/usePlayerSetup.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/player/android/hooks/usePlayerSetup.ts b/src/components/player/android/hooks/usePlayerSetup.ts index a9a396e9..f3f448dd 100644 --- a/src/components/player/android/hooks/usePlayerSetup.ts +++ b/src/components/player/android/hooks/usePlayerSetup.ts @@ -112,10 +112,14 @@ export const usePlayerSetup = ( subscription?.remove(); disableImmersiveMode(); - // Restore brightness on unmount - if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) { - // restoration logic normally happens here or in a separate effect + async function restoreBrightness() { + logger.log('yobrrrrrrrrrrrrrr'); + await Brightness.setBrightnessAsync(originalSystemBrightnessRef.current!).then(); + setBrightness(originalSystemBrightnessRef.current!); } + // Restore brightness on unmount + if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) + restoreBrightness(); }; }, []); From 54b51391add33be90d7cf0b4be678cd5a9a60ba0 Mon Sep 17 00:00:00 2001 From: Saif Shaikh Date: Wed, 14 Jan 2026 03:35:15 -0800 Subject: [PATCH 2/3] Revert "fix: brightness issue #299" This reverts commit 0cd94da7ce95fe17c037cdb3fc4f4be17bd95265. --- src/components/player/android/hooks/usePlayerSetup.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/components/player/android/hooks/usePlayerSetup.ts b/src/components/player/android/hooks/usePlayerSetup.ts index f3f448dd..a9a396e9 100644 --- a/src/components/player/android/hooks/usePlayerSetup.ts +++ b/src/components/player/android/hooks/usePlayerSetup.ts @@ -112,14 +112,10 @@ export const usePlayerSetup = ( subscription?.remove(); disableImmersiveMode(); - async function restoreBrightness() { - logger.log('yobrrrrrrrrrrrrrr'); - await Brightness.setBrightnessAsync(originalSystemBrightnessRef.current!).then(); - setBrightness(originalSystemBrightnessRef.current!); - } // Restore brightness on unmount - if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) - restoreBrightness(); + if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) { + // restoration logic normally happens here or in a separate effect + } }; }, []); From eef72d8b706886f6ea5cbf926679ed669a18753b Mon Sep 17 00:00:00 2001 From: Saif Shaikh Date: Wed, 14 Jan 2026 03:37:00 -0800 Subject: [PATCH 3/3] fix: Brightness issue #299 --- src/components/player/android/hooks/usePlayerSetup.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/player/android/hooks/usePlayerSetup.ts b/src/components/player/android/hooks/usePlayerSetup.ts index a9a396e9..05630a8d 100644 --- a/src/components/player/android/hooks/usePlayerSetup.ts +++ b/src/components/player/android/hooks/usePlayerSetup.ts @@ -111,11 +111,12 @@ export const usePlayerSetup = ( return () => { subscription?.remove(); disableImmersiveMode(); - - // Restore brightness on unmount - if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) { - // restoration logic normally happens here or in a separate effect + async function restoreBrightness() { + await Brightness.setBrightnessAsync(originalSystemBrightnessRef.current!); + setBrightness(originalSystemBrightnessRef.current!); } + if (Platform.OS === 'android' && originalSystemBrightnessRef.current !== null) + restoreBrightness(); }; }, []);