DOM Interfaces

HTMLMediaElement

Shared interface of audio and video elements, with playback state, time ranges, tracks and playback methods. It is not a tag or a constructor to invoke directly. Playback is asynchronous and subject to user-agent policies. Example result: true.

Formal Syntax & Structure

html syntaxhtml
const element = document.getElementById('demo'); // HTMLMediaElement

Return Value

HTMLMediaElement

An existing HTML DOM object associated with the video element in this example; this interface is a type, not a function return contract.

Working Example

Example Snippethtml
<video id="demo" controls></video><p>  Result:  <output id="result"></output></p><script>  const e = document.getElementById('demo');  const result = value => { document.getElementById("result").textContent = String(value); };  result(e.paused);</script>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
3
Yes
Edge
12
Yes
Firefox
3.5
Yes
Safari
3.1
Yes
Opera
10.5
Yes
Checked desktop BCD snapshot: HTMLMediaElement interface; individual members and codecs differ. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard
HTML Reference