@googleforcreators/media
Version:
Functionality for creating and working with media resources in the Web Stories editor.
30 lines • 709 B
TypeScript
type CacheObject = File | Blob | MediaSource;
/**
* Create a blob URL from a file.
*
* @param file File object.
* @return Blob URL.
*/
export declare function createBlob(file: CacheObject): string;
/**
* Get file by blob URL if it exists.
*
* @param url Blob URL.
* @return File if exists.
*/
export declare function getBlob(url: string): CacheObject;
/**
* Remove blob from cache (and browser memory).
*
* @param url Blob URL.
*/
export declare function revokeBlob(url: string): void;
/**
* Check whether a URL is a blob URL.
*
* @param url The URL.
* @return Is the url a blob url?
*/
export declare function isBlobURL(url?: string): boolean;
export {};
//# sourceMappingURL=blob.d.ts.map