Previews YouTube videos, playlists and channels, for rich-content-service.ts. Videos and playlists are read from YouTube's oEmbed endpoint, channels from their page.

Variables

v
youtubeProvider: RichContentProvider

Comes first in the service's list. A video's embed keeps the link's playlist and start time, a playlist embeds as a videoseries, and a channel gets no embed. Its fetch never rejects: whatever YouTube doesn't answer is left out.

Usage

import * as mod from "api/remote/providers/youtube.ts";