import { TikTokMediaProps } from "./props.js"; //#region src/dom/tiktok/source.d.ts /** * TikTok engine options, spelled exactly as TikTok spells them * (https://developers.tiktok.com/doc/embed-player). They are serialized onto the * embed URL verbatim, so what you write here is what the player reads. * * Parameters the host owns are deliberately absent: `autoplay`, `controls`, * `loop`, and `muted` come from the props of the same name, so configuring them * here would give two ways to say one thing. The index signature still carries * anything not listed here, so undocumented knobs and whatever TikTok adds next * keep working. */ interface TikTokEngineConfig extends Record { /** Show the closed-caption button. Defaults to `1`. */ closed_caption?: 0 | 1; /** Show the video description. Defaults to `0`. */ description?: 0 | 1; /** Show the fullscreen button. Defaults to `1`. */ fullscreen_button?: 0 | 1; /** Show the track the video uses. Defaults to `0`. */ music_info?: 0 | 1; /** Show the browser's native context menu. Defaults to `1`. */ native_context_menu?: 0 | 1; /** Show the play button. Defaults to `1`. */ play_button?: 0 | 1; /** Show the progress bar. Defaults to `1`. */ progress_bar?: 0 | 1; /** Draw related videos from TikTok's recommendations (`1`) or the author's own videos (`0`). Defaults to `1`. */ rel?: 0 | 1; /** Show the current playback time and duration. Defaults to `1`. */ timestamp?: 0 | 1; /** Show the volume control. Defaults to `1`. */ volume_control?: 0 | 1; /** `referrerpolicy` for the embed iframe. Not a TikTok player parameter. */ referrerPolicy?: ReferrerPolicy; } /** Structured TikTok source: which source to play, plus how to play it. */ interface TikTokSource { /** TikTok URL or id. Mirrors the host's `src` property. */ src?: string | undefined; /** Playback options, keyed by the engine that reads them. */ engine?: TikTokSourceEngineConfig | undefined; } /** The engines a TikTok source can configure. */ interface TikTokSourceEngineConfig { /** TikTok's own player parameters, passed through untouched. */ tiktok?: TikTokEngineConfig | undefined; } /** * Parsed pieces of a TikTok source URL. TikTok embeds one thing — a video named * by a numeric id — so the id is all there is to take from a source. */ interface ParsedTikTokSource { /** Numeric video id. */ id: string; } /** Extract a TikTok video id from a raw numeric id or any recognized URL. */ declare function parseTikTokVideoId(src: string): string | null; /** * Parse a TikTok source string. Recognizes raw numeric ids, `player/v1/` embed * URLs, `share/video/` links, and the `@user/video/` URLs the app hands out. */ declare function parseTikTokSource(src: string): ParsedTikTokSource | null; /** * Whether the embed has to carry an `autoplay` nobody asked for. TikTok builds its player lazily: without one it * creates no media element, never reports `onPlayerReady`, and drops every command silently, until something is * clicked inside the frame — which a frame under a player skin never gets. The host parks the player as soon as it * is up, so this buys one that answers commands, not a video that plays. */ declare function shouldBootstrapTikTokEmbed(props?: Partial): boolean; /** Build the iframe `src` URL for a TikTok embed from the given props. */ declare function buildTikTokIframeSrc(src: string, props?: Partial): string; //#endregion export { ParsedTikTokSource, TikTokEngineConfig, TikTokSource, TikTokSourceEngineConfig, buildTikTokIframeSrc, parseTikTokSource, parseTikTokVideoId, shouldBootstrapTikTokEmbed }; //# sourceMappingURL=source.d.ts.map