Embed videos & playlists

Yous can add a YouTube video or playlist to a website or weblog by embedding it.

Embed a video or playlist

  1. On a computer, go to the YouTube video or playlist you lot want to embed.
  2. Click SHARE Share.
  3. From the list of Share options, click Embed.
  4. From the box that appears, copy the HTML lawmaking.
  5. Paste the code into your website HTML.
  6. For network administrators: Y'all will need to add youtube.com to the firewall allowlist.
  7. Of import: If your website or app is kid directed and you embed YouTube content, you must self designate your site or app using these tools. This self designation will ensure Google does not serve personalized ads on these sites or apps and some features will be disabled in the embedded role player.

Note:Age-restricted videos can't be watched on nearly 3rd political party websites. These videos will redirect viewers back to YouTube when played.

Manage video embedding options

Turn on privacy-enhanced way

The Privacy Enhanced Mode of the YouTube embedded thespian prevents the use of views of embedded YouTube content from influencing the viewer's browsing experience on YouTube. This means that the view of a video shown in the Privacy Enhanced Mode of the embedded thespian will not be used to personalize the YouTube browsing experience, either within your Privacy Enhanced Mode embedded player or in the viewer'south subsequent YouTube viewing experience.

If ads are served on a video shown in the Privacy Enhanced Manner of the embedded thespian, those ads will as well be non-personalized. In add-on, the view of a video shown in the Privacy Enhanced Way of the embedded player will non exist used to personalize advertisement shown to the viewer exterior of your site or app.

Equally a reminder, the YouTube API Terms of Service and Developer Policies utilize to the access and apply of the YouTube embedded player.

To use Privacy Enhanced Mode:

  1. Change the domain for the embed URL in your HTML from https://www.youtube.com to https://www.youtube-nocookie.com.
  2. For network administrators: You lot will demand to add together youtube-nocookie.com to the firewall allowlist.
  3. For use in applications, use a WebView instance of the embedded player. Privacy Enhanced Mode is available just for embedded players on websites.
  4. Important: If your website or app is kid directed, you must self designate your site or app using these tools, as required by the YouTube API Terms of Service and Programmer Policies, even if y'all embed YouTube videos with the Privacy Enhanced Mode player.

Instance:

Earlier

<iframe width="1440" height="762"

src="https://www.youtube.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Later on

<iframe width="1440" elevation="762" src="https://www.youtube-nocookie.com/embed/7cjVj1ZyzyE"

frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>

Notation: If the viewer clicks or taps out of the embed and is redirected to another website or app, that website or app may track the viewer's behavior as per that website's or app's policies and terms.

Brand an embedded video play automatically

To brand an embedded video autoplay, add "&autoplay=1" to the video's embed code right after the video ID (the series of letters that follows "embed/").

Embedded videos that are autoplayed don't increment video views.

Example:

<iframe width="560" height="315" src="https://www.youtube.com/embed/D6Ac5JpCHmI?&autoplay=one"frameborder="0"  allowfullscreen></iframe>                  

Start an embedded video at a certain time

To take a video start playing from a specific betoken, add "?start=" to a video'south embed code, followed by the time in seconds at which y'all'd like the video to begin playing.

For instance, if y'all want a video to first at 1 minute and 30 seconds into the video, your embed code would look something like this:

<iframe allowfullscreen="" frameborder="0" tiptop="315" src="http://www.youtube.com/embed/UkWd0azv3fQ?star                                          t=ninety                    " width="420"></iframe>

Add together captions to an embedded video

Brand captions automatically announced for an embedded video by adding "&cc_load_policy=1" to the video'due south embed code.

You can also choose a explanation language for the embedded video. To specify the caption language for the video that you lot'd like to embed, just add "&cc_lang_pref=fr&cc_load_policy=one" to the video's embed code.

  • "cc_lang_pref" sets the language for the captions shown in the video.
  • "cc_load_policy=ane" turns captions on by default.
  • "fr" represents the language code for French. You can look up 2-letter of the alphabet linguistic communication codes in the ISO 639-1 standard.

Plow off embedding for your videos

If you've uploaded a video and don't want to permit others to embed your video on external sites, follow these steps:

  1. Sign in to YouTube Studio.
  2. From the left menu, select Content.
  3. Side by side to the video y'all'd like to manage, select Details .
  4. From the meridian, select Prove MORE.
  5. Uncheck the box next to "Let embedding" and SAVE.

Was this helpful?

How can we improve it?