docs.rodeo

MDN Web Docs mirror

HTMLMediaElement

{{APIRef("HTML DOM")}} 

The HTMLMediaElement interface adds to {{domxref("HTMLElement")}}  the properties and methods needed to support basic media-related capabilities that are common to audio and video.

The {{domxref("HTMLVideoElement")}}  and {{domxref("HTMLAudioElement")}}  elements both inherit this interface.

{{InheritanceDiagram}} 

Instance properties

This interface also inherits properties from its ancestors {{domxref("HTMLElement")}} , {{domxref("Element")}} , {{domxref("Node")}} , and {{domxref("EventTarget")}} .

Obsolete properties

These properties are obsolete and should not be used, even if a browser still supports them.

Instance methods

This interface also inherits methods from its ancestors {{domxref("HTMLElement")}} , {{domxref("Element")}} , {{domxref("Node")}} , and {{domxref("EventTarget")}} .

Obsolete methods

These methods are obsolete and should not be used, even if a browser still supports them.

Events

Inherits events from its parent, {{domxref("HTMLElement")}} .

Listen to these events using {{domxref("EventTarget.addEventListener", "addEventListener()")}}  or by assigning an event listener to the oneventname property of this interface.

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

References

Guides

In this article

View on MDN