Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Video ended Property

Video ended property

Video Object Reference The Video object

Example

Check whether video playback has ended:

var x = document.getElementById("myVideo").ended;

x The output result is:

true

Try it »


Definition and Usage

The ended property returns whether the video has ended.

If the playback position is at the end of the video, then the audio/video has ended.

Note: This property is read-only.


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the ended attribute.

Note: Internet Explorer 8 or earlier browsers do not support this attribute.


Syntax

videoObject

.ended

Technical Details

Return Value: Boolean, returns true if playback has ended, otherwise returns false.

Video Object Reference The Video object