3 Steps to Embed Google Drive Hosted Video on a Duda Website

Michael Britton • March 2, 2019
A graphic representing embedding a video hosted on Google Drive to a Duda website

The native Duda video widget is a quick and simple way to add a video from YouTube, Vimeo or DailyMotion to your Duda website.  However, if you want to add a video hosted in a Google Drive folder, you'll need a different approach. This page describes how to add a video hosted in a Google Drive folder onto your website using an iFrame. 

Using the Duda native video widget is simple

The Duda web-hosting platform allows you to easily incorporate videos onto web pages and blog posts using the native video widget. Add a video URL to the widget and, voilá, you've added a nicely formatted video to your page.

Native widget dependencies on third parties

Although simple to use, the video widget has one limitation that you may want to workaround. In particular, the widget only allows videos from YouTube, Vimeo or Daily Motion. In many cases, This constraint is not an issue and could even be considered advantageous.

Questionable desirability of YouTube end-screens

However, YouTube's practice of cueing a follow-on video or an end-screen at the end of the playing video may not be the desired behaviour for an independent website - especially when concerned with the aesthetic of the site. This practice is primarily an issue for videos less than 25 seconds in duration because you are permitted to change the end-screen for videos longer than 25 seconds.

Related Topics

Add Google Drive hosted video to website with an HTML iframe

One alternative to the video widget is to add a responsive iframe using the HTML editor and link it to a video stored in a Google Drive folder. This post explains this alternative.

Three advantages to hosting videos in a Google Drive folder

  • Hosting on Google Drive helps maintain visitors' focus upon your site's content compared to YouTube because there is no video-end screen suggesting other content
  • For existing GSUITE users, there's no added cost aside from incremental storage.
  • Digital media assets can be maintained together on a single platform.

Four disadvantages to hosting videos in a Google Drive folder

  • Videos held outside of the YouTube ecosystem don't benefit from YouTube features such as analytics.
  • There's limited control of the thumbnail image when the video isn't playing.
  • Black bars surround the thumbnail when the video isn't playing.
  • Initial page rendering may be slower, which could be sufficient reason to forgo this approach if you're considering placing the video above the fold. Page loading speed is an important signal used by Google to determine page ranking and can negatively impact the visitors' experience.

Three Steps to Embed A Google Drive Hosted Video

Step 1: Add the styling and create a div for responsive iframe

The following code can be copied and pasted into the HTML edit widget for your blog post or web page.

<style>

.video-container {

position: relative;

padding-bottom: 56.25%;

padding-top: 0px;

height: 0;

overflow: hidden;

}

.video-container iframe {

position: absolute;

top:0;

left: 0;

width: 100%;

height: 100%;

}
</style>


<div class="video-container">

***** Google Drive iframe embed code goes here ******


</div>


Step 2. Copy the iframe embed code for the video from Google drive folder onto your clipboard

The following video walks you through the steps to get the embed code from your Google Drive folder.

   

Step 3: Paste the Google Drive iframe embed code

Paste the iframe code from Step 2 into your HTML editor from Step 1, replacing the contents of the placeholder ( ***** Google Drive iframe embed code goes here ******)  with the iframe code. The resulting code should look like this:

<style>

.video-container {

position: relative;

padding-bottom: 56.25%;

padding-top: 0px;

height: 0;

overflow: hidden;

}

.video-container iframe {

position: absolute;

top:0;

left: 0;

width: 100%;

height: 100%;

}
</style>

<div class="video-container">

<iframe frameborder="0" width="640" height="480" src=" https://drive.google.com/file/d/1QgYGZKk5UNFcwbW5lLhD91Kl2Vk5xxL1/preview" ; allowfullscreen="true" allow="autoplay"></iframe>

</div>

If things worked correctly, your embedded video should look something like this:

Conclusion

Adding Google Drive hosted videos to your website with the approach described above is relatively easy and has advantages but comes with trade-offs. It's essential to consider the potential negative consequence for user experience and SEO.  Therefore, when adding video to your website using an iframe, consider positioning the video below the fold.

Environicle

Internet marketing strategy  | Protellus digital marketing agency Toronto
By Michael Britton April 7, 2020
Don't let the sting of the COVID-19 triggered pause in economic activity cause you to miss the opportunity. Use the down time as an opportunity to revisit your internet marketing strategy to ensure you're ready to compete in the days ahead.
Add Schema Markup to a Duda Website
By Michael Britton June 20, 2019
Structured data, also known as schema markup, is one of the 200 factors that Google uses to determine ranking of web pages in search results. This blog post walks through the steps required to add schema markup to your Wix or Duda website and improve your website search ranking.
Step by Step process for creating Facebook carousel ad
By Michael Britton June 15, 2019
This post will help you through the step by step process of defining and implementing a Facebook carousel ad - the recommended Facebook ad format known for consistently delivering results.
By Michael Britton May 29, 2019
Improve local search results rank and get found by new customers with citations in 13 online directories suitable for Canadian businesses.
More Posts
Share by: