aggiunto schermo nero durante il play audio in playlist

This commit is contained in:
David Frassi
2026-06-18 10:01:34 +02:00
parent b0bb5735c8
commit 6ed90ffff1
10 changed files with 407 additions and 19 deletions
+20
View File
@@ -56,6 +56,9 @@ export class SettingsService {
/** Vista orizzontale per proiezione: true = attiva layout landscape per proiezione */
public landscapeProjectionEnabled = signal<boolean>(false);
/** Schermo nero per l'ascolto delle playlist in macchina: true = attivo */
public carModeBlackScreen = signal<boolean>(false);
/** Identificativo utente univoco per la gestione delle comunità */
public userUuid = signal<string>('');
@@ -254,6 +257,13 @@ export class SettingsService {
this.landscapeProjectionEnabled.set(false);
}
const savedCarModeBlackScreen = localStorage.getItem('car-mode-black-screen');
if (savedCarModeBlackScreen !== null) {
this.carModeBlackScreen.set(savedCarModeBlackScreen === 'true');
} else {
this.carModeBlackScreen.set(false);
}
// Sync browser fullscreen state with listeners (supporting vendor prefixes)
const updateFullscreenState = () => {
const isFs = !!(
@@ -311,6 +321,10 @@ export class SettingsService {
localStorage.setItem('landscape-projection-enabled', this.landscapeProjectionEnabled().toString());
});
effect(() => {
localStorage.setItem('car-mode-black-screen', this.carModeBlackScreen().toString());
});
effect(() => {
const active = this.keepScreenOn();
localStorage.setItem('keep-screen-on', active.toString());
@@ -446,6 +460,12 @@ export class SettingsService {
localStorage.setItem('landscape-projection-enabled', newValue.toString());
}
toggleCarModeBlackScreen() {
const newValue = !this.carModeBlackScreen();
this.carModeBlackScreen.set(newValue);
localStorage.setItem('car-mode-black-screen', newValue.toString());
}
setChordNotationPreference(val: 'diesis' | 'bemolle') {
this.chordNotationPreference.set(val);
}