Files
jacuzzi/frontend/js/state.js
2026-06-18 11:19:15 +00:00

31 lines
764 B
JavaScript

window.App = window.App || {};
// Centralized runtime state for pagination, player, and UI behavior.
App.state = {
currentPage: 1,
perPage: 12,
renderedVideoIds: new Set(),
hasNextPage: true,
isLoading: false,
hlsPlayer: null,
currentLoadController: null,
errorToastTimer: null,
playerMode: 'modal',
playerHome: null,
onFullscreenChange: null,
onWebkitEndFullscreen: null,
loadedVideos: [],
feedOpen: false,
feedMuted: true,
feedRenderedIds: new Set(),
feedActiveSlide: null,
groupCursors: null
};
// Local storage keys used across modules.
App.constants = {
FAVORITES_KEY: 'favorites',
FAVORITES_VISIBILITY_KEY: 'favoritesVisible',
PREFERRED_QUALITY_KEY: 'preferredQuality'
};