Video endedProperty

Video 对象参考手册Video Object

Example

Check whether the video has finished playing:

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

xThe output result is:

true

Try it yourself »

Definition and Usage

The ended property returns whether the video has ended.

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

Note:This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All mainstream browsers support the ended property.

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


Syntax

videoObject.ended

Technical Details

Return value: Boolean value, returns true if playback has ended. Otherwise returns false.


Video 对象参考手册Video Object Other Extensions