Class FileSystemAssetStore
Hierarchy
- EventTarget
- FileSystemAssetStore
Implements
Index
Constructors
constructor
-
Parameters
- generateId: () => string = uid
Returns FileSystemAssetStore
Properties
fileStorage
ProtectedgenerateId
ProtectedgetMediaAssetInfo
id: string,
source: string | Blob | File,
requestInit?: RequestInit,
) => Promise<Schema.MediaAsset> = getMediaAssetInfo
isDisposed
loaders
Methods
[dispose]
-
Returns void
addEventListener
-
addEventListener(
type: string,
callback: EventListenerOrEventListenerObject | null,
options?: boolean | AddEventListenerOptions,
): voidParameters
- type: string
- callback: EventListenerOrEventListenerObject | null
Optionaloptions: boolean | AddEventListenerOptions
Returns void
-
addEventListener(
type: string,
callback: EventListenerOrEventListenerObject | null,
options?: boolean | AddEventListenerOptions,
): voidThe
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.Parameters
- type: string
- callback: EventListenerOrEventListenerObject | null
Optionaloptions: boolean | AddEventListenerOptions
Returns void
create
-
create<T extends AnyAssetSchema>(
init: T,
__namedParameters?: { isBuiltIn?: boolean; source?: string | Blob },
): AssetsByType[T["type"]]Type Parameters
- T extends AnyAssetSchema
Parameters
- init: T
- __namedParameters: { isBuiltIn?: boolean; source?: string | Blob } = {}
Returns AssetsByType[T["type"]]
createFile
-
createFile(
asset: MediaAsset,
stream: ReadableStream<Uint8Array<ArrayBufferLike>>,
options: {
onProgress?: (progress: number) => void;
signal?: AbortSignal | null;
},
): Promise<void>Save a new file from an asset source stream
Parameters
- asset: MediaAsset
- stream: ReadableStream<Uint8Array<ArrayBufferLike>>
- options: { onProgress?: (progress: number) => void; signal?: AbortSignal | null }
Returns Promise<void>
createMediaAsset
-
Parameters
- source: string | Blob
Returns Promise<MediaAsset>
delete
-
Delete an asset form the store
Parameters
- key: string
Returns Promise<void>
dispatchEvent
-
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().Parameters
- event: Event
Returns boolean
-
The
dispatchEvent()method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().Parameters
- event: Event
Returns boolean
dispose
-
Returns void
getAsset
getFile
-
Get an asset as a File instance
Parameters
- key: string
Optionalname: stringOptionaloptions: FilePropertyBag
Returns Promise<File>
getOrCreateFile
-
getOrCreateFile(
asset: MediaAsset,
source_: string | Blob | undefined,
options?: { signal?: AbortSignal | null },
): Promise<File>Parameters
- asset: MediaAsset
- source_: string | Blob | undefined
Optionaloptions: { signal?: AbortSignal | null }
Returns Promise<File>
has
-
Parameters
- id: string
Returns boolean
on
-
on<T extends AssetEventType>(
type: T,
listener: (event: VideoEditorEvents[T]) => void,
options_?: AddEventListenerOptions,
): () => voidType Parameters
- T extends AssetEventType
Parameters
- type: T
- listener: (event: VideoEditorEvents[T]) => void
Optionaloptions_: AddEventListenerOptions
Returns () => void
removeEventListener
-
removeEventListener(
type: string,
callback: EventListenerOrEventListenerObject | null,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.Parameters
- type: string
- callback: EventListenerOrEventListenerObject | null
Optionaloptions: boolean | EventListenerOptions
Returns void
-
removeEventListener(
type: string,
callback: EventListenerOrEventListenerObject | null,
options?: boolean | EventListenerOptions,
): voidThe
removeEventListener()method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.Parameters
- type: string
- callback: EventListenerOrEventListenerObject | null
Optionaloptions: boolean | EventListenerOptions
Returns void
values
-
Returns MapIterator<AnyAsset>
The
addEventListener()method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.MDN Reference