Constructors
Properties
Methods
addMedia
- addMedia(
source: string | Uint8Array | File,
mimeType?: string,
): Promise<null | string> Parameters
- source: string | Uint8Array | File
Optional
mimeType: string
Returns Promise<null | string>
addSerializedMedia
- addSerializedMedia(data: any): Promise<string>
Returns Promise<string>
addSubtitles
- addSubtitles(subtitles: Subtitles): string
Returns string
deleteMedia
- deleteMedia(id: string): Promise<void>
Returns Promise<void>
destroy
- destroy(): Promise<void>
Returns Promise<void>
init
- init(): Promise<void>
Returns Promise<void>
removeSubtitles
- removeSubtitles(id: string): void
Returns void
replaceMedia
- replaceMedia(
id: string,
file: string | Uint8Array | File,
mimeType?: string,
): Promise<boolean> Parameters
- id: string
- file: string | Uint8Array | File
Optional
mimeType: string
Returns Promise<boolean>
replaceSerializedMedia
- replaceSerializedMedia(data: any): Promise<boolean>
Returns Promise<boolean>
serialize
- serialize(): {
media: {
customData?: [string, unknown][];
filename: string;
hash?: string;
id: string;
mimeType?: string;
permanentUrl?: string;
type: string;
}[];
subtitles: {
duration: number;
id: string;
language: string;
textBlocks: { duration: number; text: string; time: number }[];
}[];
} Returns {
media: {
customData?: [string, unknown][];
filename: string;
hash?: string;
id: string;
mimeType?: string;
permanentUrl?: string;
type: string;
}[];
subtitles: {
duration: number;
id: string;
language: string;
textBlocks: { duration: number; text: string; time: number }[];
}[];
}
storeAllMedia
- storeAllMedia(): Promise<void>
Returns Promise<void>