0
Guys, I was checking out the tag video of Html5 and saw that this has enough control events, as that, so it is possible to know when a video is about to end and also trigger an event when it ends.
I wonder 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 whether or not it has finished.
Has anyone ever done anything like this? Any tips?
Image player?
– TutiJapa Wada
Yeah, it’s just an example
– Paulo Gustavo
You want to know when it finishes being loaded ?
– Gabriel Rodrigues
In the title is kind of "nothing to do" with the question.
– Guilherme Nascimento
No, for example, a video has a duration of 10s. With the video tag, I can trigger an event (I believe so) when the video finishes running. And if I want an image to run for 10 seconds, I can create events for that?
– Paulo Gustavo
Yes, you can do event while running the image appears and when the video event has finished you hide the image
– TutiJapa Wada
can try using the
setTimeout()
– Silvio Andorinha