Use this small javascript code to show a poster image at the end of a video with video tags in HTML 5