|
|
@ -22,6 +22,7 @@ export interface InterfaceSlice { |
|
|
|
canAirplay: boolean; |
|
|
|
canAirplay: boolean; |
|
|
|
isCasting: boolean; |
|
|
|
isCasting: boolean; |
|
|
|
hideNextEpisodeBtn: boolean; |
|
|
|
hideNextEpisodeBtn: boolean; |
|
|
|
|
|
|
|
shouldStartFromBeginning: boolean; |
|
|
|
|
|
|
|
|
|
|
|
volumeChangedWithKeybind: boolean; // has the volume recently been adjusted with the up/down arrows recently?
|
|
|
|
volumeChangedWithKeybind: boolean; // has the volume recently been adjusted with the up/down arrows recently?
|
|
|
|
volumeChangedWithKeybindDebounce: NodeJS.Timeout | null; // debounce for the duration of the "volume changed thingamajig"
|
|
|
|
volumeChangedWithKeybindDebounce: NodeJS.Timeout | null; // debounce for the duration of the "volume changed thingamajig"
|
|
|
@ -38,6 +39,7 @@ export interface InterfaceSlice { |
|
|
|
setHasOpenOverlay(state: boolean): void; |
|
|
|
setHasOpenOverlay(state: boolean): void; |
|
|
|
setLastVolume(state: number): void; |
|
|
|
setLastVolume(state: number): void; |
|
|
|
hideNextEpisodeButton(): void; |
|
|
|
hideNextEpisodeButton(): void; |
|
|
|
|
|
|
|
setShouldStartFromBeginning(val: boolean): void; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const createInterfaceSlice: MakeSlice<InterfaceSlice> = (set, get) => ({ |
|
|
|
export const createInterfaceSlice: MakeSlice<InterfaceSlice> = (set, get) => ({ |
|
|
@ -56,8 +58,14 @@ export const createInterfaceSlice: MakeSlice<InterfaceSlice> = (set, get) => ({ |
|
|
|
timeFormat: VideoPlayerTimeFormat.REGULAR, |
|
|
|
timeFormat: VideoPlayerTimeFormat.REGULAR, |
|
|
|
canAirplay: false, |
|
|
|
canAirplay: false, |
|
|
|
hideNextEpisodeBtn: false, |
|
|
|
hideNextEpisodeBtn: false, |
|
|
|
|
|
|
|
shouldStartFromBeginning: false, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setShouldStartFromBeginning(val) { |
|
|
|
|
|
|
|
set((s) => { |
|
|
|
|
|
|
|
s.interface.shouldStartFromBeginning = val; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
setLastVolume(state) { |
|
|
|
setLastVolume(state) { |
|
|
|
set((s) => { |
|
|
|
set((s) => { |
|
|
|
s.interface.lastVolume = state; |
|
|
|
s.interface.lastVolume = state; |
|
|
|