Can I add an HTML5 video to my site?

  • 0
  • 5
  • Question
  • Updated 3 years ago
  • Answered
Note: We want to provide a few common and useful snippets for your use, but our support department is not able to assist you with editing code.  They can help you with code placement.


You can insert an HTML5 video by embedding the code using an ordinary HTML element. One sample is provided below, but you can find many others by doing a Google search for "HTML5 video embed code".

<video autoplay controls preload="auto" width="428" height="240" name="myvideo" id="myvideo">
<source src="yourvideo.mp4" type="video/mp4" />
<source src="yourvideo.m4v" type="video/mp4" />
<source src="yourvideo.ogv" type="video/ogg" />
<source src="yourvideo.webm" type="video/webm" />
*Your web browser does not support HTML5 video*
</video><br>


IMPORTANT: You will need to edit the code above and replace "yourvideo.mp4" with the actual name of your video file. You can edit the code for other file types besides MP4's, but the MP4 type is compatible with all modern browsers.

After you embed the code and publish the page, you will also need to import your video file into the file manager and publish the file.

1. To import the video file, click the site/domain name at the top of the SiteBuilder Plus screen.

2. From the drop-down menu, click "View File Manager".

3. Click the Import button on the top toolbar which will allow you to search your computer and select the file to import.

4. After the file is imported it will appear in the list of other files in the File Manager. You'll need to click/select the video file and then click on the "Publish" button on the top toolbar.

Once the code is embedded into the page, the video file is imported and the page & video file are published, you can view the live website and the video should play.
Photo of Drew N

Drew N, Community Manager

  • 259,004 Points 100k badge 2x thumb

Posted 5 years ago

  • 0
  • 5
Photo of Kalika4887

Kalika4887

  • 100 Points 100 badge 2x thumb
Thanks, Drew.  That is very valuable info.  Years ago I knew how to embed codes, etc. because my best friend at the time was a computer genius and taught me everything I knew, but, over the years, I've forgotten everything he taught me.  Thanks for the mini refresher course.  Once I can wrap my mind around all the instructions, I will give it a try.  You've saved me from having to get up early and call Homestead first thing in the morning! :)
Photo of Drew N

Drew N, Community Manager

  • 259,004 Points 100k badge 2x thumb
Hi Kalika4887,

You're welcome.  That's why I'm here.  Most questions you may have are already answered here in the community, and it's available 24/7.  Sometimes other Homestead users will give you answers as well.  We also have employees here 7 days a week, in case you need a bit of employee assistance.

Drew
Photo of Malu1474

Malu1474

  • 112 Points 100 badge 2x thumb
Drew I got the html code working great only one thing I dont want it to autoplay as I am running multiple videos on the same page. What would the code have to change to so that the customer would have to click the video to start the play? Mahalo
Photo of jostric7896

jostric7896

  • 82 Points 75 badge 2x thumb
This reply was created from a merged topic originally titled continious play video.

I think it call video looping
Photo of Drew N

Drew N, Community Manager

  • 259,004 Points 100k badge 2x thumb
You'll want to add the video via HTML as above. The code at the top will autoplay. To loop, this will do:

<video controls loop>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>


The codes can be combined so they autoplay and loop. It is up to you.
Photo of Bernie4464

Bernie4464

  • 122 Points 100 badge 2x thumb
This reply was created from a merged topic originally titled Video.

When I go to my web site when trying to open video it says I need windows media player and wants me to download a plugin. I have had this site for more than 10 years and never had a problem like this.
Photo of Drew N

Drew N, Community Manager

  • 259,004 Points 100k badge 2x thumb
The browsers are beginning to disable add ons such as Quicktime and Windows Media Player. This has been corrected in Sitebuilder Plus online. You can delete the old media player and add it back. The new media elements are HTML and do not require plug ins.

Keep in mind that Sitebuilder desktop does not have these updated media elements at this time. If you publish using desktop, these may or may not continue to work at this time.
Photo of Bernie4464

Bernie4464

  • 122 Points 100 badge 2x thumb
And how do you do this?
Photo of Drew N

Drew N, Community Manager

  • 259,004 Points 100k badge 2x thumb
The best way is to use Sitebuilder Plus. Delete the old element and Insert a new element with the same file. If you want to use code, then you need to use the code at the top of this page.