Seed Bible extension API (v1.18.0) / seed-bible/components / PlaylistLinkContent
Function: PlaylistLinkContent()
function PlaylistLinkContent(props: {
embed?: boolean;
preview?: {
author?: string;
description?: string;
imageAlt?: string;
imageUrl?: string;
siteName?: string;
title?: string;
};
title?: string;
url: string;
}): Element;Renders a playlist link item based on what its URL points at (see resolveLinkMedia): a direct video file plays in a <video> element, a known video site (YouTube, Vimeo) embeds in an <iframe>, and anything else shows the URL with a prominent "Open" button that opens a new tab.
When the author checked "embed", any URL that isn't already a video or a known video site is shown in an <iframe> instead of an "Open" link. Video detection still takes precedence, so ticking embed never changes how a recognized video renders.
A plain link with a stored preview shows the page's image, title, and description above the "Open" button, so the reader can see where it goes.
Parameters
| Parameter | Type |
|---|---|
props | { embed?: boolean; preview?: { author?: string; description?: string; imageAlt?: string; imageUrl?: string; siteName?: string; title?: string; }; title?: string; url: string; } |
props.embed? | boolean |
props.preview? | { author?: string; description?: string; imageAlt?: string; imageUrl?: string; siteName?: string; title?: string; } |
props.preview.author? | string |
props.preview.description? | string |
props.preview.imageAlt? | string |
props.preview.imageUrl? | string |
props.preview.siteName? | string |
props.preview.title? | string |
props.title? | string |
props.url | string |
Returns
Element