The HTMLMediaElement.ended property indicates whether the media element has ended playback.
A boolean value which is true if the media contained in the element has finished playing.
If the source of the media is a MediaStream, this value is true if the value of the stream's active property is false.
const obj = document.createElement("video");
console.log(obj.ended); // falseHTMLMediaElement: Interface used to define the HTMLMediaElement.ended propertyMediaStreamMediaStream.active