Video
Exports related to video media.
interface ClientRawVideo
extends VisibleMedia {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
dataUrl: (assetTime: Time, size?: Size) => DataOrError<string>
dataUrlPromise: (assetTime: Time, size?: Size) => Promise<DataOrError<string>>
deletedAt?: number
duration: number
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
loader?: VideoLoader
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
interface ClientVideo
extends HTMLVideoElement {
audioTracks?: Unknowns
mozHasAudio?: boolean
webkitAudioDecodedByteCount?: number
}
interface ClippedRawVideoObject
extends VisibleInstanceObject, AudibleInstanceObject {
container?: boolean
endTrim?: number
gain?: number
height?: number
heightEnd?: number
lock?: string
loops?: number
muted?: boolean
opacity?: number
opacityEnd?: number
pointAspect?: string
sizeAspect?: string
speed?: number
startTrim?: number
transparency?: Transparency | string
width?: number
widthEnd?: number
x?: number
xEnd?: number
y?: number
yEnd?: number
}
interface StorableMashVideo
extends StorableMash, MashVisibleProperties, MashAudibleProperties {
accountId?: string
buffer?: number
/** Background color. */
color?: string
createdAt?: number
height?: number
id?: string
label: string
loop?: boolean
/** Determines duration of clip frames. */
quantize?: number
resources?: Array<StorableResource>
shortest?: number
source: string
tracks?: Array<TrackObject>
type: string
updatedAt?: number
width?: number
}
interface StorableRawVideo
extends StorableMedia, VideoProperties {
accountId?: string
createdAt?: number
id?: string
label: string
resources?: Array<StorableResource>
source: string
type: string
updatedAt?: number
}
interface StoredMashVideo
extends StoredMash, MashVisibleProperties, MashAudibleProperties {
accountId: string
buffer?: number
/** Background color. */
color?: string
createdAt?: number
deletedAt?: number
height?: number
id: string
label: string
loop?: boolean
/** Determines duration of clip frames. */
quantize?: number
resources?: Array<StoredResource>
shortest?: number
source: string
tracks?: Array<TrackObject>
type: string
updatedAt?: number
userId?: string
width?: number
}
interface StoredRawVideo
extends StoredMedia, VideoProperties {
accountId: string
createdAt?: number
deletedAt?: number
id: string
label: string
resources?: Array<StoredResource>
source: string
type: string
updatedAt?: number
userId?: string
}
interface VideoCommandFileOptions
extends CommandFileOptions {
encodePath: AbsolutePath
jobPath: AbsolutePath
outputSize: Size
time: Time
videoRate: number
}
interface VideoCommandFilterArgs
extends CommandFilterArgs, VideoCommandFileOptions {
chainInput: string
clipTime: TimeRange
commandFiles: Array<CommandFile>
duration: number
encodePath: AbsolutePath
filterInput?: string
jobPath: AbsolutePath
outputSize: Size
time: Time
track: number
videoRate: number
}
interface VideoLoader {
resource: Resource
unload: () => void
url: (assetTime: Time, size?: Size) => DataOrError<string>
urlPromise: (assetTime: Time, size?: Size) => Promise<DataOrError<string>>
}
interface VideoOutputOptions
extends ImageOutputOptions, AudioOutputOptions {
audioBitrate?: Value
audioChannels?: number
audioCodec?: string
audioRate?: number
basename?: string
extension?: string
format?: string
options?: ValueRecord
videoBitrate?: Value
videoCodec?: string
videoRate?: number
}
interface VideoProperties {}
/** @implements ClientRawVideo */
class ClientRawVideoClass {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
dataUrl: (assetTime: Time, size?: Size) => DataOrError<string>
dataUrlPromise: (assetTime: Time, size?: Size) => Promise<DataOrError<string>>
deletedAt?: number
duration: number
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
loader?: VideoLoader
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
/** @implements VisibleInstance */
class ClippedClientRawVideoClass {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clientRawVideoMedia: () => ClientRawVideo
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
containerSvgItemPromise: (args: ContainerSvgItemArgs) => Promise<DataOrError<MaybeComplexSvgItem>>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentSvgItemPromise: (args: ContentSvgItemArgs) => Promise<DataOrError<MaybeComplexSvgItem>>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
/** @implements VisibleInstance */
class ClippedRawVideoClass {
asset: Media
assetFrames: (quantize: number) => Numbers
assetId: string
assetTime: (masherTime: Time) => Time
boolean: (key: string) => boolean
cacheInstance: (args: InstanceCacheArgs) => Promise<DataOrError<number>>
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clip: Clip
clippedElement: (content: VisibleInstance, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
containedItem: (contentItem: MaybeComplexSvgItem, containerItem: MaybeComplexSvgItem, args: ContainerSvgItemArgs) => DataOrError<SvgItemsRecord>
containerRects: (args: ContainerRectArgs, sizingSize: Size) => RectTuple
containerSvgItem: (args: ContainerSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
contentRect: (time: Time, containerRect: Rect, outputSize: Size) => Rect
contentRects: (args: ContentRectArgs) => RectTuple
contentSvgItem: (args: ContentSvgItemArgs) => DataOrError<MaybeComplexSvgItem>
cropDirections: SideDirectionRecord
frames: (quantize: number) => number
host: Plugins
id: string
instanceObject: InstanceObject
intrinsicRect: Rect
intrinsicsKnown: (options: IntrinsicOptions) => boolean
isDefault: boolean
mediaIds: Strings
muted: boolean
number: (key: string) => number
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
scalarsById: (targetId: string, time?: Time, timeIsStart?: boolean, useNames?: boolean) => SignalScalarRecord
scalarsRecord: (idOrNames: Strings) => ScalarRecord
scaleRects: (time: Time, range: TimeRange) => RectTuple
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
sizeKey?: SizeKey
string: (key: string) => string
svgVector: (rect: Rect, forecolor?: string, opacity?: Scalar) => SvgVector
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweening: boolean
tweens: (key: string) => boolean
value: (key: string) => Scalar | undefined
}
/** @implements VisibleMedia */
class RawVideoClass {
accountId: string
/** True if I have transparency. */
alpha?: boolean
api: () => Promise<DataOrError<Api>>
asStored: unknown
boolean: (key: string) => boolean
cacheMedia: (args: MediaCacheArgs) => Promise<DataOrError<number>>
/** True if I can be a clipped container. */
canBeContainer?: boolean
/** True if I can be clipped content. */
canBeContent?: boolean
/** True if I am a fill color. */
canBeFill?: boolean
canBeMuted: boolean
changeObject: (propertyId: SignalId, scalar?: Scalar) => ChangeEditObject
changeScalars: (scalars: ScalarsById) => void
changesObject: (scalars: ScalarsById) => ChangePropertiesEditObject
clipObject: (object?: InstanceObject) => ClipObject
constrainedValue: (found: Property, value?: Scalar) => Scalar | undefined
createdAt?: number
deletedAt?: number
duration: number
fetchResource: (resource: Resource) => Promise<DataOrError<true>>
findResource: (types: Strings) => Resource | undefined
frames: (quantize: number) => number
hasIntrinsicSizing?: boolean
hasIntrinsicTiming?: boolean
host: Plugins
id: string
instanceArgs: (object?: InstanceObject) => InstanceArgs
instanceFromObject: (object?: InstanceObject) => Instance
/** True if I am vector-based. */
isVector?: boolean
label: string
mediaIds: Strings
number: (key: string) => number
/** Size drawn from sized resource. */
probeSize?: Size
properties: Array<Property>
propertiesOfTarget: (targetId: string) => Array<Property>
propertyFind: (name: string) => Property | undefined
propertyIds: (targetId: string) => Array<SignalId>
resources: Array<Resource>
scalarsRecord: (idOrNames: Strings) => ScalarRecord
setValue: (nameOrId: string, scalar?: Scalar, dontConstrain?: boolean) => void
shouldSelectProperty: (property: Property) => boolean
source: string
string: (key: string) => string
targetId: string
toJSON: () => unknown
tweenValues: (key: string, time: Time, range: TimeRange) => Array<Scalar>
tweens: (key: string) => boolean
type: string
unload: () => void
updatedAt?: number
userId?: string
value: (key: string) => Scalar | undefined
}
class VideoBitmapLoader
extends VideoPreviewLoader {
framePromise: (time: Time, size?: Size) => Promise<DataOrError<string>>
promises: Map<string, Promise<DataOrError<string>>>
resource: Resource
resourceCreate: (time: Time) => Promise<DataOrError<Resource>>
resourceFrame: (time: Time) => number
resourceGet: (time: Time) => Promise<DataOrError<Resource>>
unload: () => void
url: (time: Time, size?: Size) => DataOrError<string>
urlPromise: (time: Time, size?: Size) => Promise<DataOrError<string>>
}
class VideoFrameLoader
extends VideoPreviewLoader {
clientVideo: ClientVideo | undefined
framePromise: (time: Time, size?: Size) => Promise<DataOrError<string>>
promises: Map<string, Promise<DataOrError<string>>>
resource: Resource
unload: () => void
url: (time: Time, size?: Size) => DataOrError<string>
urlPromise: (time: Time, size?: Size) => Promise<DataOrError<string>>
}
/** @implements MashCommand */
class VideoMashCommandClass
extends MashCommandClass {
_id: StringOrNot
alphamergeFilters: (maskInput: string, maskedInput: string, outputId: string, transparency: Transparency, debug?: boolean) => Array<CommandFilter>
assetsServerPromise: () => Promise<DataOrError<number>>
audible: boolean
avType?: AudibleType
baseCommandFilePromise: (media: Media, args: FilesCacheArgs, commandFile: CommandFile) => Promise<DataOrError<number>>
clip: () => Clip | undefined
colorFilter: (outputId: string, color: string, rate: number, size?: Size, duration?: number) => CommandFilter
commandFilePromise: (media: Media, args: FilesCacheArgs, commandFile: CommandFile) => Promise<DataOrError<number>>
commandFiles: (instance: Instance | VisibleInstance, cacheArgs: CommandFileArgs) => Array<CommandFile>
commandRawFilePromise: (media: Media, args: FilesCacheArgs, file: CommandFile) => Promise<DataOrError<number>>
commandSvgFilePromise: (media: VisibleMedia, args: FilesCacheArgs, file: CommandFile) => Promise<DataOrError<number>>
duration: number
encodeDescription: () => Promise<EncodeDescription>
filters: () => Promise<Array<CommandFilter>>
id: () => string
inputCommandFiles: () => Promise<Array<CommandFile>>
inputs: () => Promise<CommandInputRecord>
mediaType: MediaType
opacityCommandFilters: (clip: Clip, filterInput: string, args: VideoCommandFilterArgs) => Array<CommandFilter>
precodeDescription: () => Promise<PrecodeDescription>
precodeFilters: (inputId: string, outputId: string, args: VisibleCommandFilterArgs, alpha?: boolean) => Array<CommandFilter>
setPtsSpeedFilters: (inputId: string, outputId: string, instance: Instance) => Array<CommandFilter>
time: Time
videoCommandFiles: (clip: Clip, args: VideoCommandFileOptions) => Promise<Array<CommandFile>>
videoCommandFilters: (clip: Clip, args: VideoCommandFilterArgs) => Promise<Array<CommandFilter>>
visible: boolean
visibleCommandFiles: (instance: Instance, args: VisibleCommandFileArgs, content?: Instance) => Array<CommandFile>
}
/** @implements VideoLoader */
class VideoPreviewLoader {
framePromise: (time: Time, size?: Size) => Promise<DataOrError<string>>
promises: Map<string, Promise<DataOrError<string>>>
resource: Resource
unload: () => void
url: (assetTime: Time, size?: Size) => DataOrError<string>
urlPromise: (assetTime: Time, size?: Size) => Promise<DataOrError<string>>
}
function VideoMediaMixin<T = Constrained<VisibleMedia>>(
Base: T
): Mixed<T, Media>