How to embed YouTube videos on your website or blog
Embedding YouTube videos or playlists on a website or blog is a pretty straightforward task. All you have to do is head over to the video/playlist you want to embed, click "SHARE," and select "Embed" from the list of options. Then, copy the HTML code that appears and paste it into the HTML of the website. Network admins should add youtube.com to their firewall allowlist for seamless integration.
Embedding videos on child-oriented websites and apps
For kid-directed websites or apps, you'll have to self-designate with certain tools. This will ensure that Google doesn't serve personalized ads, and some features will be disabled in the embedded player. Notably, age-restricted videos can't be watched on most third-party websites and will redirect you back to YouTube for watching.
Enhancing privacy and autoplay features
Privacy Enhanced Mode can be enabled for embedded videos to ensure views don't affect the viewer's YouTube browsing experience. To enable this mode, users have to change the domain in their embed URL from "https://www.youtube.com" to "https://www.youtube-nocookie.com." Network admins have to add youtube-nocookie.com to their firewall allowlist. Also, an embedded video can be set to autoplay by adding "&autoplay=1" after the video ID in the embed code.
Customizing start time and captions
Users can customize the start time of an embedded video by adding ?"start=" and the time in seconds in the embed code. This way, videos can start playing from a particular point. Captions can also be enabled automatically by adding "&ccloadpolicy=1" in the embed code. To specify a caption language, add "&cclangpref=fr&ccloadpolicy=1," where "fr" is the language code for French as per ISO 639-1 standards.
Disabling embedding for uploaded videos on YouTube
Users who don't want others to embed their uploaded videos can disable this feature in YouTube Studio. By signing in, selecting "Content" from the left menu, choosing "Details" next to their video, clicking "SHOW MORE," unchecking "Allow embedding," and saving changes, users can ensure their content stays exclusive to YouTube. This feature gives an additional layer of control over how and where a user's content is shared.