Category: Tutorials|Jun 12, 2018 | Author: Admin

CMSMS HTML5 Video UDT

Share on

CMS Made Simple 1.11.x / 1.12 | 1-10-2014 | Pascal Merks | 

Here is a UDT for CMS Made Simple to put videos on your website without using youtube. You just host your video on your own website.

 

Create a new UDT:
Extensions \ User separated tags \ Add tag

Name: video

Code:

$config = cmsms()->GetConfig();
echo '<video width="100%" controls poster="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.jpg">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.mp4" type="video/mp4">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.ogv" type="video/ogg">
<source src="' . $config['root_url'] . '/uploads/videos/' . ($params['file']) . '.webm" type="video/webm">
Your browser does not support HTML5 video.
</video>';

Create a new folder:
Go to Content / File manager and create a folder of videos in the folder uploads (here the videos are shown).

Upload 4 files with the named name in this folder.

The video file in MP4 format. (File extension .mp4)
The video file in OGG format. (File extension .ogv)
The video file in WEBM format. (File extension .webm)
A preview image in JPG format. (File extension .jpg)

Through this website https://video.online-convert.com you can convert your videos to the correct format or use a program for this /any-video-converter.com/products/for_video_free/ is there a good one for that.

View video on your website:
If you have done everything right, you can now call your video via this line:

Bracket Start video file = "name video" Bracket end

name video is the name you gave to all the files without the file extension (mp4, ogv, jpg).

Example video:

{video file = "test"}

Sponsored Ads:

Comments:


Google has a hidden collection of highly-addictive retro games

Category: Google|Apr 28, 2024 | Author: Admin

Google is officially a $2 trillion company

Category: Google|Apr 27, 2024 | Author: Admin

Snowden: “DO NOT use Reddit!”

Category: IT|Apr 26, 2024 | Author: Admin

Popular Google app used by millions set to close in a few weeks

Category: Google|Apr 25, 2024 | Author: Admin

Cheeky, YouTube!

Category: Google|Apr 24, 2024 | Author: Admin

This is the date Apple will reveal new iPads

Category: Apple|Apr 23, 2024 | Author: Admin

Only possible with VPN

Category: IT|Apr 22, 2024 | Author: Admin

Apple sidles into sideloading in the EU

Category: Apple|Apr 21, 2024 | Author: Admin

Report: Microsoft-OpenAI ownership might get conditional OK from EU regulators

Category: IT|Apr 20, 2024 | Author: Admin

Giant change at Google could change everything

Category: Google|Apr 19, 2024 | Author: Admin

Now Windows will be bothered about this too

Category: Microsoft|Apr 18, 2024 | Author: Admin

Test the new AI trick with Logitech

Category: IT|Apr 17, 2024 | Author: Admin

The US Government Has a Microsoft Problem

Category: Microsoft|Apr 16, 2024 | Author: Admin

Now comes the commercial

Category: Microsoft|Apr 15, 2024 | Author: Admin

Linux Foundation is leading fight against fauxpen source

Category: IT|Apr 14, 2024 | Author: Admin
more