@diffusionstudio/core-v4
Version:
2D motion graphics and video rendering engine
26 lines (25 loc) • 949 B
TypeScript
import { RelativePoint } from '../renderer';
import { Layer } from '../layer';
import { Timestamp, Transcript } from '../models';
import { CaptionPresetConfig } from './interfaces';
import { AudioClip } from '../clips';
export declare class CaptionPreset {
/**
* This function returns the position of the captions
*/
position: RelativePoint;
constructor(config?: CaptionPresetConfig);
/**
* This function syncs the timestamp of the captions to the audio clip
* @param layer - The layer to sync
* @param clip - The audio clip to sync to
*/
sync(layer: Layer, clip: AudioClip): this;
/**
* This function creates the captions
* @param layer - The layer to apply the settings to
* @param transcript - The transcript to apply the settings to
* @param offset - The offset of the captions
*/
apply(layer: Layer, transcript: Transcript, offset: Timestamp): Promise<void>;
}