@cloudcome/utils-browser
Version:
cloudcome utils for browser
10 lines (9 loc) • 421 B
TypeScript
/**
* 加载视频并返回一个包含 HTMLVideoElement 的 Promise
* @param {string} url - 视频的 URL 地址
* @returns {Promise<HTMLVideoElement>} 返回一个包含 HTMLVideoElement 的 Promise
* @example
* const video = await videoLoad('https://example.com/video.mp4');
* @throws {Error} 如果视频加载失败,抛出错误
*/
export declare function videoLoad(url: string): Promise<HTMLVideoElement>;