Expired video in emdended code

Your answer is wrong, what is this link?
My request is for when the embedded player point to an expired video, instead to show black, would be good to show latest videos broadcasts. At the moment I solved by doing a page (script) in a my web server where the player point, passing the id in the url so that the script make a redirect to the video if not expired (by checking with api) otherwise redirect to the channel where latest video is show automatically. Thanks