CommunityToolkit icon indicating copy to clipboard operation
CommunityToolkit copied to clipboard

Update MediaElement.md with support for subtitles and local font files

Open ne0rrmatrix opened this issue 7 months ago • 4 comments

Add support for Subtitles to Media Element.

API:

/// <summary>
/// Backing store for the <see cref="CustomSubtitleParser"/> property.
/// </summary>
public static readonly BindableProperty ParserProperty = 
	BindableProperty.Create(nameof(CustomSubtitleParser), typeof(IParser), typeof(MediaElement), null);

/// <summary>
/// Backing store for the <see cref="SubtitleFont"/> property.
/// </summary>
public static readonly BindableProperty SubtitleFontProperty = BindableProperty.Create(nameof(SubtitleFont), typeof(string), typeof(MediaElement), string.Empty);

/// <summary>
/// Backing store for the <see cref="SubtitleFontSize"/> property.
/// </summary>
public static readonly BindableProperty SubtitleFontSizeProperty = BindableProperty.Create(nameof(SubtitleFontSize), typeof(double), typeof(MediaElement), 16.0);

/// <summary>
/// Backing store for the <see cref="SubtitleUrl"/> property.
/// </summary>
public static readonly BindableProperty SubtitleProperty = BindableProperty.Create(nameof(SubtitleUrl), typeof(string), typeof(MediaElement), string.Empty);

See: https://github.com/CommunityToolkit/Maui/pull/1918

ne0rrmatrix avatar Jun 27 '24 16:06 ne0rrmatrix