UNPKG

tav-media

Version:

Cross platform media editing framework

35 lines (34 loc) 1.11 kB
import { Clip } from '../clips/tav-clip'; import { tav } from '../tav'; import { Asset } from './tav-asset'; /** * AudioAsset is an asset that can be used to play audio. * @hideconstructor * @category Assets */ export declare class AudioAsset extends Asset { /** * Creates a TAVMedia Audio object from a specified range of a audio file, return null if the file does * not exist or it's not a valid audio file. * @param path The path of the audio file. * @param duration Externally specified duration of the file, the default value 0 means to use the * actual duration */ static MakeFromPath(path: string, duration?: number): Promise<AudioAsset>; /** * Returns `'AudioAsset'` */ readonly type = "AudioAsset"; private audioDuration; private clipId; /** * @ignore */ $getCopyOrSelfWillBeUsedByClip(clip: Clip): Promise<AudioAsset>; protected doPrepare(): Promise<void>; /** * Returns the duration of this asset. */ get duration(): number; protected createAsset(): Promise<tav.AudioAsset> | undefined; }