$w = round($this->width * $this->getCssScale());
$h = round($this->height * $this->getCssScale());
+ // Note: width and height for the video is normally measured from the
+ // preview frame for local files or set to 1280 x 720 for web videos.
+ // The $w and $h variables here seem to be null generally...
+
return $this->makeVideoTag($this, $w, $h, $this->compiler);
}
if (!is_null($w) && !is_null($h)) {
$attr['width'] = $w;
$attr['height'] = $h;
- } else if (!is_null($compiler)) {
+ } else if (!is_null($compiler)) {
+ // Get video dimensions from thumbnail if possible (locally uploaded files)
$path = WS_BOOKS . '/working/' . $compiler->book_id . '/' . $basename . '.jpg';
$dim = getimagesize($path);
$attr['width'] = $dim[0];