0

I have an animated gif file that I want to play for a set time - set by number of loops. When it is finished I want to redirect to another url.

How can I determine when the number of loops has been completed?

I need this to be automated as it will be showing on an intelligent tv where there can be no user action.

CRG

CRG
  • 11
  • 2
  • I think that would be on client side, with js https://stackoverflow.com/questions/19171075/how-to-stop-an-animated-gif-from-looping – Emilio Gort Oct 25 '17 at 15:19

1 Answers1

0

PHP is server side and GIF is an image in the client side. PHP cannot be used to track even the user's behaviour. If you are know the duration and if the GIF doesn't loop, what you can do is, on the image's load event, you can use a setTimeout() and use location.href to redirect.

Soolie
  • 1,812
  • 9
  • 21