mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
fix: brightness issue #299
This commit is contained in:
parent
5ff8ebca92
commit
0cd94da7ce
1 changed files with 7 additions and 3 deletions
|
|
@ -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();
|
||||
};
|
||||
}, []);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue