/** * @typedef {import('../../../basics/mediaContent.mjs').PictureDataType} PictureDataType * @typedef {import('../../../basics/mediaContent.mjs').MediaContent} MediaContent * @typedef {import('./index.mjs').ContentTimeData} ContentTimeData * @typedef {import('./index.mjs').ContentData} ContentData */ export type PictureDataType = import('../../../basics/mediaContent.mjs').PictureDataType; export type MediaContent = import('../../../basics/mediaContent.mjs').MediaContent; export type ContentTimeData = import('./index.mjs').ContentTimeData; export type ContentData = import('./index.mjs').ContentData; import { BaseMediaAdapter } from './index.mjs'; /** * Concrete implementation of the BaseMediaAdapter using HTML5 Video. * This class wraps the HTMLVideoElement and provides an adapter interface. */ declare class HtmlVideoAdapter extends BaseMediaAdapter { #private; get id(): string; get currentContentId(): string | null; /** * Gets whether the adapter has been destroyed. * @returns {boolean} */ get destroyed(): boolean; /** * Exposing the element to easily bind the 'playing' event in testing. * @returns {HTMLVideoElement} * @throws {Error} If the adapter has been destroyed. */ get videoElement(): HTMLVideoElement; /** * Initializes a new instance of the HtmlVideoAdapter. */ constructor(); /** * Synchronously checks whether the media adapter is fully initialized and ready. * @returns {boolean} True if the adapter is ready, false otherwise. */ isReady(): boolean; /** * Checks whether the media adapter is paused. * @returns {boolean} True if the adapter is ready, false otherwise. */ isPaused(): boolean; /** * Checks whether the media adapter is ended. * @returns {boolean} True if the adapter is ready, false otherwise. */ isEnded(): boolean; /** * Asynchronously waits until the content media adapter is fully initialized and ready. * @returns {Promise} A promise that resolves once the adapter is ready. */ waitIsReady(): Promise; /** * Retrieves a consolidated object containing all time-related metrics for the current media content. * @returns {ContentTimeData} An object containing total, current, remaining time, and playback percentage. */ getTimeData(): ContentTimeData; /** * Determines if the provided content is compatible with this adapter. * @param {MediaContent} content - The media content object. * @returns {boolean} True if the content is compatible, false otherwise. * @throws {TypeError} If content is not a valid object. */ static canHandle(content: MediaContent): boolean; /** * Determines if the provided content is compatible with this adapter. * @param {MediaContent} content - The media content object. * @returns {boolean} True if the content is compatible, false otherwise. * @throws {TypeError} If content is not a valid object. */ canHandle(content: MediaContent): boolean; /** * Plays the video content provided via the URL. * @param {MediaContent} content - The media content object containing the URL. * @returns {Promise} A promise that resolves when playback starts. * @throws {TypeError} If the content URL is not a string. */ play(content: MediaContent): Promise; /** * Pauses the video playback. * @returns {Promise} A promise that resolves when playback is paused. */ pause(): Promise; /** * Stops the video playback and resets the current time to zero. * @returns {Promise} A promise that resolves when playback is stopped. */ stop(): Promise; /** * Seeks to a specific time in the video. * @param {number} timeMs - The target time in milliseconds. * @returns {Promise} A promise that resolves when the seek operation is complete. * @throws {TypeError} If timeMs is not a number. */ seek(timeMs: number): Promise; /** * Checks whether the player is currently muted. * @returns {boolean} True if muted, false otherwise. */ isMuted(): boolean; /** * Mutes the current playback. * @returns {Promise} */ mute(): Promise; /** * Unmutes the current playback. * @returns {Promise} */ unMute(): Promise; /** * Gets the current playback time. * @returns {number} The current time in milliseconds. */ getCurrentTime(): number; /** * Gets the total duration of the video. * @returns {number} The total duration in milliseconds. */ getTotalDuration(): number; /** * Gets the remaining time until the video ends. * @returns {number} The remaining time in milliseconds. */ getRemainingTime(): number; /** * Gets the percentage of the video that has been played. * @returns {number} The percentage from 0 to 100. */ getPlaybackPercentage(): number; /** * Sets the volume level of the video. * @param {number} volume - The volume level from 0.0 to 1.0. * @throws {RangeError} If the volume is not between 0.0 and 1.0. */ setVolume(volume: number): void; /** * Gets the volume level of the video. * @returns {number} The volume level from 0.0 to 1.0. */ getVolume(): number; /** * Gets the current volume level of the video. * @returns {number} The volume level from 0.0 to 1.0. */ get volume(): number; /** * Sets the volume level. * @param {number} value - The volume level from 0.0 to 1.0. * @throws {RangeError} If the volume is not between 0.0 and 1.0. */ set volume(value: number); /** * Retrieves the metadata of the currently loaded content, returning a structured * object containing details such as the content ID, title, author, and duration. * @returns {Promise} */ getContentData(): Promise; /** * Cleans up the adapter resources and marks it as destroyed. * @returns {Promise} */ destroy(): Promise; } export { HtmlVideoAdapter }; //# sourceMappingURL=HtmlVideo.d.mts.map