Page 1 of 1
Problem embedding video
Posted: Fri Jan 23, 2015 9:28 am
by KenDalbyGard
Hello!
I´ve got a problem embedding a youtube video. Tried embedding from own server as well. Encluding the code.
Does anyone know where I´ve gone wrong?
<p>Time laps film över hur det kan gå till.</p>
<video width="400" height="300" controls>
<source src=""
https://www.youtube.com/watch?v=mJ1JdudIUkE"" type="video/mp4">
</video>
</p>
Kind Regards, Ken
Re: Problem embedding video
Posted: Fri Jan 23, 2015 11:43 am
by staartmees
Use the tag Webvideo
Re: Problem embedding video
Posted: Fri Jan 23, 2015 12:25 pm
by KenDalbyGard
Thank you for your reply.
How do I use it? Instead of video?
Re: Problem embedding video
Posted: Fri Jan 23, 2015 1:13 pm
by staartmees
Download it from
http://dev.cmsmadesimple.org/projects/webvideo
It is marked as stale, but it works perfect with the latest version of cmsms and php 5.6
Re: Problem embedding video
Posted: Fri Jan 23, 2015 10:08 pm
by paulbaker
...or underneath your youtube video click "Share" then click "Embed" click "Show more", adjust settings and copy the iframe code it gives you. Paste in.
Re: Problem embedding video
Posted: Sat Jan 24, 2015 7:38 am
by staartmees
You also have a very good UDT written bij
http://pmkmedia.nl/ to put a self hosted video on your webpage.
Uploads the video (mp4 and ogv) together with a screenshot (jpg) in uploads/videos. All three files must have the same name without spaces
The code on your webpage
Code: Select all
{video file="namevideo"} whereas namevideo is the name of the video without the extension.
The UDT
Code: Select all
$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">
Your browser does not support HTML5 video.
</video>';
Re: Problem embedding video
Posted: Sat Jan 24, 2015 9:27 am
by Rolf
Re: Problem embedding video
Posted: Sat Jan 24, 2015 11:25 pm
by rotezecke
Does anyone know where I´ve gone wrong?
<p>Time laps film över hur det kan gå till.</p>
<video width="400" height="300" controls>
<source src=""
https://www.youtube.com/watch?v=mJ1JdudIUkE"" type="video/mp4">
</video>
</p>
i think the src attribute of source element is empty as there are two " quotes. the closing </p> also seems out of place but browsers should handle that easily.