function useYouTubePlaylist
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.

Parameters

embedUrl: string | null
iframeRef: RefObject<HTMLIFrameElement | null>

Return Type

Usage

import { useYouTubePlaylist } from "src/hooks/player/useYouTubePlaylist.ts";