zhw2590582 / ArtPlayer

:art: ArtPlayer.js is a modern and full featured HTML5 video player
https://artplayer.org
MIT License
2.49k stars 264 forks source link

注册了ended事件,但是当进度条走到最后没有触发 #687

Closed thshu closed 7 months ago

thshu commented 8 months ago

Expected behaviour

预期为触发事件在控制台输出 视频播放完毕

Actual behaviour

没有任何事件被触发

Steps to reproduce

相关代码:

art.on('ended', () => {
    console.log("视频播放完毕");
    speed.value++
});

Environment

Console errors (if any)

Link to where the bug is happening

zhw2590582 commented 7 months ago

原生的video事件需要使用video:ended https://artplayer.org/document/advanced/event.html

art.on('video:ended', () => {
    console.log("视频播放完毕");
});