import type { ActionOptions, AriaLiveLevel, AudioTrack, AuthConfig, BasePlaylistItem, BufferState, CanPlayResult, CastState, CastTarget, Chapter, CurrentAudioTrackSelection, CurrentQualitySelection, CurrentSubtitleSelection, DeviceCapabilities, ICueParser, IPlatform, IPlayer, IPreloadStrategy, IStreamFactory, ITransitionStrategy, IUrlResolver, TimeState as KitTimeState, LoadOptions, NetworkState, PlaybackMetrics, PlayerExperimental, PlayerPhase, Plugin, PluginCtorWithId, QualityLevel, ResolvedUrl, SetupState, SidecarSubtitleInput, SubtitleStyle, SubtitleTrack, Translations, UrlCategory, VisibilityState } from '@nomercy-entertainment/nomercy-player-core'; import type { IVideoBackend, VideoBackendKind } from './adapters/video-backend/IVideoBackend.js'; import type { AudioTrackState, IVideoPlayer, PlayState, QualityState, RepeatState, SegmentOptions, ShuffleState, Stretching, VideoEventMap, VideoPlayerConfig, VideoPlaylistItem, VideoRect, VolumeState } from './types.js'; import { EventEmitter } from '@nomercy-entertainment/nomercy-player-core'; import { FullscreenState, PipState, SubtitleState, TheaterState } from './types.js'; export type { IChapterSource } from './adapters/chapter-source/IChapterSource.js'; export { VttChapterSource } from './adapters/chapter-source/vtt-chapters.js'; export type { ISubtitleStyleStore } from './adapters/subtitle-style-store/ISubtitleStyleStore.js'; export { StorageBackedSubtitleStyleStore } from './adapters/subtitle-style-store/storage-backed.js'; export type { IThumbnailSource, ThumbnailFrame } from './adapters/thumbnail-source/IThumbnailSource.js'; export { VttSpriteThumbnailSource } from './adapters/thumbnail-source/vtt-sprite.js'; export { Html5VideoBackend } from './adapters/video-backend/html5.js'; export type { BackendEvent, BackendEventPayload, BackendLoaderState, BackendState, IVideoBackend, SubtitleCue, SubtitleCueChange, VideoBackendKind, } from './adapters/video-backend/IVideoBackend.js'; export { VideoPreloadStrategy } from './player/preload.js'; export { KeyHandlerPlugin } from './plugins/key-handler/index.js'; export { OctopusPlugin } from './plugins/octopus/index.js'; export { V1VideoCompatPlugin } from './plugins/v1-compat.js'; export type { AudioTrackRef, ChapterRef, FontTrackRef, HtmlPreloadMode, IVideoPlayer, SegmentBoundaryPayload, SegmentEndBehaviour, SegmentOptions, Stretching, SubtitleTrackRef, VideoBackendFactory, VideoEventMap, VideoPlayerConfig, VideoPlaylistItem, VideoRect, WatchProgress, } from './types.js'; export { containedRect } from './types.js'; export { AudioTrackState, FullscreenState, PipState, PlayState, QualityState, RepeatState, ShuffleState, SubtitleState, TheaterState, VolumeState, } from './types.js'; export type { QualityLevel } from './types.js'; export type { AudioTrack, Chapter, SidecarSubtitleInput, SubtitleTrack } from '@nomercy-entertainment/nomercy-player-core'; /** * Headless video player. Plugin-driven, event-driven, no UI in core. * * Shared player logic (lifecycle, transport, queue, state, volume, time, * plugins, i18n, cue parsers, baseUrl, audioContext, experimental override * surface) is composed onto the prototype from `playerCoreMethods` exported by * `@nomercy-entertainment/nomercy-player-core` — the LOGIC lives there, not * here. NMVideoPlayer adds only: * * - The per-library registry (own `_instances` Map) * - The three-form factory constructor + the `videoElement` field * - Library-typed method declarations (so consumers see `PlayState`, etc., * not the kit's internal string token — runtime impl comes from the mixin) * - Video-specific stubs (fullscreen, pip, theater, subtitle toggles, etc.) */ export declare class NMVideoPlayer extends EventEmitter> implements IPlayer>, IVideoPlayer { playerId: string; container: HTMLElement; videoElement: HTMLVideoElement | undefined; get id(): string; /** * Phantom brand — never assigned at runtime. Declared explicitly here so * `PlayerEventMap>` resolves to `VideoEventMap` without * TypeScript having to walk the `EventEmitter` inheritance chain (which * stalls in conditional-type inference for complex class hierarchies). */ readonly __eventMap__: VideoEventMap; options: VideoPlayerConfig; private _phase; private _playState; /** Bumped only by `item(target)` navigations — distinguishes a real consumer preselection from the queue's default cursor. */ _currentEpoch: number | undefined; setup: (config: VideoPlayerConfig) => this; ready: () => Promise; dispose: () => Promise; setupState: () => SetupState; phase: () => PlayerPhase; dispatching: () => ReadonlyArray; platform: () => IPlatform; baseUrl: { (): string | undefined; (url: string): void; }; audioContext: () => AudioContext | undefined; experimental: PlayerExperimental; t: { (key: string, vars?: Record): string; (PluginClass: PluginCtorWithId, key: string, vars?: Record): string; }; language: { (): string; (lang: string): Promise; }; addTranslations: (bundle: Translations) => void; registerTitleTokens: (tokens: Record) => void; translation: { (lang: string, key: string): string | undefined; (lang: string, key: string, value: string): void; }; removeTranslations: (prefix: string, lang?: string) => void; registerCueParser: (parser: ICueParser, prepend?: boolean) => void; unregisterCueParser: (id: string) => void; resolveCueParser: (url: string) => ICueParser | undefined; play: (opts?: ActionOptions) => Promise; pause: (opts?: ActionOptions) => Promise; stop: (opts?: ActionOptions) => Promise; togglePlayback: (opts?: ActionOptions) => Promise; next: (opts?: LoadOptions) => Promise; previous: (opts?: LoadOptions) => Promise; rewind: (seconds?: number, opts?: ActionOptions) => Promise; forward: (seconds?: number, opts?: ActionOptions) => Promise; restart: (opts?: ActionOptions) => Promise; time: { (): number; (seconds: number, opts?: ActionOptions): Promise; }; duration: () => number; buffered: () => number; bufferedRanges: () => TimeRanges; seekable: () => TimeRanges; timeData: () => KitTimeState; /** Seek to a position expressed as a percentage (0–100) of total duration. */ seekByPercentage: (pct: number, opts?: ActionOptions) => void; playbackRate: { (): number; (rate: number): Promise; }; playbackRates: () => number[]; volume: { (): number; (level: number): Promise; }; mute: () => Promise; unmute: () => Promise; toggleMute: () => void; volumeUp: (step?: number) => void; volumeDown: (step?: number) => void; bumpActivity: () => void; activityTracking: { (): boolean; (enabled: boolean): void; }; playState: () => PlayState; volumeState: () => VolumeState; repeatState: { (): RepeatState; (state: RepeatState): Promise; }; shuffleState: { (): ShuffleState; (state: ShuffleState | boolean): Promise; }; queue: { (): ReadonlyArray; (items: T[], opts?: ActionOptions): void; }; queueAppend: (item: T | T[], opts?: ActionOptions) => void; queuePrepend: (item: T | T[], opts?: ActionOptions) => void; queueInsert: (item: T | T[], index: number, opts?: ActionOptions) => void; queueRemove: (id: string | number, opts?: ActionOptions) => void; queueRemoveAt: (index: number, opts?: ActionOptions) => void; queueMove: (from: number, to: number, opts?: ActionOptions) => void; queueClear: (opts?: ActionOptions) => void; queueShuffle: (opts?: ActionOptions) => void; queueSort: (compare: (itemA: T, itemB: T) => number, opts?: ActionOptions) => void; peekNext: () => T | undefined; peekPrevious: () => T | undefined; queueLength: () => number; queueIndexOf: (id: string | number) => number; item: { (): T | undefined; (target: T | string | number, opts?: LoadOptions): void; }; index: () => number; seekToIndex: (position: number, opts?: ActionOptions) => void; playItem: (target: BasePlaylistItem | string | number | ((item: BasePlaylistItem) => boolean), opts?: LoadOptions) => void; playNow: (items: BasePlaylistItem[], start?: BasePlaylistItem | string | number | ((item: BasePlaylistItem) => boolean), opts?: LoadOptions) => void; backlog: { (): ReadonlyArray; (items: T[]): void; }; backlogAppend: (item: T | T[]) => void; backlogRemove: (id: string | number) => void; backlogClear: () => void; addPlugin:

>(PluginClass: PluginCtorWithId & (new () => P), opts?: P['opts']) => this; getPlugin:

(PluginClass: PluginCtorWithId & (new () => P)) => P | undefined; getPluginById:

(id: string) => P | undefined; removePlugin:

>(PluginClass: PluginCtorWithId & (new () => P)) => void; removePluginById: (id: string) => void; plugins: () => ReadonlyArray; enabledPlugins: () => ReadonlyArray; constructor(id?: string | number); private _languageMemoryInstance; /** * Carries the viewer's chosen audio / subtitle language across items. Built * on first use — `options` is not assigned yet when fields initialise. */ private get languageMemory(); private _wantedPoster; private _defaultQualityApplied; /** * Resolve a raw image URL to an absolute poster string and apply it. * * Sync first — the poster MUST be on the `