Table of Contents

Interface IHtmlMediaElement

Namespace
AngleSharp.Html.Dom
Assembly
AngleSharp.dll

Represents the base for all HTML media elements.

[DomName("HTMLMediaElement")]
public interface IHtmlMediaElement : IHtmlElement, IElement, INode, IEventTarget, IMarkupFormattable, IParentNode, IChildNode, INonDocumentTypeChildNode, IGlobalEventHandlers, IMediaController, ILoadableElement
Inherited Members
Extension Methods

Properties

AudioTracks

Gets a list of contained audio tracks.

[DomName("audioTracks")]
IAudioTrackList? AudioTracks { get; }

Property Value

IAudioTrackList

Controller

Gets the current media's controller, if any.

[DomName("controller")]
IMediaController? Controller { get; }

Property Value

IMediaController

CrossOrigin

Gets or sets the cross-origin attribute.

[DomName("crossOrigin")]
string? CrossOrigin { get; set; }

Property Value

string

CurrentSource

Gets the current media source.

[DomName("currentSrc")]
string? CurrentSource { get; }

Property Value

string

IsAutoplay

Gets or sets if the media is automatically played.

[DomName("autoplay")]
bool IsAutoplay { get; set; }

Property Value

bool

IsDefaultMuted

Gets or sets if the media is muted by default.

[DomName("defaultMuted")]
bool IsDefaultMuted { get; set; }

Property Value

bool

IsEnded

Gets if the media has ended.

[DomName("ended")]
bool IsEnded { get; }

Property Value

bool

IsLoop

Gets or sets if the media should loop.

[DomName("loop")]
bool IsLoop { get; set; }

Property Value

bool

IsSeeking

Gets if seeking is currently active.

[DomName("seeking")]
bool IsSeeking { get; }

Property Value

bool

IsShowingControls

Gets or sets if the controls should be shown to the user.

[DomName("controls")]
bool IsShowingControls { get; set; }

Property Value

bool

MediaError

Gets the current media error, if any.

[DomName("error")]
IMediaError? MediaError { get; }

Property Value

IMediaError

MediaGroup

Gets or sets the id of the assigned media group.

[DomName("mediaGroup")]
string? MediaGroup { get; set; }

Property Value

string

NetworkState

Gets the current network state.

[DomName("networkState")]
MediaNetworkState NetworkState { get; }

Property Value

MediaNetworkState

Preload

Gets or sets the preload attribute.

[DomName("preload")]
string? Preload { get; set; }

Property Value

string

Source

Gets or sets the media source.

[DomName("src")]
string? Source { get; set; }

Property Value

string

StartDate

Gets the datetime when the download started.

[DomName("startDate")]
DateTime StartDate { get; }

Property Value

DateTime

TextTracks

Gets a list of contained text tracks.

[DomName("textTracks")]
ITextTrackList? TextTracks { get; }

Property Value

ITextTrackList

VideoTracks

Gets a list of contained video tracks.

[DomName("videoTracks")]
IVideoTrackList? VideoTracks { get; }

Property Value

IVideoTrackList

Methods

AddTextTrack(string, string?, string?)

Adds a new text track to the media element.

[DomName("addTextTrack")]
ITextTrack AddTextTrack(string kind, string? label = null, string? language = null)

Parameters

kind string

The kind of text track to create.

label string

The optional label of the track.

language string

The optional language of the track.

Returns

ITextTrack

The freshly created text track.

CanPlayType(string)

Checks if the given type can be played.

[DomName("canPlayType")]
string CanPlayType(string type)

Parameters

type string

The type to check for.

Returns

string

One of the following values: probably, maybe or an empty string.

Load()

Loads the currently assigned media source.

[DomName("load")]
void Load()