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:


Microsoft’s free PC optimizer makes it easier to free up storage space

Category: Microsoft|May 13, 2024 | Author: Admin

Stack Overflow Users Are Revolting Against an OpenAI Deal

Category: IT|May 12, 2024 | Author: Admin

ChatGPT is probably coming to the iPhone

Category: Apple|May 11, 2024 | Author: Admin

April Windows Server updates also cause crashes, reboots

Category: Microsoft|May 10, 2024 | Author: Admin

Apple skin braided after advertising stunt

Category: Apple|May 9, 2024 | Author: Admin

"RTX 5080 coming this fall"

Category: IT|May 8, 2024 | Author: Admin

Sorry, but it will stop on October 14, 2025

Category: Microsoft|May 7, 2024 | Author: Admin

Microsoft announces new security services and features for AI deployments

Category: Microsoft|May 6, 2024 | Author: Admin

Can force Facebook to allow it

Category: IT|May 5, 2024 | Author: Admin

Siri can no longer tell the clock

Category: Apple|May 4, 2024 | Author: Admin

Struggling with VPN

Category: Microsoft|May 3, 2024 | Author: Admin

This is how Huawei tricked its way into the US

Category: IT|May 2, 2024 | Author: Admin

Edge 125 arrives in Beta with sleeping tab improvements and other changes

Category: IT|May 1, 2024 | Author: Admin

Now the iPad opens

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

Woke up locked out of Apple ID on iPhone

Category: Apple|Apr 29, 2024 | Author: Admin
more