Smartify Your Video Embeds!

A comprehensive guide to embedding and customizing YouTube, Vimeo and self-hosted videos in web pages

Edoardo Nosotti
RockedScience

--

Photo by Jon Flobrant on Unsplash

Video content is taking over the Internet. The trend began long ago and the most recent stats confirmed the predictions were correct. TikTok, a social network entirely based on video content, grew so much and so rapidly that it quickly became a “threat” to long-stading giants such as Instagram and even rasied concerns in the US government. Fueled by the widespread availability of high-speed internet access, also “on the run” with 4G (and soon 5G) mobile data connections, and cheap or free video hosting platforms, video content has become so pervasive in websites that it is even used to animate backgrounds.

Video embeds though are not easy ones to tame. Especially when you need to embed video hosted on a third-party platform, such as YouTube and Vimeo. It is great to piggyback on their virtually-infinite storage and bandwidth, but it comes at a price: <iframe>s.

<iframe>s got a bad rap for many reasons. They once used to pose a threat to the security of websites, because the lack of sandboxing in some old browsers let scripts cross the boundaries of the <iframe>s and possibly execute malicious code. Also, wiring the browsers’ history controls (back/forward) to <iframe>d content…

--

--

Edoardo Nosotti
RockedScience

Certified Cybersecurity Analyst and Senior Cloud Solutions Architect. Passionate about IoT, AI, ML and automation.