Detecting end of FLV

Hi,

I’m working on a project where i need to trigger an event when an FLV ends. Does anybody know the code for this?

Thanks!