Exports related to media.

Classes

ClientMediaClass

Extends MediaClass. Extended by ClientVisibleMediaClass and ClientRawMediaClass. Implements ClientAsset.

new ClientMediaClass(object): ClientMediaClass

ParameterTypeDescription
objectStorableMedia

Returns ClientMediaClass. Inherited from MediaClass.constructor.

PropertyModifierType
asDatapublic readonlyStorableMedia
decodingspublic readonlyDecoding[]
hasIntrinsicSizingpublicundefined | boolean
hasIntrinsicTimingpublicundefined | boolean
idpublicstring
mediaIdspublic readonlystring[]
projectIdpublicundefined | string
propertiespublicProperty[]
resourcespublicResource[]
saveNeededpublic readonlyboolean
sourcepublicstring
targetIdpublicstring
typepublicMediaType
unsavedResourcespublic readonlyResource[]

Methods

addResource(resource): void

ParameterTypeDescription
resourceResource

Returns void. Implementation of ClientAsset.addResource.

assetCachePromise(args): Promise<DataOrError<number>>

ParameterTypeDescription
argsAssetCacheArgs

Returns Promise<DataOrError<number>>. Implementation of ClientAsset.assetCachePromise, Inherited from MediaClass.assetCachePromise.

assetFiles(args): AssetFile[]

ParameterTypeDescription
argsCacheArgs

Returns AssetFile[]. Implementation of ClientAsset.assetFiles, Inherited from MediaClass.assetFiles.

assetIcon(size, cover?, patch?): Promise<DataOrError<SVGSVGElement>>

ParameterTypeDescription
sizeSize<number>
cover?boolean
patch?Element

Returns Promise<DataOrError<SVGSVGElement>>. Implementation of ClientAsset.assetIcon.

assetIconPromise(resource, options, cover?, patch?): Promise<DataOrError<SVGImageElement>>

ParameterTypeDescription
resourceResource
optionsSize<number> | Rect<number>
cover?boolean
patch?Element

Returns Promise<DataOrError<SVGImageElement>>. Implementation of ClientAsset.assetIconPromise.

boolean(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of ClientAsset.boolean, Inherited from MediaClass.boolean.

changeObject(signalId, scalar?): ChangeEditObject

ParameterTypeDescription
signalId`${string}.${string}`
scalar?Scalar

Returns ChangeEditObject. Implementation of ClientAsset.changeObject, Inherited from MediaClass.changeObject.

changeScalars(scalars): void

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns void. Implementation of ClientAsset.changeScalars, Inherited from MediaClass.changeScalars.

changesObject(scalars): ChangePropertiesEditObject

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns ChangePropertiesEditObject. Implementation of ClientAsset.changesObject, Inherited from MediaClass.changesObject.

clipObject(object?): ClipObject

ParameterTypeDescription
object?InstanceObject

Returns ClipObject. Implementation of ClientAsset.clipObject, Inherited from MediaClass.clipObject.

commandFilePromise(args, commandFile): Promise<DataOrError<number>>

ParameterTypeDescription
argsServerPromiseArgs
commandFileCommandFile

Returns Promise<DataOrError<number>>. Implementation of ClientAsset.commandFilePromise, Inherited from MediaClass.commandFilePromise.

constrainedValue(property, value?): undefined | Scalar

ParameterTypeDescription
propertyProperty
value?Scalar

Returns undefined | Scalar. Implementation of ClientAsset.constrainedValue, Inherited from MediaClass.constrainedValue.

decodingOfType(…types): undefined | Decoding

ParameterTypeDescription
typesstring[]

Returns undefined | Decoding. Inherited from MediaClass.decodingOfType.

findResource(…typesOrSources): undefined | Resource

ParameterTypeDescription
typesOrSourcesstring[]

Returns undefined | Resource. Implementation of ClientAsset.findResource, Inherited from MediaClass.findResource.

imagePromise(resource): Promise<DataOrError<ClientImage>>

ParameterTypeDescription
resourceResource

Returns Promise<DataOrError<ClientImage>>. Implementation of ClientAsset.imagePromise.

instanceArgs(object?): InstanceArgs

ParameterTypeDescription
object?InstanceObject

Returns InstanceArgs. Implementation of ClientAsset.instanceArgs, Inherited from MediaClass.instanceArgs.

instanceFromObject(object?): Instance

ParameterTypeDescription
object?InstanceObject

Returns Instance. Implementation of ClientAsset.instanceFromObject, Inherited from MediaClass.instanceFromObject.

number(id): number

ParameterTypeDescription
idstring

Returns number. Implementation of ClientAsset.number, Inherited from MediaClass.number.

propertiesOfTarget(targetId): Property[]

ParameterTypeDescription
targetIdstring

Returns Property[]. Implementation of ClientAsset.propertiesOfTarget, Inherited from MediaClass.propertiesOfTarget.

propertyFind(name): undefined | Property

ParameterTypeDescription
namestring

Returns undefined | Property. Implementation of ClientAsset.propertyFind, Inherited from MediaClass.propertyFind.

propertyIds(targetId): `${string}.${string}`[]

ParameterTypeDescription
targetIdstring

Returns `${string}.${string}`[]. Implementation of ClientAsset.propertyIds, Inherited from MediaClass.propertyIds.

savePromise(progress?): Promise<DataOrError<string>>

ParameterTypeDescription
progress?ServerProgress

Returns Promise<DataOrError<string>>. Implementation of ClientAsset.savePromise.

scalarsRecord(idOrNames): ScalarRecord

ParameterTypeDescription
idOrNamesstring[]

Returns ScalarRecord. Implementation of ClientAsset.scalarsRecord, Inherited from MediaClass.scalarsRecord.

setValue(id, value?, dontConstrain?): void

ParameterTypeDescription
idstring
value?Scalar
dontConstrain?boolean

Returns void. Implementation of ClientAsset.setValue, Inherited from MediaClass.setValue.

shouldSelectProperty(property): boolean

ParameterTypeDescription
propertyProperty

Returns boolean. Implementation of ClientAsset.shouldSelectProperty, Inherited from MediaClass.shouldSelectProperty.

string(id): string

ParameterTypeDescription
idstring

Returns string if the value is a string, otherwise throws an assertion error. Implementation of ClientAsset.string, Inherited from MediaClass.string.

toJSON(): UnknownRecord

Returns UnknownRecord. Implementation of ClientAsset.toJSON, Inherited from MediaClass.toJSON.

tweenValues(key, time, range): Scalar[]

ParameterTypeDescription
keystring
timeTime
rangeTimeRange

Returns Scalar[]. Implementation of ClientAsset.tweenValues, Inherited from MediaClass.tweenValues.

tweens(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of ClientAsset.tweens, Inherited from MediaClass.tweens.

tweensProperty(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Inherited from MediaClass.tweensProperty.

unload(): void

Returns void. Implementation of ClientAsset.unload.

value(id): undefined | Scalar

ParameterTypeDescription
idstring

Returns undefined | Scalar. Implementation of ClientAsset.value, Inherited from MediaClass.value.

MediaClass

Extends PropertiedClass. Extended by ClientMediaClass and RawMediaClass. Implements Media.

new MediaClass(object): MediaClass

ParameterTypeDescription
objectStorableMedia

Returns MediaClass. Overrides PropertiedClass.constructor.

PropertyModifierType
asDatapublic readonlyStorableMedia
decodingspublic readonlyDecoding[]
hasIntrinsicSizingpublicundefined | boolean
hasIntrinsicTimingpublicundefined | boolean
idpublicstring
mediaIdspublic readonlystring[]
projectIdpublicundefined | string
propertiespublicProperty[]
resourcespublicResource[]
sourcepublicstring
targetIdpublicstring
typepublicMediaType

Methods

assetCachePromise(args): Promise<DataOrError<number>>

ParameterTypeDescription
argsAssetCacheArgs

Returns Promise<DataOrError<number>>. Implementation of Media.assetCachePromise.

assetFiles(args): AssetFile[]

ParameterTypeDescription
argsCacheArgs

Returns AssetFile[]. Implementation of Media.assetFiles.

boolean(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of Media.boolean, Inherited from PropertiedClass.boolean.

changeObject(signalId, scalar?): ChangeEditObject

ParameterTypeDescription
signalId`${string}.${string}`
scalar?Scalar

Returns ChangeEditObject. Implementation of Media.changeObject, Inherited from PropertiedClass.changeObject.

changeScalars(scalars): void

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns void. Implementation of Media.changeScalars, Inherited from PropertiedClass.changeScalars.

changesObject(scalars): ChangePropertiesEditObject

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns ChangePropertiesEditObject. Implementation of Media.changesObject, Inherited from PropertiedClass.changesObject.

clipObject(object?): ClipObject

ParameterTypeDescription
object?InstanceObject

Returns ClipObject. Implementation of Media.clipObject.

commandFilePromise(args, commandFile): Promise<DataOrError<number>>

ParameterTypeDescription
argsServerPromiseArgs
commandFileCommandFile

Returns Promise<DataOrError<number>>. Implementation of Media.commandFilePromise.

constrainedValue(property, value?): undefined | Scalar

ParameterTypeDescription
propertyProperty
value?Scalar

Returns undefined | Scalar. Implementation of Media.constrainedValue, Inherited from PropertiedClass.constrainedValue.

decodingOfType(…types): undefined | Decoding

ParameterTypeDescription
typesstring[]

Returns undefined | Decoding.

findResource(…typesOrSources): undefined | Resource

ParameterTypeDescription
typesOrSourcesstring[]

Returns undefined | Resource. Implementation of Media.findResource.

instanceArgs(object?): InstanceArgs

ParameterTypeDescription
object?InstanceObject

Returns InstanceArgs. Implementation of Media.instanceArgs.

instanceFromObject(object?): Instance

ParameterTypeDescription
object?InstanceObject

Returns Instance. Implementation of Media.instanceFromObject.

number(id): number

ParameterTypeDescription
idstring

Returns number. Implementation of Media.number, Inherited from PropertiedClass.number.

propertiesOfTarget(targetId): Property[]

ParameterTypeDescription
targetIdstring

Returns Property[]. Implementation of Media.propertiesOfTarget, Inherited from PropertiedClass.propertiesOfTarget.

propertyFind(name): undefined | Property

ParameterTypeDescription
namestring

Returns undefined | Property. Implementation of Media.propertyFind, Inherited from PropertiedClass.propertyFind.

propertyIds(targetId): `${string}.${string}`[]

ParameterTypeDescription
targetIdstring

Returns `${string}.${string}`[]. Implementation of Media.propertyIds, Inherited from PropertiedClass.propertyIds.

scalarsRecord(idOrNames): ScalarRecord

ParameterTypeDescription
idOrNamesstring[]

Returns ScalarRecord. Implementation of Media.scalarsRecord, Inherited from PropertiedClass.scalarsRecord.

setValue(id, value?, dontConstrain?): void

ParameterTypeDescription
idstring
value?Scalar
dontConstrain?boolean

Returns void. Implementation of Media.setValue, Inherited from PropertiedClass.setValue.

shouldSelectProperty(property): boolean

ParameterTypeDescription
propertyProperty

Returns boolean. Implementation of Media.shouldSelectProperty, Inherited from PropertiedClass.shouldSelectProperty.

string(id): string

ParameterTypeDescription
idstring

Returns string if the value is a string, otherwise throws an assertion error. Implementation of Media.string, Inherited from PropertiedClass.string.

toJSON(): UnknownRecord

Returns UnknownRecord. Implementation of Media.toJSON, Inherited from PropertiedClass.toJSON.

tweenValues(key, time, range): Scalar[]

ParameterTypeDescription
keystring
timeTime
rangeTimeRange

Returns Scalar[]. Implementation of Media.tweenValues, Inherited from PropertiedClass.tweenValues.

tweens(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of Media.tweens, Inherited from PropertiedClass.tweens.

tweensProperty(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Inherited from PropertiedClass.tweensProperty.

value(id): undefined | Scalar

ParameterTypeDescription
idstring

Returns undefined | Scalar. Implementation of Media.value, Inherited from PropertiedClass.value.

PropertiedClass

Extended by MediaClass, InstanceClass, ClipClass, and TrackClass. Implements Propertied.

new PropertiedClass(object): PropertiedClass

ParameterTypeDescription
objectobject

Returns PropertiedClass.

PropertyModifierType
idpublicstring
propertiespublicProperty[]
targetIdpublicstring

Methods

boolean(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of Propertied.boolean.

changeObject(signalId, scalar?): ChangeEditObject

ParameterTypeDescription
signalId`${string}.${string}`
scalar?Scalar

Returns ChangeEditObject. Implementation of Propertied.changeObject.

changeScalars(scalars): void

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns void. Implementation of Propertied.changeScalars.

changesObject(scalars): ChangePropertiesEditObject

ParameterTypeDescription
scalarsPartial<SignalScalarRecord>

Returns ChangePropertiesEditObject. Implementation of Propertied.changesObject.

constrainedValue(property, value?): undefined | Scalar

ParameterTypeDescription
propertyProperty
value?Scalar

Returns undefined | Scalar. Implementation of Propertied.constrainedValue.

number(id): number

ParameterTypeDescription
idstring

Returns number. Implementation of Propertied.number.

propertiesOfTarget(targetId): Property[]

ParameterTypeDescription
targetIdstring

Returns Property[]. Implementation of Propertied.propertiesOfTarget.

propertyFind(name): undefined | Property

ParameterTypeDescription
namestring

Returns undefined | Property. Implementation of Propertied.propertyFind.

propertyIds(targetId): `${string}.${string}`[]

ParameterTypeDescription
targetIdstring

Returns `${string}.${string}`[]. Implementation of Propertied.propertyIds.

scalarsRecord(idOrNames): ScalarRecord

ParameterTypeDescription
idOrNamesstring[]

Returns ScalarRecord. Implementation of Propertied.scalarsRecord.

setValue(id, value?, dontConstrain?): void

ParameterTypeDescription
idstring
value?Scalar
dontConstrain?boolean

Returns void. Implementation of Propertied.setValue.

shouldSelectProperty(property): boolean

ParameterTypeDescription
propertyProperty

Returns boolean. Implementation of Propertied.shouldSelectProperty.

string(id): string

ParameterTypeDescription
idstring

Returns string if the value is a string, otherwise throws an assertion error. Implementation of Propertied.string.

toJSON(): UnknownRecord

Returns UnknownRecord. Implementation of Propertied.toJSON.

tweenValues(key, time, range): Scalar[]

ParameterTypeDescription
keystring
timeTime
rangeTimeRange

Returns Scalar[]. Implementation of Propertied.tweenValues.

tweens(key): boolean

ParameterTypeDescription
keystring

Returns boolean. Implementation of Propertied.tweens.

tweensProperty(key): boolean

ParameterTypeDescription
keystring

Returns boolean.

value(id): undefined | Scalar

ParameterTypeDescription
idstring

Returns undefined | Scalar. Implementation of Propertied.value.

Interfaces

Propertied

Extended by Media, Instance, Clip, and Track.

PropertyType
idstring
propertiesProperty[]
targetIdstring

Methods

boolean(key): boolean

ParameterType
keystring

Returns boolean.

changeObject(propertyId, scalar?): ChangeEditObject

ParameterType
propertyId`${string}.${string}`
scalar?Scalar

Returns ChangeEditObject.

changeScalars(scalars): void

ParameterType
scalarsPartial<SignalScalarRecord>

Returns void.

changesObject(scalars): ChangePropertiesEditObject

ParameterType
scalarsPartial<SignalScalarRecord>

Returns ChangePropertiesEditObject.

constrainedValue(found, value?): undefined | Scalar

ParameterType
foundProperty
value?Scalar

Returns undefined | Scalar.

number(key): number

ParameterType
keystring

Returns number.

propertiesOfTarget(targetId): Property[]

ParameterType
targetIdstring

Returns Property[].

propertyFind(name): undefined | Property

ParameterType
namestring

Returns undefined | Property.

propertyIds(targetId): `${string}.${string}`[]

ParameterType
targetIdstring

Returns `${string}.${string}`[].

scalarsRecord(idOrNames): ScalarRecord

ParameterType
idOrNamesstring[]

Returns ScalarRecord.

setValue(nameOrId, scalar?, dontConstrain?): void

ParameterType
nameOrIdstring
scalar?Scalar
dontConstrain?boolean

Returns void.

shouldSelectProperty(property): boolean

ParameterType
propertyProperty

Returns boolean.

string(key): string

ParameterType
keystring

Returns string.

toJSON(): UnknownRecord

Returns UnknownRecord.

tweenValues(key, time, range): Scalar[]

ParameterType
keystring
timeTime
rangeTimeRange

Returns Scalar[].

tweens(key): boolean

ParameterType
keystring

Returns boolean.

value(key): undefined | Scalar

ParameterType
keystring

Returns undefined | Scalar.

PropertiedChangeHandler

PropertiedChangeHandler(property, value?): void

ParameterType
propertystring
value?Scalar

Returns void.

Property

Extends PropertyObject. Extended by ScalarProperty and Control.

PropertyType
fallback?Scalar
frame?number
icon?string
max?number
min?number
namestring
options?ScalarRecord | Scalar[]
order?number
step?number
targetstring
tweens?boolean
typestring
undoable?boolean

PropertyObject

Extended by Property.

PropertyType
fallback?Scalar
frame?number
icon?string
max?number
min?number
name?string
options?ScalarRecord | Scalar[]
order?number
step?number
target?string
tweens?boolean
type?string
undoable?boolean

ScalarProperty

Extends Property.

PropertyType
fallback?Scalar
frame?number
icon?string
max?number
min?number
namestring
options?ScalarRecord | Scalar[]
order?number
scalar?Scalar
step?number
targetstring
tweens?boolean
typestring
undoable?boolean

Storable

Extended by Media and Resource

Extends Typed.Sourced.Labeled.Partial<Identified>. Extended by StorableMedia, Stored, and StorableResource.

PropertyType
createdAt?string
id?string
label?string
projectId?string
sourcestring
typestring
updatedAt?string

StorableMash

A plain object representation of MashMedia.

Extends StorableMedia.MashProperties. Extended by StorableMashVideo, StorableMashAudio, and StorableMashImage.

PropertyType
assets?StorableMedia[]
buffer?number
createdAt?string
id?string
label?string
projectId?string
resources?StorableResource[]
sourcestring
tracks?TrackObject[]
typeMediaType
updatedAt?string

StorableMedia

Extends Storable.StringIndexable. Extended by StorableColorImage, MashVideoArgs, StorableMash, MashArgs, StorableRawAudio, StoredRawVideo, StorableRawVideo, StorableRawImage, StorableShapeImage, and StorableTextImage.

PropertyType
createdAt?string
id?string
label?string
projectId?string
resources?StorableResource[]
sourcestring
typeMediaType
updatedAt?string

Stored

Extends Storable. Extended by Media and StoredMedia.

PropertyType
createdAt?string
idstring
label?string
projectId?string
sourcestring
typestring
updatedAt?string

StoredMash

Extends StoredMedia.MashProperties.

PropertyType
assets?StoredMedia[]
buffer?number
createdAt?string
idstring
label?string
projectId?string
resources?StoredResource[]
sourcestring
tracks?TrackObject[]
typeMediaType
updatedAt?string

StoredMedia

Extends Stored. Extended by StoredColorImage, StoredMashVideo, StoredMashAudio, StoredMashImage, StoredMash, StoredAudio, VideoData, StoredRawImage, StoredShapeImage, and StoredTextImage.

PropertyType
createdAt?string
idstring
label?string
projectId?string
resources?StoredResource[]
sourcestring
typeMediaType
updatedAt?string

Type Aliases

MathProperty

MathProperty: string & keyof Math

ResourceProperty

ResourceProperty: "uploadedAt"

StorableMediaResult<TYPE, SRC>

StorableMediaResult<TYPE, SRC>: SRC extends _raw ? TYPE extends _audio ? StorableRawAudio : TYPE extends _image ? StorableRawImage : TYPE extends _video ? StorableRawVideo : StorableMedia : SRC extends _text ? TYPE extends _image ? StorableTextImage : StorableMedia : SRC extends _color ? TYPE extends _image ? StorableColorImage : StorableMedia : SRC extends _shape ? TYPE extends _image ? StorableShapeImage : StorableMedia : SRC extends _mash ? TYPE extends _video ? StorableMashVideo : TYPE extends _image ? StorableMashImage : TYPE extends _audio ? StorableMashAudio : StorableMedia : StorableMedia

Type ParameterDefault type
TYPEstring
SRCstring

StoredMediaResult<TYPE, SRC>

StoredMediaResult<TYPE, SRC>: SRC extends _raw ? TYPE extends _audio ? StoredRawAudio : TYPE extends _image ? StoredRawImage : TYPE extends _video ? StoredRawVideo : StoredMedia : SRC extends _text ? TYPE extends _image ? StoredTextImage : StoredMedia : SRC extends _color ? TYPE extends _image ? StoredColorImage : StoredMedia : SRC extends _shape ? TYPE extends _image ? StoredShapeImage : StoredMedia : SRC extends _mash ? TYPE extends _video ? StoredMashVideo : TYPE extends _image ? StoredMashImage : TYPE extends _audio ? StoredMashAudio : StoredMedia : StoredMedia

Type ParameterDefault type
TYPEstring
SRCstring

Functions

isPropertied

isPropertied(value?): value is Propertied

ParameterTypeDescription
value?any

Returns value is Propertied.

isStorable

isStorable(value): value is Storable

ParameterType
valueany

Returns value is Storable.

isStorableMash

isStorableMash(value): value is StorableMash

ParameterType
valueany

Returns value is StorableMash.

isStorableMedia

isStorableMedia<RAW, SRC>(value, type?, source?): value is StorableMediaResult<RAW, SRC>

Type Parameter
RAW extends string
SRC extends string
ParameterType
valueany
type?RAW
source?SRC

Returns value is StorableMediaResult<RAW, SRC>.

isStored

isStored(value): value is Stored

ParameterType
valueany

Returns value is Stored.

isStoredMash

isStoredMash(value): value is StoredMash

ParameterType
valueany

Returns value is StoredMash.

isStoredMedia

isStoredMedia<RAW, SRC>(value, type?, source?): value is StoredMediaResult<RAW, SRC>

Type Parameter
RAW extends string
SRC extends string
ParameterType
valueany
type?RAW
source?SRC

Returns value is StoredMediaResult<RAW, SRC>.

parsePropertyObject

parsePropertyObject(arg, owner?): PropertyObject

ParameterType
argstring | PropertyObject
owner?string

Returns PropertyObject.

propertyInstance

propertyInstance(arg, owner?, typeDefault?): Property

ParameterType
argstring | PropertyObject
owner?string
typeDefault?string

Returns Property.

propertyScalar

propertyScalar<T>(property, scalar?, forCss?): T extends true ? string : Scalar | undefined

Type Parameter
T extends boolean
ParameterType
propertyProperty
scalar?Scalar
forCss?T

Returns T extends true ? string : Scalar | undefined.

propertyTypeCoerce

propertyTypeCoerce<T>(value, type, forCss?): T extends true ? string : Scalar | undefined

Type Parameter
T extends boolean
ParameterType
valueScalar
typestring
forCss?T

Returns T extends true ? string : Scalar | undefined.

propertyTypeValid

propertyTypeValid(value, dataType): boolean

ParameterType
valueScalar
dataTypestring

Returns boolean.

signalPropertyId

signalPropertyId(arg, nameOrTarget?, type?): SignalId

ParameterType
argstring | PropertyObject
nameOrTarget?string
type?string

Returns SignalId.