I have a slightly custom Boulevard Theme.
I'm using the Vimeo import plugin to create video albums.
I don't find a way to define the height of videos : with my pictures albums, the pictures height is equal to the wrap (album intro) height and everything's working great, but with videos, the wrap is taller than my videos and so it looks bad.
I tried to define height by adding <div height="xxx"></div> more or less around <koken:video /> but it's not working.
I tried to look for some video attributes in settings.css.lens but I didn't find anything.
For the moment the only way I could fix the video height was by using this jQuery script :
// Trouver les videos Vimeo
var $allVideos = $("iframe[src^='//player.vimeo.com']"),
// L element contenant les videos: ici body
$fluidEl = $("body");
// Trouver et sauvegarder le ration des dimensions de la video
.data('aspectRatio', this.height / this.width)
// Supprimer les tailles en dur de la video
// Evenement : Quand la fenetre est redimensionnée
var newWidth = $fluidEl.width() - 262;
// Redimensionner toutes les videos en fonction de leur ration
var $el = $(this);
.height(newWidth * $el.data('aspectRatio'));
This script gave me exactly what I wanted, the video height is the same than the warp height, but 2 problems appear :
- If I have another video in the album after the first one, the second one frame is going over the first video (right side of the first video under left side of the second)
- I loose the dynamic resizing of contents if I reduce my window size : the video width is reducing the good way but height is getting stuck at original size so big black areas appear around the video frame and it's quite a mess.
This script was doing great on a static page with the exactly same video embedded with <iframe> stuff, but appears to be unable to help me for a dynamic video album.
So my questions are : is it possible to fix this video height problem in a video album ? How ? CSS, original page code, script ?
Or maybe it's possible to define somewhere the exact size (width x height) I need for every video ?
Actually I don't understand why everything's going well with pictures and not with videos, as they look to be treated the same way as an album by Boulevard...
This question has received the maximum number of answers.