Is it possible to link to youtube videos in the iframe in the new Open Data Portal?

945
5
05-19-2017 06:58 AM
Lynchburg_GISDivision
New Contributor III

I've tried linking to other websites with success, but having trouble with youtube.  The iframe is just blank.

Tags (2)
0 Kudos
5 Replies
KlaraSchmitt
Esri Contributor

Hello,

It should be possible. I just gave it a go, and it worked for me in Chrome, Firefox, and IE11. What browser are you using and is the YouTube video public?

Here's what worked for me:

1. Open YouTube
2. Copy the URL for the video from the Embed code snippet they provide. (You only want the URL, any other tags will cause a syntax error.)

3. I pasted that URL in the our iFrame URL input:

4. I changed the height to 600, hit apply, and then saved the site for good measure.

0 Kudos
Lynchburg_GISDivision
New Contributor III

This works perfectly!  Thank you!

0 Kudos
deleted-user-03l9pg9FPu-a
New Contributor

Yes there is!

Drop the Iframe into your layout from Site Editor, find the YouTube video you'd like to add, and instead of just copying the link to the video; click the "Share" tab under the video frame, then "Embed," and take a look at the embed URL.

The URL is lengthy, but out of the whole text string (e.g. <iframe width="560" height="315" src="https://www.youtube.com/embed/HNpDFooJsfc" frameborder="0" allowfullscreen></iframe>), you only need the part that reads https://www.youtube.com/embed/DQtgNH443wQ

Paste that smaller section of  the embed URL into the "Iframe URL" box in the Iframe settings pane, set your height, click apply and it should work! Good luck.

KG

0 Kudos
Lynchburg_GISDivision
New Contributor III

This works!  Thanks!!

0 Kudos
MichaelKohler
Occasional Contributor

Even better! you can just have the video itself on a server somewhere and the iframe will work! I just did that with an mp4 video and it works.

0 Kudos