tav-media
Version:
Cross platform media editing framework
76 lines (75 loc) • 2.38 kB
TypeScript
import { tav } from '../tav';
import { Clip } from './tav-clip';
import { MovieClip } from './tav-movie-clip';
import { FakeClip } from './tav-fake-clip';
/**
* An object that combines and arranges clips into a single composite clip that you can play or
* process.
* @category Clips
*/
export declare class Composition extends MovieClip {
/**
* Create a new composition with specified size.
* @param width The width of the composition.
* @param height The height of the composition.
* @param contentStartTime The start time of the content of this composition.
* @param contentDuration The duration of the content of this composition.
*/
static Make(width: number, height: number, contentStartTime?: number, contentDuration?: number): Promise<Composition>;
readonly type: string;
readonly clips: (Composition | Clip)[];
private fakeClips;
private lastNoticeUpdateFakeClip;
private _width;
private _widthInvalid;
private _height;
private _heightInvalid;
/**
* Adds a clip to this composition.
*/
addClip(clip: Clip): void;
/**
* Removes a clip from this composition.
* @param clip
*/
removeClip(clip: Clip): void;
hasChildClip(clip: Clip): boolean;
/**
* Removes all clips from this composition.
*/
removeAllClips(): void;
/**
* Get all chid clips
*/
getAllClips(): Clip[];
/**
* Make fakeClip from this composition,
* used to reference a snapshot of this composition in other effects
*/
MakeFakeClip(): FakeClip;
/**
* whether this composition has a fakeClip child that need rebuild
* @ignore
*/
hasFakeClipNativeInvalidated(): boolean;
/**
* whether fake clips of this composition to rebuild
* @ignore
*/
noticeFakeClipsUpdate(noticeClip?: Clip): void;
/**
* remove one fake clip from this composition's fake clips
* @ignore
*/
removeFakeClip(fakeClip: FakeClip): void;
/**
* Release this composition and all clips of this composition.
*/
release(): void;
protected createClip(): Promise<tav.Composition> | undefined;
protected updateClip(composition: tav.Composition): Promise<void>;
get width(): number;
set width(w: number);
get height(): number;
set height(h: number);
}