getEmbedInfo

See source code

Tests whether an URL supports embedding and returns the result. If we encounter an error, we return undefined.

function getEmbedInfo(
  definitions: readonly TLEmbedDefinition[],
  inputUrl: string,
  embedConfig?: Record<string, unknown>,
): TLEmbedResult;

Parameters

NameDescription

definitions

readonly TLEmbedDefinition[];

inputUrl

string;

The URL to match

embedConfig

Record<string, unknown>;

Optional per-embed config, keyed by embed type, passed to toEmbedUrl

Returns

Prev
getDisplayValues
Next
getFontFamily