Add event handler for video.ended