@atlaskit/spotlight
Version:
A spotlight introduces users to points of interest, from focused messages to multi-step tours.
14 lines (13 loc) • 610 B
TypeScript
type MimeType = 'video/mp4' | 'video/webm' | 'video/ogg' | 'video/mpeg' | 'video/x-matroska' | 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp' | 'image/svg+xml';
interface PreloadMediaOptions {
mimetype: MimeType;
}
/**
* Preloads media (video/image) files to be cached by the browser.
* Once loaded, the browser cache will be used when rendering the actual media element.
*
* @param src - The media source URL to preload
* @param options - Configuration options including the MIME type
*/
export declare const usePreloadMedia: (src: string, options: PreloadMediaOptions) => void;
export {};