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
Controller
Gets the current media's controller, if any.
[DomName("controller")]
IMediaController? Controller { get; }
Property Value
CrossOrigin
Gets or sets the cross-origin attribute.
[DomName("crossOrigin")]
string? CrossOrigin { get; set; }
Property Value
CurrentSource
Gets the current media source.
[DomName("currentSrc")]
string? CurrentSource { get; }
Property Value
IsAutoplay
Gets or sets if the media is automatically played.
[DomName("autoplay")]
bool IsAutoplay { get; set; }
Property Value
IsDefaultMuted
Gets or sets if the media is muted by default.
[DomName("defaultMuted")]
bool IsDefaultMuted { get; set; }
Property Value
IsEnded
Gets if the media has ended.
[DomName("ended")]
bool IsEnded { get; }
Property Value
IsLoop
Gets or sets if the media should loop.
[DomName("loop")]
bool IsLoop { get; set; }
Property Value
IsSeeking
Gets if seeking is currently active.
[DomName("seeking")]
bool IsSeeking { get; }
Property Value
IsShowingControls
Gets or sets if the controls should be shown to the user.
[DomName("controls")]
bool IsShowingControls { get; set; }
Property Value
MediaError
Gets the current media error, if any.
[DomName("error")]
IMediaError? MediaError { get; }
Property Value
MediaGroup
Gets or sets the id of the assigned media group.
[DomName("mediaGroup")]
string? MediaGroup { get; set; }
Property Value
NetworkState
Gets the current network state.
[DomName("networkState")]
MediaNetworkState NetworkState { get; }
Property Value
Preload
Gets or sets the preload attribute.
[DomName("preload")]
string? Preload { get; set; }
Property Value
Source
Gets or sets the media source.
[DomName("src")]
string? Source { get; set; }
Property Value
StartDate
Gets the datetime when the download started.
[DomName("startDate")]
DateTime StartDate { get; }
Property Value
TextTracks
Gets a list of contained text tracks.
[DomName("textTracks")]
ITextTrackList? TextTracks { get; }
Property Value
VideoTracks
Gets a list of contained video tracks.
[DomName("videoTracks")]
IVideoTrackList? VideoTracks { get; }
Property Value
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
stringThe kind of text track to create.
label
stringThe optional label of the track.
language
stringThe 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
stringThe 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()