UNPKG

tav-media

Version:

Cross platform media editing framework

69 lines (68 loc) 2.6 kB
import { tav } from '../tav'; import { Matrix } from '../types/types'; import { MediaClip } from './tav-media-clip'; import { Asset } from '../assets/tav-asset'; import { Rect } from '../types/tav-rect'; /** * A Media which might have a video output or a audio output. * @extends MediaClip * @hideconstructor * @category Clips */ export declare class MovieClip extends MediaClip { /** * Creates a new Movie from a asset. Returns null if the asset is not valid. * @param asset The asset to create the Movie from. * @param contentStartTime The start time of the content in the asset. * @param contentDuration The duration of the content in the asset. */ static MakeFromAsset(asset: Asset, contentStartTime?: number, contentDuration?: number): Promise<MovieClip>; /** * Creates a new Movie from a asset. Returns null if the asset is not valid. * @param asset The asset to create the Movie from. * @param ranges The time ranges wanted to be played. * @param contentOffset The offset of the time ranges. */ static MakeFromAssetAndRanges(asset: Asset, ranges: tav.TAVVideoRanges, contentOffset?: number): Promise<MovieClip>; private static _MakeFromAsset; readonly type: string; private _opacity; private _matrix; private _cropRect; private _contentRanges?; private _contentOffset?; clone(): MovieClip; protected createClip(): Promise<tav.Movie> | undefined; protected updateClip(clip: tav.Clip): Promise<void>; protected setContentStartTime(time: number): void; protected setContentDuration(time: number): void; /** * Get the width of the movie. */ get width(): number; /** * Get the height of the movie. */ get height(): number; /** * Get or set the alpha value of this movie. The value of this property must be in the range 0.0 * (transparent) to 1.0 (opaque). Values outside that range are clamped to the minimum or maximum. * The default value of this property is 1.0. */ get opacity(): number; set opacity(opa: number); /** * Get or sets the transformation which specifies how this movie's video contents are positioned in * parent Composition. */ get matrix(): Readonly<Matrix>; set matrix(matrix: Readonly<Matrix>); /** * Get or set the rectangle which specifies how this movie's video contents are cropped in parent * Composition. */ get cropRect(): Readonly<Rect>; set cropRect(rect: Readonly<Rect>); private updateMatrix; private updateCropRect; }