import { MoviElement as MoviElementType } from './render/MoviElement'; /** * Movi Element Module * * Provides the custom HTML element wrapper for Movi Player. * This is the complete bundle including UI controls and gestures. * * Usage: * ```typescript * import { MoviElement } from 'movi/element'; * // or just use in HTML * ``` * * HTML Usage: * ```html * * ``` */ export type { Track, TrackType, VideoTrack, AudioTrack, SubtitleTrack, SubtitleRenderer, SubtitleCue, SourceConfig, CacheConfig, RendererType, DecoderType, PlayerConfig, MediaInfo, VideoDecoderConfig, AudioDecoderConfig, Packet, DecodedVideoFrame, DecodedAudioFrame, PlayerState, PlayerEventMap, } from './types'; export { Logger, LogLevel } from './utils/Logger'; export { Time, TIME_BASE } from './utils/Time'; export { EventEmitter } from './events/EventEmitter'; export { WasmBindings, ThumbnailBindings, type DataSource } from './wasm/bindings'; export { loadWasmModule, loadWasmModuleNew, getWasmModule, isWasmModuleLoaded } from './wasm/FFmpegLoader'; export type { MoviWasmModule, StreamInfo, PacketInfo } from './wasm/types'; export type { SourceAdapter } from './source/SourceAdapter'; export { HttpSource, createHttpSource } from './source/HttpSource'; export { FileSource, createFileSource } from './source/FileSource'; export { ThumbnailHttpSource, createThumbnailHttpSource } from './source/ThumbnailHttpSource'; export { EncryptedHttpSource } from './source/EncryptedHttpSource'; export type { EncryptedSourceConfig } from './source/EncryptedHttpSource'; export { registerSourceAdapter, unregisterSourceAdapter, getRegisteredSchemes, } from './source/adapterRegistry'; export type { SourceAdapterFactory, SourceAdapterFactoryConfig, } from './source/adapterRegistry'; export { generateFingerprint } from './utils/Fingerprint'; export { LRUCache } from './cache/LRUCache'; export { Demuxer } from './demux/Demuxer'; export { MoviVideoDecoder } from './decode/VideoDecoder'; export { MoviAudioDecoder } from './decode/AudioDecoder'; export { SubtitleDecoder } from './decode/SubtitleDecoder'; export { CanvasRenderer } from './render/CanvasRenderer'; export { AudioRenderer } from './render/AudioRenderer'; export { TrackManager } from './core/TrackManager'; export { Clock } from './core/Clock'; export { PlayerStateManager } from './core/PlayerState'; export { PlaybackController } from './core/PlaybackController'; export { MoviPlayer } from './core/MoviPlayer'; export { MoviElement } from './render/MoviElement'; export type { MoviControlSpec, MoviControlItem } from './render/MoviElement'; export { VERSION } from './version'; export { BUILD } from './build-flags'; export { QoECollector, beaconSink, QOE_SCHEMA_VERSION, } from './utils/QoE'; export type { QoEEvent, QoESink, QoESession } from './utils/QoE'; /** * The documented `` attribute surface. Kept as a flat string/ * boolean map so it can back both the HTMLElementTagNameMap typing and the * framework wrappers. Any attribute may also be set as a property on the * element instance (see MoviElement). */ export interface MoviPlayerAttributes { src?: string; poster?: string; posterfit?: string; postertime?: string; controls?: boolean | ""; autoplay?: boolean | ""; loop?: boolean | ""; muted?: boolean | ""; /** Play inline (don't auto-fullscreen on iOS). On any touch device, touch * gestures (swipe-seek / volume) are suppressed while inline so they don't * fight the page's scroll; fullscreen gestures are unaffected. Replaces * `gesturefs`. */ playsinline?: boolean | ""; preload?: "none" | "metadata" | "auto"; volume?: number | string; playbackrate?: number | string; theme?: "dark" | "light"; /** One or two CSS colours, space-separated: primary, then optional * secondary (`"#8B5CF6 #22D3EE"`). */ themecolor?: string; title?: string; headers?: string; crossorigin?: "anonymous" | "use-credentials"; vr?: string; vrpad?: boolean | ""; audioonly?: boolean | ""; audiooutput?: string; stablevolume?: boolean | ""; ambientmode?: boolean | ""; resume?: boolean | ""; drm?: string; licenseurl?: string; /** Extra HTTP headers for the DRM license request only (JSON object string). */ licenseheaders?: string; encrypted?: boolean | ""; lcevc?: boolean | ""; lcevcurl?: string; /** Token endpoint URL for encrypted playback. */ tokenurl?: string; /** Video endpoint URL for encrypted playback. */ videourl?: string; /** Video identifier sent to the token server. */ videoid?: string; /** Element width in pixels (CSS sizing is preferred). */ width?: number | string; /** Element height in pixels (CSS sizing is preferred). */ height?: number | string; /** How the video fills the canvas. */ objectfit?: "contain" | "cover" | "fill" | "zoom" | "control"; /** Rotate the video, in degrees (snaps to a quarter-turn). */ rotate?: 0 | 90 | 180 | 270; /** Rendering backend. */ renderer?: "canvas"; /** Show the title-bar overlay at the top of the player. */ showtitle?: boolean | ""; /** Where the title bar may show, plus an optional back arrow. Tokens: * `both` (default) / `fullscreen` / `windowed`, and `back` — scoped with * `back-mobile`, `back-fullscreen` or `back-mobile-fullscreen`. */ titlemode?: string; /** Chapters from outside the media file, as a JSON array of * `{ title, start, end?, image? }` (seconds). `image` is a URL the timeline * tile shows instead of decoding a frame at `start`. Use the `chapters` * property to pass the array directly. */ chapters?: string; /** Enable ±10s fast-seek. Bare = every affordance; a token list narrows it to * `buttons` (the bottom-bar pair), `keys` (arrow keys) and/or `gestures` * (double-tap and drag-to-seek) — e.g. `fastseek="keys gestures"`. Aliases: * `touch`, `nontouch`, `keyonly`, `controls`, `none`. */ fastseek?: boolean | "" | string; /** Enable the double-tap-to-seek gesture. */ doubletap?: boolean | ""; /** Disable all keyboard shortcuts. */ nohotkeys?: boolean | ""; /** Start playback at this time, in seconds. */ startat?: number | string; /** Target prefetch window, in megabytes. */ buffersize?: number | string; /** Override the video frame rate (0 = use the source's own). */ fps?: number | string; /** Force software decoding (FFmpeg WASM) instead of WebCodecs. `auto` (default) picks per source. */ sw?: boolean | "auto"; /** Enable HDR tone-mapping (Chromium + canvas renderer + HDR source). */ hdr?: boolean | ""; /** Generate on-demand thumbnails for seek-bar previews. */ thumb?: boolean | ""; /** Subtitle timing offset, in seconds (positive = later, VLC/mpv sign). */ subtitledelay?: number | string; /** Subtitle font size — a multiplier, or a percentage above 5. */ subtitlesize?: number | string; /** Subtitle text colour as a hex string (`#fff` / `#ffffff`). */ subtitlecolor?: string; /** Subtitle background opacity — 0–1, or a percentage above 1. */ subtitlebg?: number | string; /** Subtitle edge style. */ subtitleedge?: "none" | "shadow" | "outline" | "raised"; /** CSS selector for an external element to receive the ambient glow. */ ambientwrapper?: string; /** Crop the black bars that are part of the picture, so `cover` / `fill` / * `zoom` size the image rather than its padding. */ /** How far the demuxer may read before naming the streams: bytes, or * "512kb" / "2mb". Omit for the built-in budget — see the docs, it is * generous on purpose. */ probesize?: string | number; /** How much media it may analyse first, in milliseconds. Companion to * `probesize`. */ probeduration?: string | number; cropbars?: boolean | ""; /** Let `autoplay` start while the tab is hidden. Off by default: a first play * in a background tab runs into a throttled rAF and can park in buffering. */ backgroundplay?: boolean | ""; /** Stall sound and picture together. ON by default, so this is an opt-OUT and * the value carries it: `bindav="false"` (or off/0/no) unbinds them. */ bindav?: boolean | "false" | ""; /** What to do with a source Movi can't play (`native` → hand to `