HTML Audio/Video DOMendedProperty
HTML Audio/Video DOM Reference Manual
Example
Check whether the video playback has ended:
myVid=document.getElementById("video1");
alert(myVid.ended);
alert(myVid.ended);
Try it Yourself »
Definition and Usage
The ended property returns whether the audio/video playback has ended.
If the playback position is at the end of the audio/video, then the audio/video has ended.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the ended property.
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 returns false. |
|---|
HTML Audio/Video DOM Reference Manualother extensions