Well, I was checking out video of html5 and I saw that it has a lot of control events, such as this , so you can tell when a video is about to end and also trigger an event when it's gone.
I would like to know if there is something similar to image, for example if I wanted to make an image and video player, how would I know that an image that has to play X time is about to end without having to have a setInterval checking the current time and the time of the image to know if it has already finished or not.
Has anyone ever done anything like this? Any tips?