HTMLMediaElement: ended property

فهرست فصل‌ها دانلود آرشیوناشر

MDN Web Docs · نسخهٔ df622a2a1c1e · CC BY-SA 2.5 و مجوز جداگانهٔ ناشر برای نمونه‌کد

{{APIRef("HTML DOM")}}

The **ended** read-only property of the {{domxref("HTMLMediaElement")}} interface indicates whether the media element has ended playback.

Value

A boolean value which is true if the media contained in the element has finished playing.

If the source of the media is a {{domxref("MediaStream")}}, this value is true if the value of the stream's {{domxref("MediaStream.active", "active")}} property is false.

Examples

js
const obj = document.createElement("video");
console.log(obj.ended); // false

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("HTMLMediaElement")}}: Interface used to define the HTMLMediaElement.ended property
  • {{domxref("MediaStream")}}
  • {{domxref("MediaStream.active")}}