I have the following problem ...
Scenario: A site with HTML-only page delivery (we can not use a server-side language).
We do a YouTube embed video, but some companies, as we know, block their employees' access to social networks. It happens that in the frame of youtube (embed) the content message appears blocked.
One of the possible solutions would be to identify the HTTP status and if you return 200, we display the frame with the Youtube embed. If not, hide the frame and only the background image is displayed, and the user error that does not have access is not displayed.
Is it possible to do this only with the use of javascript?