saltfish
Version:
An interactive video-guided tour system for web applications
52 lines • 2.01 kB
TypeScript
import type { EventManager } from './EventManager';
import { EventSubscriberManager } from './EventSubscriberManager';
import type { PlaylistOptions } from '../types';
import { StorageManager } from './StorageManager';
/**
* Manager class for handling playlist-related functionality
*
* This class handles:
* - Updating watched playlist status
* - Tracking playlist progress
* - Managing playlist state
*/
export declare class PlaylistManager extends EventSubscriberManager {
private isUpdatingWatchedPlaylists;
private playlistLoader;
private storageManager;
/**
* Creates a new PlaylistManager
* @param eventManager - Optional event manager to subscribe to events
* @param storageManager - Optional storage manager for localStorage operations
*/
constructor(eventManager?: EventManager, storageManager?: StorageManager);
/**
* Subscribe to relevant player events for playlist tracking
*/
protected subscribeToEvents(): void;
/**
* 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>;
/**
* Cleans up resources used by the playlist manager
*/
destroy(): void;
}
//# sourceMappingURL=PlaylistManager.d.ts.map