Search Results for

    Show / Hide Table of Contents
    View Source

    Interface IEmbedProvider

    Defines a provider for embedding media content from external sources using OEmbed protocol.

    Namespace: Umbraco.Cms.Core.Media
    Assembly: Umbraco.Core.dll
    Syntax
    public interface IEmbedProvider

    Properties

    View Source

    ApiEndpoint

    The OEmbed API Endpoint

    Declaration
    string ApiEndpoint { get; }
    Property Value
    Type Description
    string
    View Source

    RequestParams

    A collection of querystring request parameters to append to the API URL

    Declaration
    Dictionary<string, string> RequestParams { get; }
    Property Value
    Type Description
    Dictionary<string, string>
    Examples

    ?key=value&key2=value2

    View Source

    UrlSchemeRegex

    A string array of Regex patterns to match against the pasted OEmbed URL

    Declaration
    string[] UrlSchemeRegex { get; }
    Property Value
    Type Description
    string[]

    Methods

    View Source

    GetMarkupAsync(string, int?, int?, CancellationToken)

    Gets the HTML markup for embedding the media content from the specified URL.

    Declaration
    Task<string?> GetMarkupAsync(string url, int? maxWidth, int? maxHeight, CancellationToken cancellationToken)
    Parameters
    Type Name Description
    string url

    The URL of the media to embed.

    int? maxWidth

    The maximum width of the embedded content, or null for no constraint.

    int? maxHeight

    The maximum height of the embedded content, or null for no constraint.

    CancellationToken cancellationToken

    A cancellation token to observe while waiting for the task to complete.

    Returns
    Type Description
    Task<string>

    A task that represents the asynchronous operation, containing the HTML markup or null if unavailable.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX