import * as PIXI from "pixi.js"; import { ReplaceMediaOptions } from '../../../../index'; import { Clip, ClipOptions } from "../../Clip"; import { ClipStyle } from "../../ClipStyle"; /** * Options for creating a GIF-backed clip. */ export interface GifClipOptions extends ClipOptions { /** * Library media identifier for the GIF asset to decode and display. */ mediaDataId: string; } /** * Clip implementation for animated GIF media. * * GIF playback is modeled as timeline-driven seeking rather than free-running playback so the clip stays * deterministic during scrubbing, rendering, masking, and repeated preview updates. */ export declare class GifClip extends Clip> { private lastUpdateTime; private lastStartTime; private lastLeftTrim; private lastRightTrim; private gifAnimator; constructor(options: GifClipOptions); private createGifAnimatorFromMediaBlob; init(layerId: string): Promise; private getGlobalTimeToClipTime; /** * Replaces the GIF media source while preserving the clip's placement and, when possible, its framing intent. * * Crop and scale values are translated to the new source dimensions, and duration changes are reflected in * the clip trims so existing timeline placement remains usable after replacement. * * @param newMediaId Optional replacement library media id. When omitted, the current media id is reloaded. * @param options Replacement behavior controlling fit/crop adjustments. * @returns `true` when the replacement succeeded. */ updateMediaData(newMediaId?: string, options?: ReplaceMediaOptions): Promise; /** * Seeks the GIF to the frame that corresponds to the supplied timeline time. * * @param currentTime Global timeline time in seconds. */ preload(currentTime: number): void; private play; private pause; private seek; /** * Prepares the clip for playback by aligning the animated GIF state with the current timeline time. * * @param currentTime Timeline time in seconds at the moment playback starts. */ onPlay(currentTime: number): Promise; /** * Freezes the GIF on the frame that should remain visible at the current timeline time. * * @param currentTime Timeline time in seconds at the moment playback stops. */ onPause(currentTime: number): Promise; updateVisibility(currentTime: number): void; update(currentTime: number): void; /** * Creates a clone from the serialized clip payload. * * @returns Cloned GIF clip instance. */ clone(): Clip>; /** * Releases the Pixi sprite/GIF resources owned by the clip. */ destroy(): void; }