mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-14 05:20:22 +00:00
fix: swipe control initial brightness
This commit is contained in:
parent
bcba9f3805
commit
a9a08512d1
1 changed files with 4 additions and 3 deletions
|
|
@ -152,11 +152,12 @@ export function swipeControls(node, props = { enabled: true, immersePlayer: () =
|
|||
async function init() {
|
||||
if (isNative) {
|
||||
try {
|
||||
const { brightness: currentBrightness } = await ScreenBrightness.getBrightness();
|
||||
// const { brightness: currentBrightness } = await ScreenBrightness.getBrightness();
|
||||
const { volume: currentVolume } = await VolumeControl.getVolume();
|
||||
brightness = currentBrightness * 100;
|
||||
brightness = 50;
|
||||
volume = currentVolume;
|
||||
updateBrightness();
|
||||
// updateBrightness();
|
||||
brightnessValue.textContent = `50%`;
|
||||
debouncedUpdateVolume();
|
||||
} catch (error) {
|
||||
console.error('Error initializing brightness and volume:', error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue