aggiunto schermo nero durante il play audio in playlist
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user