The ended
event is fired when playback or streaming has stopped because the end of the media was reached or because no further data is available.
This event occurs in three related but unique contexts:
HTMLMediaElement
(<audio>
and <video>
) fire ended
when playback of the media reaches the end of the media.MediaStreamTrack
interface, fire ended
when the track's source permanently stops sending data on the stream. There are various ways this can happen, including: ended
event.AudioScheduledSourceNode
.Event
While this event is defined in more than one specification, at this time they specify this event identically, so we have documented them as if they were one. If at some point that changes, the documentation will be revised.
Property | Type | Description |
---|---|---|
target Read only
| EventTarget | The event target (the topmost target in the DOM tree). |
type Read only
| DOMString | The type of event. |
bubbles Read only
| Boolean | Whether the event normally bubbles or not. |
cancelable Read only
| Boolean | Whether the event is cancellable or not. |
playing
waiting
seeking
seeked
ended
loadedmetadata
loadeddata
canplay
canplaythrough
durationchange
timeupdate
play
pause
ratechange
volumechange
suspend
emptied
stalled
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/ended