UNPKG

saltfish

Version:

An interactive video-guided tour system for web applications

64 lines 2.26 kB
import { EventManager } from './EventManager'; import type { PlaylistOptions } from '../types'; /** * Manager class for handling playlist-related functionality * * This class handles: * - Updating watched playlist status * - Tracking playlist progress * - Managing playlist state */ export declare class PlaylistManager { private eventManager; private isUpdatingWatchedPlaylists; /** * Creates a new PlaylistManager * @param eventManager - Optional event manager to subscribe to events */ constructor(eventManager?: EventManager); /** * Sets the event manager and subscribes to relevant events * @param eventManager - Event manager instance */ setEventManager(eventManager: EventManager): void; /** * Subscribe to relevant player events for playlist tracking */ private subscribeToEvents; /** * Helper to get the store state when needed */ private getStore; /** * Updates the watched playlist status locally and in the backend * @param playlistId - ID of the playlist * @param status - New status ('in_progress' or 'completed') * @param currentStepId - Optional current step ID */ private updateWatchedPlaylistStatus; /** * Updates anonymous user watched playlist status in localStorage * @param playlistId - ID of the playlist * @param status - New status ('in_progress', 'completed', or 'dismissed') * @param currentStepId - Optional current step ID */ private updateAnonymousUserWatchedPlaylists; /** * Loads a playlist manifest and sets up the store * @param playlistId - Path or identifier for the playlist manifest * @param options - Playlist configuration options */ load(playlistId: string, options: PlaylistOptions): Promise<void>; /** * Determines which step to start from based on persistence settings and saved progress * @param manifest - The loaded playlist manifest * @param options - Playlist configuration options * @returns The step ID to start from */ private determineStartStep; /** * Cleans up resources used by the playlist manager */ destroy(): void; } //# sourceMappingURL=PlaylistManager.d.ts.map