Problem embedding video

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
KenDalbyGard
New Member
New Member
Posts: 3
Joined: Fri Jan 23, 2015 9:15 am

Problem embedding video

Post 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
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Problem embedding video

Post by staartmees »

Use the tag Webvideo
KenDalbyGard
New Member
New Member
Posts: 3
Joined: Fri Jan 23, 2015 9:15 am

Re: Problem embedding video

Post by KenDalbyGard »

Thank you for your reply.

How do I use it? Instead of video?
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Problem embedding video

Post 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
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Contact:

Re: Problem embedding video

Post 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.
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: Problem embedding video

Post 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>';

User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Problem embedding video

Post by Rolf »

- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm

Re: Problem embedding video

Post 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.
Post Reply

Return to “Layout and Design (CSS & HTML)”