Embedding Youtube Video in Email

Viewed 5056

I've tried multiple times to send out an email trying to get the YouTube video to appear within the email but however, I've had no luck.

I get this back:

Empty Screen

I've tried using iFrame but turns out it doesn't support Gmail.

<iframe width="560" height="315" src="https://www.youtube.com/embed/w_Da75XbPBs"            frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

I'm trying to replicate what Youtube uses when it sends out subscription emails containing the video link.

I've also tried object and embed but neither of them appear when I send the email out.

edit; I'm trying to replicate this (the portion in red redirecting to Youtube if clicked on):

enter image description here

5 Answers

The world of coded emails is an interested one. For starters, you can't send javascript elements through an email, for security reasons, I'm sure you know this but I wanted to cover my bases.

Also, consider what css you're using. Emails can only support a limited number of css options and all css must be inline (you can't use the element). Also maybe read up on email support for html and css as a whole (check out this super awesome link).

It looks to me as though YouTube isn't actually embedding the video, which others have mentioned (at least, they aren't embedding the videos in the way we are used to). Rather they are taking the thumbnail image from their database and then stylizing it (with video length and such) to make it look like an embedded video.

While you don't have access to the YouTube thumbnail database, I'm assuming you want to send links of your own videos to others? Just host the thumbnails, of whatever videos you want to send, on your server and then link to it with a simple '> and then use some styles.

Playable video in email isn't well supported. If you're looking to mimic YouTube's own implementation of a video link, make a larger thumbnail of the video, maybe overlay the play button and link the image directly to the YouTube link.

Try using Outlook if you can. Below are step-by-step instructions.

  1. Click on the quick access toolbar and select More Commands
  2. Choose Attach File
  3. Click the Add >> button, then select Attach File
  4. Select your HTML file
  5. Then, instead of just hitting done, make sure to change Insert to Insert as text

Then, Outlook will format your email. However, Outlook will ignore the <iframe> element.

So if you really need it, try this Chrome extension.

Source: https://www.linkedin.com/pulse/how-insert-html-source-code-outlook-emails-maurizio-la-cava/

It depends on email client. I doubt if any support video-embedding directly into email document due to security reasons. I suggest you to use Image instead. Create a Video thumbnail image, and make it a hyperlink to your video.

The closest thing you can do (to my knowledge) is to attach the video. If you insert the video link, it will send the video as an attachment which can be watched from within the email. Apologies if this isn't what you want, but I don't think there is a better way.

Related