Gives GlobalPlayer the tracklist and transport of a YouTube playlist embed, whose list stays inside the iframe. The titles and lengths come from the server, since the embed exposes neither; the order, the position and the controls come from the IFrame Player API. Without the API (script blocked, embedding restricted) the rows are inert; without the server's list they have no titles.

Functions

f
useYouTubePlaylist(
embedUrl: string | null,
iframeRef: RefObject<HTMLIFrameElement | null>
): UseYouTubePlaylistResult

Returns the tracklist and transport of the playlist embedUrl plays in the iframe iframeRef, or no rows when it plays none. The iframe's URL must carry enablejsapi (see withJsApi) for the API to drive it.

Interfaces

I
PlaylistRow

A row of the tracklist GlobalPlayer shows. Its title and length come from the server's list, and are missing for a video that list lacks.

I
UseYouTubePlaylistResult

Returned by useYouTubePlaylist to GlobalPlayer, which shows the tracklist and its transport when there is more than one row.