vue3-ytframe
Version:
A Vue3 YouTube Iframe API Wrapper Component
16 lines (15 loc) • 853 B
TypeScript
/** Matches a canonical 11-character YouTube video ID. */
export declare const VIDEO_ID: RegExp;
/** Strips optional `www.` or `m.` from a YouTube hostname. */
export declare const YOUTUBE_HOST_PREFIX: RegExp;
/** Path segments: `/embed|shorts|live|v/<id>`. Capture group 1 is the video ID. */
export declare const YOUTUBE_EMBED_PATH: RegExp;
export declare const YOUTUBE_HOST_YOUTU_BE = "youtu.be";
export declare const YOUTUBE_HOST_YOUTUBE_COM = "youtube.com";
export declare const YOUTUBE_HOST_NOCOOKIE = "youtube-nocookie.com";
/** YouTube Iframe API script source URL. */
export declare const YT_API_SRC = "https://www.youtube.com/iframe_api";
/** YouTube Iframe API load timeout in milliseconds. */
export declare const YT_LOAD_TIMEOUT = 10000;
/** YouTube Iframe API poll interval in milliseconds. */
export declare const YT_POLL_INTERVAL = 100;