这个onended
事件发生时音频/视频已结束。
这个onended
事件对于像 "thanks for listening" 这样的消息很有用。
加载媒体时,这些事件按以下顺序发生:
Event | Occurs When |
---|---|
onloadstart | The loading of a media starts |
ondurationchange | The duration of a media is changed |
onloadedmetadata | The meta data for a media has been loaded |
onloadeddata | A media frame is loaded |
onprogress | The browser is loading a media |
oncanplay | An element's scrollbar is being scrolled |
oncanplaythrough | The browser estimates it can play a media |
onplay | A media starts to play |
onplaying | A media starts or resumes |
ontimeupdate | The indicated time is changed |
onended | A media has reached the end |
媒体加载或播放时可能发生的事件:
Event | Occurs When |
---|---|
onabort | The loading of a media is aborted |
onemptied | A media is empty (already loaded) |
onerror | An error occurs while loading a media |
onpause | A media is paused |
onratechange | The playback rate is changed |
onseeked | A user has seeked a new media position |
onseeking | A user start seeking a new media position |
onstalled | Media data is not available |
onsuspend | The browser is not getting the media data |
onvolumechange | The volume of a media is changed |
onwaiting | A media is waiting for the next frame |
气泡: | 不 |
---|---|
可取消: | 不 |
事件类型: | 事件 |
HTML 标签: | <音频> 和 <视频> |
DOM 版本: | 3 级活动 |
onended
是 DOM Level 3 (2004) 功能。
所有现代浏览器都完全支持它:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | 11 |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!