Advertisement
Home Open Editor ❯

HTML Audio/Video DOM ended Property

Example

var vid = document.getElementById("myVideo");

function myFunction() {
  alert(vid.ended);
}

Try this code ❯

Meaning

The ended property returns whether the playback of the audio/video has ended or not.

Return a Boolean value, returns true if the playback has ended, otherwise it returns false.


Standard Syntax

audio|video.ended


Advertisement

Return Value

Type Description
true Video playback has ended.
false Video playback has not ended
Home Open Editor ❯
Advertisement