9/23/2014
Tableau Tip - Embedding YouTude Videos in Tableau - Updated


Earlier today, someone was reading my blog post about embedding YouTube videos in Tableau and this person emailed me because he was having trouble getting the videos to embed correctly. Using the previous instructions that I posted here, it now appears to only work in the Safari browser, but not in other browsers.

Long story short, the URL that used to work no longer works like it used to. I won't bore everyone with the details about why. Instead, I will post an updated URL that should work. You will need the YouTube video ID in the same manner as the last time.

Each video on YouTube has it's own URL. The URL for this video is:
   https://www.youtube.com/watch?v=KdoBuNNvVec

Under each video in YouTube there is a "Share" option. This returns a link for the video.
   http://youtu.be/KdoBuNNvVec

NOTE - This is where the URL needs to be changed. The previous method used this URL format:
   www.youtube.com/embed/KdoBuNNvVec

This needs to be changed to:
   www.youtube.com/v/KdoBuNNvVec

Notice that in each case the video ID is exactly the same, KdoBuNNvVec. The third link, with "v" instead of "embed" is the link that we need.

Here is a list of useful parameters when embedding YouTube videos that can be added to the link.

&hd=1 Embeds the video in high definition
Note - this won't work embedding iframes
&vq=hd720 Alternate version which should work in Tableau
&start=35 Starts the video at a specific time in seconds (in this case at 35 seconds)
&autoplay=1 Sets autoplay feature so that video starts automatically
(default is to not start automatically)
&color=white Changes the color on the playback bar to white instead of the default red
Note - white disables modestbranding
&rel=0 Disables the related videos at the end of the video
&autohide=1 Hides all controls and video title on start
&autohide=2 Shows play controls, but hides all other controls and video title on start
&showsearch=0 Prevents users from searching for other videos
&modestbranding=1 Removes YouTube branding to make videos look more professional
&loop=1&playlist=KdoBuNNvVec Loops video after playback
Note - this will not loop a partial video using &start. It will alternate instead.


Putting some of these together embeds a full screen high definition video that autoplays starting at 50 seconds with auto-hide controls.

   www.youtube.com/v/KdoBuNNvVec?autoplay=1&rel=0&color=white&autohide=2&start=50&vq=hd720

NOTE: This method will allow a video in a visualization play on Tableau Public or Tableau Server, but it will not work in Tableau Desktop.

I hope you find this information useful. If you have any questions feel free to email me at Jeff@DataPlusScience.com


Jeffrey A. Shaffer

Follow on Twitter @HighVizAbility