function embedListId
embedListId(embedUrl: string): string | null

Returns the id of the playlist embedUrl plays, or null. It reads both shapes the server's YouTube embeds take, /embed/videoseries?list=… for a bare playlist and /embed/<id>?list=… for a video opened in one.

Parameters

embedUrl: string

Return Type

string | null

Usage

import { embedListId } from "src/utils/player/youtube.ts";