Blogger, html5 & mp4 video help?

ponder

Honorary Master
Joined
Jan 22, 2005
Messages
98,691
Reaction score
31,367
Location
Niflheimr
Ok this is to help someone else.

Blogger only allows youtube videos via the gui interface but it seems you can embed any video link via the html tab.

Video source:
HTML code:
Code:
<video width="480" height="320" controls="controls">
<source src="http://serverIP_or_domain/location_of_video.mp4" type="video/mp4">
</video>

Result: https://ponder1911.blogspot.com/2019/08/blog-post.html

Questions:
1. How do you centre the video on the page so it's not stuck on the left.
2. Is there a way to autosize the video based on it's real size.
3. Is there a way to autosize the video based on scaling, 75% 50% to make large videos smaller.

This is for a person that is not tech savvy but they will be able to copy and paste.
 
Ok so far I got this to centre allign and also got it restricted to 480 pixels for mobile devices.

Code:
<div style="text-align:center;">
<video controls=controls>
<source src="https://i.imgur.com/5iDeTyf.mp4" type="video/webm" media="all and (max-width:480px)">
   <source src="https://i.imgur.com/5iDeTyf.mp44" type="video/mp4">
</video>
</div>

EDIT: the 480px option does not seem to work? I need help here.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X