8
I have the following problem...
Scenario: A site with HTML-only pages (we cannot use a server-side language).
We embed video from Youtube, but some companies, as we know, block their employees' access to social networks. It happens that in the youtube frame (embed) appears the blocked content message.
One of the possible solutions would be to identify the HTTP status and if it returns 200, we display the frame with Youtube embed. Otherwise, we hide the frame and only the background image is displayed, no error is displayed for the user who has no access.
It is possible to do this only with the use of javascript?
I believe you would have to request the video via Ajax.
– Beterraba
Take a look at this here, I think the solution is there: http://www.newmediacampaigns.com/blog/lazyytjs-a-jquery-plugin-to-lazy-load-youtube-videos
– Michael Siegwarth