I am using Video overlay

How to close Video overlay when video is finished?

but how to close when video ends?

is the video an HTML5 video tag or a flash object? If you are using the HTML5 standard video tag, then you can get at the duration of the video via the duration property in javascript, otherwise you may be able to get at the duration of a flash video using the swfobject.js library. You can write your own event to observe the duration of the video and then when it's the same as the final duration you would just trigger the overlay to close with close()

If this is a video you host yourself, then you'd probably have to feed that information to your code.

How to code for video end event?