// Generated by dts-bundle-generator v9.5.1 import { WebVTTParser as Parser } from 'webvtt-parser'; /** * PlayerResource is a base class that provides access to the player instance. * All classes that need to interact with the player should extend this class. */ export declare class PlayerResource { #private; /** * Creates a new PlayerResource instance */ constructor(player: Paella); /** * Gets the player instance */ get player(): Paella; } export type CreateElementAttributes = { tag?: string; attributes?: Record; children?: string | null; parent?: HTMLElement | null; innerText?: string | null; }; /** * Creates a DOM element with the specified configuration * @param {object} options - Element creation options * @param {string} [options.tag='div'] - HTML tag name * @param {Record} [options.attributes={}] - Element attributes * @param {string} [options.children=""] - Inner HTML content * @param {string} [options.innerText=""] - Inner text content * @param {HTMLElement|null} [options.parent=null] - Parent element to append to * @returns {HTMLElement} The created DOM element */ export declare function createElement({ tag, attributes, children, innerText, parent }: CreateElementAttributes): HTMLElement; /** * Creates a DOM element from HTML text string * @param {string} htmlText - HTML string to parse * @param {HTMLElement|null} [parent=null] - Parent element to append to * @returns {HTMLElement} The created DOM element */ export declare function createElementWithHtmlText(htmlText: string, parent?: HTMLElement | null): HTMLElement; export type DomShowParams = { icon?: string | null; text?: string; timeout?: number; position?: string; cssClass?: string; }; /** * DomClass provides a base class for creating DOM-based components within the player. * It extends PlayerResource and manages a single DOM element with common operations. * @extends PlayerResource */ export declare class DomClass extends PlayerResource { #private; /** * Creates a new DomClass instance with a DOM element * @param {Paella} player - The player instance * @param {object} options - DOM element creation options * @param {string} [options.tag='div'] - HTML tag name for the element * @param {Record} [options.attributes=[]] - Element attributes * @param {string} [options.children=""] - Inner HTML content * @param {HTMLElement|null} [options.parent=null] - Parent element to append to */ constructor(player: Paella, { tag, attributes, children, parent }: CreateElementAttributes); /** * Gets the DOM element associated with this instance * @returns {HTMLElement} The DOM element */ get element(): HTMLElement; /** * Gets the parent element of this DOM element * @returns {HTMLElement|null} The parent element, or null if no parent */ get parent(): HTMLElement | null; /** * Hides the DOM element by setting display style to "none" */ hide(): void; /** * Shows the DOM element by removing the display style restriction * @param {string} [showMode="block"] - The display mode to use when showing */ show(showMode?: string | DomShowParams): void; /** * Gets whether the element is currently visible * @returns {boolean} True if the element is visible, false otherwise */ get isVisible(): boolean; /** * Sets an attribute on the DOM element * @param {string} name - The attribute name * @param {string} value - The attribute value */ setAttribute(name: string, value: string): void; /** * Removes this element from its parent */ removeFromParent(): void; /** * Sets a new parent for this element, removing it from the current parent first * @param {HTMLElement} parent - The new parent element */ setParent(parent: HTMLElement): void; } declare class ErrorContainer extends DomClass { constructor(player: Paella, message?: string); } export interface Transcription { index: number; preview: string; time: number; text: string; duration: number; } export interface Frame { id: string; time: number; mimetype: string; url: string; thumb: string; } export interface FrameList { targetContent: string; frames: Frame[]; } export interface Chapter { id: string; title: string; description?: string; time: number; thumb?: string; } export interface Chapters { chapterList: Chapter[]; } export interface Source { src: string; mimetype: string; res?: { w: number; h: number; }; } export interface Stream { content: string; role?: string; canvas?: string | string[]; sources: { html?: Source[]; mp4?: Source[]; hls?: Source[]; hlsLive?: Source[]; }; } export interface CaptionManifestItem { id: string; format: string; url: string; lang: string; text: string; } export interface TimelineImages { url: string; rows: number; cols: number; } export interface Manifest { metadata?: { duration?: number; title?: string; preview?: string; timelineMarks?: "frameList" | "chapters"; timeline?: TimelineImages; } & Record; streams: Stream[]; captions?: CaptionManifestItem[]; frameList?: FrameList; chapters?: Chapters; transcriptions?: Transcription[]; } export type Language = "aa" | "ab" | "ae" | "af" | "ak" | "am" | "an" | "ar" | "as" | "av" | "ay" | "az" | "ba" | "be" | "bg" | "bh" | "bi" | "bm" | "bn" | "bo" | "br" | "bs" | "ca" | "ce" | "ch" | "co" | "cr" | "cs" | "cu" | "cv" | "cy" | "da" | "de" | "dv" | "dz" | "ee" | "el" | "en" | "eo" | "es" | "et" | "eu" | "fa" | "ff" | "fi" | "fj" | "fo" | "fr" | "fy" | "ga" | "gd" | "gl" | "gn" | "gu" | "gv" | "ha" | "he" | "hi" | "ho" | "hr" | "ht" | "hu" | "hy" | "hz" | "ia" | "id" | "ie" | "ig" | "ii" | "ik" | "io" | "is" | "it" | "iu" | "ja" | "jv" | "ka" | "kg" | "ki" | "kj" | "kk" | "kl" | "km" | "kn" | "ko" | "kr" | "ks" | "ku" | "kv" | "kw" | "ky" | "la" | "lb" | "lg" | "li" | "ln" | "lo" | "lt" | "lu" | "lv" | "mg" | "mh" | "mi" | "mk" | "ml" | "mn" | "mr" | "ms" | "mt" | "my" | "na" | "nb" | "nd" | "ne" | "ng" | "nl" | "nn" | "no" | "nr" | "nv" | "ny" | "oc" | "oj" | "om" | "or" | "os" | "pa" | "pi" | "pl" | "ps" | "pt" | "qu" | "rm" | "rn" | "ro" | "ru" | "rw" | "sa" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sq" | "sr" | "ss" | "st" | "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tl" | "tn" | "to" | "tr" | "ts" | "tt" | "tw" | "ty" | "ug" | "uk" | "ur" | "uz" | "ve" | "vi" | "vo" | "wa" | "wo" | "xh" | "yi" | "yo" | "za" | "zh" | "zu"; export type Dictionary = Record; export type Dictionaries = Partial>; export declare function defaultTranslateFunction(word: string): string; export declare function defaultSetLanguageFunction(lang: Language): void; export declare function defaultGetLanguageFunction(): Language; export declare function defaultAddDictionaryFunction(lang: Language, dict: Dictionary): void; export declare function defaultGetDictionariesFunction(): Partial>; export declare function defaultGetDefaultLanguageFunction(player: Paella): any; export declare function translate(word?: string | null, keys?: string[] | null): string | null | undefined; export declare function setLanguage(lang: Language): void; export declare function getLanguage(): Language; export declare function addDictionary(lang: Language, dict: Dictionary): void; export declare function getDictionaries(): Partial>; export declare function getDefaultLanguage(player: Paella): Language; export type CookieConsentData = { /** Type of the cookie consent, for example `analytical` */ type?: string; /** Human readable name of the cookie consent, for example 'Analytical Cookies' */ title?: string; /** Description of the cookie consent, for example 'Cookies used to analyze the user behavior' */ description?: string; /** Is this cookie group required for the website to work? */ required?: boolean; /** Is enabled by default? */ value?: boolean; }; export type GetCookieConsentCallback = (type: string) => Promise; export type GetCookieDescriptionCallback = (cookieObject: CookieConsentData) => string; export declare const defaultGetCookieConsentCallback: GetCookieConsentCallback; export declare const defaultGetCookieDescriptionCallback: GetCookieDescriptionCallback; declare class CookieConsent { private _player; private _cookieConsentData; private _getConsentCallback; private _getDescriptionCallback; constructor(player: Paella, { getConsent, getDescription }?: { getConsent?: GetCookieConsentCallback; getDescription?: GetCookieDescriptionCallback; }); updateConsentData(): Promise; getConsentForType(type: string): Promise; } export type LogLevel = "DISABLED" | "ERROR" | "WARN" | "INFO" | "DEBUG" | "VERBOSE"; export type DynamicLayoutAlignment = "align-center" | "align-top" | "align-bottom" | "align-left" | "align-right"; export type ButtonPluginSide = "left" | "right"; export type ButtonSize = "small" | "medium" | "large"; export type PopUpType = "timeline" | "modal"; export type VideoLayaoutValidContent = { id: string; content: string[]; icon?: string | null; title?: string | null; }; export type PluginConfig = { enabled?: boolean; order?: number; description?: string; }; export type CanvasPluginConfig = PluginConfig & {}; export type EventLogPluginConfig = PluginConfig & { context?: string[] | string; target?: string | string[]; events?: string[]; logLevel?: LogLevel; }; export type VideoPluginConfig = PluginConfig & {}; export type UserInterfacePluginConfig = PluginConfig & { parentContainer?: string; id?: string; name?: string; ariaLabel?: string; tabIndex?: number; size?: ButtonSize; side?: ButtonPluginSide; }; export type ButtonPluginConfig = UserInterfacePluginConfig & { minContainerSize?: number; urlTarget?: string; closeParentPopUp?: boolean; closePopUps?: boolean; }; export type PopUpButtonPluginConfig = ButtonPluginConfig & { customPopUpClass?: string; popUpType?: PopUpType; closeOnSelect?: boolean; menuTitle?: string; targetContent?: string; }; export type TableInfoPopUpPluginConfig = PopUpButtonPluginConfig & {}; export type MenuButtonPluginConfig = PopUpButtonPluginConfig & { groupName?: string; allowMultipleSelection?: boolean; }; export type VideoLayoutPluginConfig = PluginConfig & { tabIndexStart?: number; validContent?: VideoLayaoutValidContent[]; }; export type DataPluginConfig = PluginConfig & { context?: string[]; }; export type GenericPluginConfig = MenuButtonPluginConfig & VideoLayoutPluginConfig & DataPluginConfig & CanvasPluginConfig & EventLogPluginConfig & VideoPluginConfig & Record; export type PreferencesSources = { /** Store settings in cookies */ cookie?: { /** Consent type used to store the settings (see Cookie Consent settings) */ consentType: string; }; /** Store settings using a Data plugin */ dataPlugin?: { /** Context of the data plugin to use */ context: string; name: string; }; }; export type ButtonGroupConfig = { /** Enable or disable the button group */ enabled: boolean; /** Button group name. This name will be used in the child buttons as `parentContainer` attribute */ groupName: string; /** Button group description */ description: string; /** Button group icon */ icon?: string; /** Loading order */ order?: number; /** Button group position */ side?: ButtonPluginSide; /** Parent button group name */ parentContainer?: string; /** Title used in the menu title bar */ menuTitle?: string; }; export interface Config { /** Default video ID to be used when one is not specified explicitly */ fallbackId?: string; /** Default directory with the manifest video repository */ repositoryUrl?: string; /** Default manifest file name */ manifestFileName?: string; /** Default layout to be used when one has not yet been configured. */ defaultLayout?: string; /** Default translation language for text strings, when no translations are available for the current language. */ defaultLanguage?: string; /** Default preview image, which is used when one has not been specified in the video manifest. */ defaultVideoPreview?: string; /** Default preview image for the portrait mode, which is used when one has not been specified in the video manifest. */ defaultVideoPreviewPortrait?: string; /** Log level to use */ logLevel?: LogLevel; /** General user interface settings */ ui?: { /** Timeout to hide the interface, from when the user stops interacting with the player. */ hideUITimer?: number; /** Hide the interface when the mouse leaves the video area */ hideOnMouseLeave?: boolean; }; /** Preference storage settings */ preferences?: { /** Storage type to use for the preferences. */ currentSource: string; /** Storage types */ sources: PreferencesSources; }; /** Video container settings */ videoContainer?: { /** Place the video container above or below the playback bar. */ overPlaybackBar?: boolean; /** Restore the playback rate setting in the next player load */ restorePlaybackRate?: boolean; /** Restore the volume setting in the next player load */ restoreVolume?: boolean; /** Restore the video layout in the next load of the current video */ restoreVideoLayout?: { /** Enable or disable this setting */ enabled?: boolean; /** If global=false, then the layout is only restored the next load of the current video */ global?: boolean; }; restoreLastTime?: { /** Enable or disable this setting */ enabled?: boolean; /** Remaining video time after which the last known instant of playback will not be restored */ remainingSeconds?: number; }; /** Alignment of the video canvas in dynamic layout mode */ dynamicLayout?: { landscapeVerticalAlignment?: DynamicLayoutAlignment; portraitHorizontalAlignment?: DynamicLayoutAlignment; }; }; /** Button groups */ buttonGroups?: ButtonGroupConfig[]; /** Cookie consent options */ cookieConsent?: CookieConsentData[]; plugins?: Record; dictionaries?: Dictionaries; } export declare class PluginModule { get moduleName(): string; get moduleVersion(): string; getDictionaries(): Promise; } declare class Plugin$1 extends PlayerResource { #private; _config: ConfigT; __uiPlugin: boolean; constructor(player: Paella, name: string | null); getPluginModuleInstance(): PluginModule | null; get config(): ConfigT; get type(): string; get order(): number | null; get description(): string | null; get name(): string | null; preload(): void; isEnabled(): Promise; load(): Promise; unload(): Promise; } export declare class VideoQualityItem { private _label; private _shortLabel; private _index; private _src; private _res; private _bitrate; private _isAuto; constructor({ label, shortLabel, isAuto, index, src, width, height, bitrate }: { label: string; shortLabel: string; isAuto?: boolean; index?: number; src?: string; width?: number; height?: number; bitrate?: number; }); get label(): string; get shortLabel(): string; get index(): number; get src(): string; get res(): { w: number; h: number; }; get bitrate(): number; get isAuto(): boolean; get quality(): number; compare(other: VideoQualityItem): number; } export declare class AudioTrackData { #private; constructor({ id, name, groupId, language, selected }: { id: string; name: string; groupId?: string; language?: string; selected?: boolean; }); get id(): string; get name(): string; get groupId(): string; get language(): string; get selected(): boolean; set selected(s: boolean); } export declare class VideoPlugin extends Plugin$1 { get type(): string; get streamType(): string; isCompatible(streamData: any): Promise; getVideoInstance(playerContainer: HTMLElement, isMainAudio: boolean): Promise