UNPKG

saltfish

Version:

An interactive video-guided tour system for web applications

42 lines 1.62 kB
import type { PlayerState } from '../types'; import type { VideoManager } from './VideoManager'; /** * ButtonManager is responsible for managing the display of * playback buttons, DOM click buttons, and other UI controls in the player. * It subscribes to store changes and updates buttons automatically. */ export declare class ButtonManager { private playbackButtonsVisible; private rootElement; private playButton; private centerPlayButton; private videoManager; private storeUnsubscribe; constructor(); /** * Initializes the ButtonManager with the root element and video manager * Should be called after the player UI is created * @param element - The root element containing the player controls * @param videoManager - The video manager for handling interactions */ initialize(element: HTMLElement, videoManager: VideoManager): void; /** * Displays or hides the DOM click button based on the given visibility state * @param visible - Whether the button should be visible */ /** * Displays or hides the playback buttons based on the given visibility state * @param visible - Whether the buttons should be visible */ displayPlaybackButtons(visible: boolean): void; /** * Updates the play/pause button state based on the video state * @param state - The current video state ('playing' or 'paused') */ updatePlayPauseButton(state: PlayerState): void; /** * Cleans up any resources used by the button manager */ destroy(): void; } //# sourceMappingURL=ButtonManager.d.ts.map