HTML Audio/Video DOM ended Property
HTML Audio/Video DOM Reference
Example
Check whether video playback has ended:
myVid=document.getElementById("video1");
alert(myVid.ended);
Try it »
Definition and Usage
The ended property returns whether the playback of the audio/video has ended.
The audio/video has ended if the playback position is at the end of the audio/video.
Browser support





All major browsers support the ended attribute.
**Note:** Internet Explorer 8 and earlier versions do not support this property.
Syntax
audio|video
.ended
Technical Details
| Return Value: | Boolean value, true|false. Returns true if playback has ended, otherwise false. |
|---|
HTML Audio/Video DOM Reference