Search…

X3 Photo Gallery Support Forums

Search…
 
hardliner
Experienced
Topic Author
Posts: 91
Joined: 22 Jul 2011, 14:15

How can i add my own videos on my site?

06 Jan 2016, 11:46

You can add videos from vimeo or youtube. But i stored my own videos on a folder on my site.

My question is how can i add the videos to see the videos on my website?

Is this possible?

Can you explain how i can do this?

Best Regards
Danjel
 
User avatar
mjau-mjau
X3 Wizard
Posts: 11081
Joined: 30 Sep 2006, 07:37

Re: How can i add my own videos on my site?

07 Jan 2016, 07:45

hardliner wrote:My question is how can i add the videos to see the videos on my website?
We will soon add a solution to automatically embed uploaded videos, similar to how the gallery works. For now however, you would need to use the following workaround:

1. Upload your MP4 video files into the page folder as usual.
2. Embed them into your page content section, with the following code:
Code
<video width=100% controls>
<source src="{{path}}videofilename.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
Note: The {{path}} is a dynamic variable in X3, that converts to the file-path for the folder. You can change "width" attribute to pixels value, and also use the "height" attribute, but this is not recommended. The video will embed at original aspect ratio with width=100%, and if you use pixel values and/or "height", the video may not generally fit properly in your layout, and could break outside.

Important Technical Notes
There are many reasons we recommend using 3rd party services like Vimeo and Youtube.

- They will encode in multiple format, for compatibility across all devices and platforms.
- They will output videos in multiple bitrates, to satisfy device and internet speed.
- They are served from dedicated fast servers, offloading your own hosting.
- Self-hosted video is not compatible across all devices, unless you encode video in multiple formats.

You need to make sure to encode as mp4 format, using H.264 and AAC audio encoding for maximum compatibility. See more details about self-hosted videos here, and several limitations here:
http://www.fusionplate.com/6187/how-to- ... ml5-video/
https://en.wikipedia.org/wiki/HTML5_video

* In the first link above, you can also find a few additional attributes for video controls and interface.
 
hardliner
Experienced
Topic Author
Posts: 91
Joined: 22 Jul 2011, 14:15

Re: How can i add my own videos on my site?

07 Jan 2016, 11:07

You make my day.

i have various videos from my Camera and the camera makes mp4 files.

i must nothing convert.

:D

Best Regards
Danjel