youTube HTML5 Video resizing

stuartbainbridge
14 years, 1 month ago
I have set this up on a clients site where he uses youTube HTML5 videos. The template looks great and with a few like tweaks I have it just the way he likes it. But, the videos he uses are 570 pixels wide which bursts through the right side of the screen. Is there any way to resize these videos for the template?

The site is thebritishresistance.co.uk for you to check.

Stuart
rog
14 years, 1 month ago
+1 !
stuartbainbridge
14 years, 1 month ago
stuartbainbridge wrote:
I have set this up on a clients site where he uses youTube HTML5 videos. The template looks great and with a few like tweaks I have it just the way he likes it. But, the videos he uses are 570 pixels wide which bursts through the right side of the screen. Is there any way to resize these videos for the template?

The site is thebritishresistance.co.uk for you to check.

Stuart


Okay I found away to resize the HTML5 videos from youTube, just add a style to the CSS with the new size for the video and all appears to work.

.youtube-player {
width:280px;
height:187px;
}

Stuart
natale
13 years, 8 months ago
can you be more specific? This style does not seem to calculate the current size of the screen to make the fullscreen, either which css files should be changed?! The ones of the mobile templates or?

Hope you will read it

natale
vmladin
13 years, 4 months ago
I am also very interested in a solution to resize youtube videos in order to keep them at a mobile dimension.

At this stage all videos from my site are going out of the screen on the right side.


Thanks for looking into this.
skibikekite
13 years ago
This works great with youtube, but I have multiple videos from multiple different sources. Is it not possible (for someone solid in writing code) to resize all embeded videos to a mobile size?

I cannot paste code here, but you can view the source code at m.vitalmtb.com.
dryabov
13 years ago
skibikekite wrote:
This works great with youtube, but I have multiple videos from multiple different sources. Is it not possible (for someone solid in writing code) to resize all embeded videos to a mobile size?

I cannot paste code here, but you can view the source code at m.vitalmtb.com.


Taking into account that most of embedded videos are iframes with fixed width and height, it's possible to write plugin that rescales iframes (similar to the rescaling of images).

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.