player.js: Ended event is not fired for our video
Hello there!
Thank you for this new API, it looks much better than Froogaloop.
However, we have some issues with ended / finished event. It’s not called for our video. But, if we use some other public video from Vimeo it works OK. Maybe there is some issue with privacy or embed settings? It was working some time ago and was broken recently. We are experiencing this problem for both API versions of Vimeo.
For now I have to use:
timeupdate: function (event) {
if (event.percent >= 0.95) {
// Video finished...
}
}
Also, the last called timeupdate event has percentage around 0.99, it’s never called with 1.0, maybe it’s somehow related to ended problem.
Thank you!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 43 (9 by maintainers)
Same issue here. And it’s been YEARS. We also pay for a premium Vimeo account, and I’m mind blown that you guys can’t solve something like this with this much time. “seeked” and “timeupdate” not firing or firing RANDOMLY at times… I can’t deliver a product where the UI depends on timeupdates and seeked events with it only working SOME of the time.
Will this even be addressed?
Ok, I should have looked first, but found this issue that solves this problem by removing the api=1 from the API call. Maybe this is something I had from the previous Froogaloop implementation.
@wcndave of course, because
timeupdateevent is called multiple times per second while video is playing. It was simplified example. If you want to call your finish method only once, then you need to introduce some flag variable in order to prevent multiple executions.Example
@mikegarlick this is my solution:
@luwes player ended isn’t firing for this video https://vimeo.com/92182340
Ah I see, thanks for the feedback. Not sure if we’ll be able to add that debug feature but I’ll bring it up.
@ahmadawais Could you post some clips where this is the case? Thanks
I still having issue with
ended,seekedI am adding the player as described here https://developer.vimeo.com/apis/oembed#arguments, using oembed endpoint and HTML returned by endpoint.When I doesn’t add the
&api=trueto the oembed endpoint - I doesn’t have?api=1in iframe url. andended,seekedas well asseek,finishdoesn’t triggered. But If I add&api=trueto the oembed endpoint,?api=1appears in iframe url, andseekfired. Also,seekfired at the end of the video with no user interaction, withdata.seconds== 0.PS. the way how I am construction player:
Hi, everyone. We recently made an update to the player that should resolve this issue for good. I’m going to close this issue, but please comment with a link to the video if you’re still seeing this happen and we’ll take a look.
Will wait for it then, thanks. The workaround is working pretty good, so no worries.