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.
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.
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.
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.
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.
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>
The following video walks you through the steps to get the embed code from your Google Drive folder.
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: