Web/API/HTMLMediaElement/ended

From Get docs


The HTMLMediaElement.ended indicates whether the media element has ended playback.

Syntax

var isEnded = HTMLMediaElement.ended

Value

A Boolean which is true if the media contained in the element has finished playing.

If the source of the media is a MediaStream, this value is true if the value of the stream's active property is false.

Example

var obj = document.createElement('video');
console.log(obj.ended); // false

Specifications

Specification Status Comment
HTML Living StandardThe definition of 'HTMLMediaElement.ended' in that specification. Living Standard  
HTML5The definition of 'HTMLMediaElement.ended' in that specification. Recommendation  

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
ended Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

Legend

Full support  
Full support


See also