export declare const MIN_NATIVE_PLAYBACK_RATE=0.0625;export declare const MAX_NATIVE_PLAYBACK_RATE=16; /** Native media notifications exposed by the public video surface. These events do not bubble or * compose natively, so a shadow-DOM wrapper must relay them from its own host. */ export declare const NATIVE_MEDIA_RELAY_EVENTS:readonly['ended','error','loadedmetadata','pause','play','timeupdate','volumechange'];export interface NativeTextTrackPreference{index:number;kind:string;label:string;language:string;} /** User-controlled media state safe to carry to another native media element. Every field is * optional so malformed or unavailable native values are omitted rather than normalized into a * preference the user never chose. */ export interface NativeMediaPreferences{volume?:number;muted?:boolean;playbackRate?:number;textTrack?:NativeTextTrackPreference|null;}export interface NativeMediaSourceSet{ /** A direct native `src`. Empty/omitted leaves source selection to cloned `` nodes. */ src?:unknown; /** Consumer-owned ``/`` nodes. Safe allowlisted clones are inserted. */ nodes?:Iterable;}export interface NativeMediaControllerOptions{ /** Native events observed by `onEvent`. Relay events are added automatically. */ events?:readonly string[]; /** Events re-dispatched from `target`. Defaults to `NATIVE_MEDIA_RELAY_EVENTS`. */ relayEvents?:readonly string[];onEvent?:(event:Event,controller:NativeMediaController)=>void;} /** Returns a validated media URL without widening the shared media-source scheme allowlist. */ export declare function safeNativeMediaSource(value:unknown):string|null; /** * Creates fresh, safe native media children in `targetDocument`. * * Only URL-validated ``/`` elements and their native allowlisted attributes cross * the boundary. Consumer nodes are never moved or cloned wholesale, so ids, handlers, styles, and * arbitrary data attributes cannot leak into the private media tree. */ export declare function cloneSafeMediaNodes(nodes:Iterable,targetDocument:Document):Array; /** Feature-based fullscreen capability check; deliberately contains no browser-name branch. */ export declare function canRequestFullscreen(element:Element|null|undefined):boolean; /** Feature-based fullscreen-exit capability check. */ export declare function canExitFullscreen(documentRef:Document|null|undefined):boolean; /** Feature-based picture-in-picture capability check; unsupported and explicitly-disabled videos * both return false. */ export declare function canRequestPictureInPicture(media:HTMLMediaElement|null|undefined):media is HTMLVideoElement; /** * Owns one native media element's source generation, listeners, finite state, preferences, and * host relays. It has no rendering policy, making it reusable by native-control and custom-control * players alike. */ export declare class NativeMediaController{#private;private readonly target;constructor(target:EventTarget,options?:NativeMediaControllerOptions);get element():HTMLMediaElement|undefined; /** Token for async work that belongs to the current attached source. */ get generation():number; /** Whether an async result still belongs to the current source and optional native element. */ isCurrentGeneration(generation:number,media?:HTMLMediaElement|undefined):boolean;get duration():number;get currentTime():number;set currentTime(value:number);get volume():number;set volume(value:number);get muted():boolean;set muted(value:boolean);get playbackRate():number;set playbackRate(value:number); /** Replaces the controlled native element. The old element is synchronously silenced and cannot * emit into the new generation. Valid user preferences are carried to the replacement. */ attach(media:HTMLMediaElement|null|undefined):void; /** Starts a source generation on the current element, preserving valid user preferences while * clearing duration/time and rejecting every listener captured by the prior generation. */ startGeneration():number; /** Stops playback and listeners while retaining the element for a later reconnect. */ disconnect():void; /** Reattaches one listener set to the retained element after a disconnect. */ reconnect():void; /** Returns the exact native promise. This method is intentionally not `async`, which would wrap * the promise and break identity/rejection behavior. */ play():Promise;pause():void; /** Restarts native resource selection under a fresh listener generation. */ load():void; /** Pauses, removes direct sources/tracks, clears `src`, and resets native resource selection. */ unload():void; /** Validates a direct URL and replaces media children with fresh allowlisted clones. */ setSources(sourceSet:NativeMediaSourceSet):boolean;captureUserPreferences(media?:HTMLMediaElement|undefined):NativeMediaPreferences; /** Applies only fields that are already valid preferences. Invalid input leaves native state * untouched instead of clamping attacker- or race-produced data into a new user choice. */ applyUserPreferences(preferences:Readonly,media?:HTMLMediaElement|undefined):void;}