Constructors
Properties
currentTime
currentTime: number
isPlaying
isPlaying: boolean
layers
layers: Record<string, Layer> layersOrder
layersOrder: string[]
Methods
addLayer
- addLayer(layer: Layer, index?: number): Promise<void>
Parameters
- layer: Layer
Optional
index: number
Returns Promise<void>
addMedia
- addMedia(file: File): Promise<null | string>
Returns Promise<null | string>
adjustClipsLayout
- adjustClipsLayout(): void
Returns void
alignTime
- alignTime(time: number, roundDirection?: AlignRoundEnum): number
Returns number
createLayer
- createLayer(options?: { index?: number }): Layer
Parameters
Optional
options: { index?: number }
destroy
- destroy(): void
Returns void
getFitDuration
- getFitDuration(): number
Returns number
getFps
- getFps(): number
Returns number
getIsProcessing
- getIsProcessing(): boolean
Returns boolean
getLayerByClipId
- getLayerByClipId(clipId: string): undefined | Layer
Returns undefined | Layer
getLayerById
- getLayerById(layerId: string): undefined | Layer
Returns undefined | Layer
getLayerIdx
- getLayerIdx(layerId: string): number
Returns number
init
- init(): Promise<void>
Returns Promise<void>
moveClipToLayer
- moveClipToLayer(clipId: string, newLayerId: string): Promise<void>
Parameters
- clipId: string
- newLayerId: string
Returns Promise<void>
pause
- pause(): void
Returns void
play
- play(): Promise<void>
Returns Promise<void>
removeClip
- removeClip(clipId: string): boolean
Returns boolean
removeLayer
- removeLayer(layerId: string): boolean
Returns boolean
render
- render(): Promise<void>
Returns Promise<void>
seek
- seek(value: number): void
Returns void
serialize
- serialize(): {
fitDuration: number;
fps: number;
layers: {
clips: any[];
id: string;
muted?: boolean;
transitions: {
endClipId: string;
id: string;
inDuration: number;
name: string;
outDuration: number;
startClipId: string;
transitionSrc: string;
type: "transition";
}[];
visible?: boolean;
volume?: number;
}[];
startTime: number;
} Returns {
fitDuration: number;
fps: number;
layers: {
clips: any[];
id: string;
muted?: boolean;
transitions: {
endClipId: string;
id: string;
inDuration: number;
name: string;
outDuration: number;
startClipId: string;
transitionSrc: string;
type: "transition";
}[];
visible?: boolean;
volume?: number;
}[];
startTime: number;
}
setFps
- setFps(fps: number): void
Returns void
setSubtitles
- setSubtitles(subtitlesId: string, offset: number, clipIds?: string[]): void
Parameters
- subtitlesId: string
- offset: number
Optional
clipIds: string[]
Returns void