IMarkdownMediaHost Interface

A site whose links MarkdownExtensions.MediaLinks renders as an <iframe>.

public interface IMarkdownMediaHost

Properties

NameDescription
AllowFullScreenGets a value indicating whether the <iframe> has the allowfullscreen attribute.
ClassGets the class of the <iframe>, or null for none.
KnownHostsGets the hosts of Markdig: YouTube (and its shorts), youtu.be, Vimeo, Yandex Music and Odnoklassniki.

AllowFullScreen

Gets a value indicating whether the <iframe> has the allowfullscreen attribute.

bool AllowFullScreen { get; }

Property value

bool

Class

Gets the class of the <iframe>, or null for none.

string? Class { get; }

Property value

string?

Gets the hosts of Markdig: YouTube (and its shorts), youtu.be, Vimeo, Yandex Music and Odnoklassniki.

public static ImmutableArray<IMarkdownMediaHost> KnownHosts { get; }

Methods

NameDescription
TryHandle(Uri, bool, string?)Gets the URL of the <iframe> of a link, when the link is for this site.

TryHandle(Uri, bool, string?)

Gets the URL of the <iframe> of a link, when the link is for this site.

bool TryHandle(Uri mediaUri, bool isSchemaRelative, out string? iframeUrl)

Parameters

mediaUri Uri
The URL of the image, made absolute with https: when it starts with //.
isSchemaRelative bool
Whether the URL of the image starts with //.
iframeUrl string?
The URL of the <iframe>.

Returns

bool