Browse Source

fix oembed video thumb display ratio

pull/1/head
Fabio Comuni 9 years ago
parent
commit
2905df527f
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      include/oembed.php

+ 5
- 3
include/oembed.php View File

@ -56,9 +56,11 @@ function oembed_format_object($j){
switch ($j->type) {
case "video": {
if (isset($j->thumbnail_url)) {
/*$tw = (isset($j->thumbnail_width)) ? $j->thumbnail_width:200;
$th = (isset($j->thumbnail_height)) ? $j->thumbnail_height:180;*/
$tw=150; $th=120;
$tw = (isset($j->thumbnail_width)) ? $j->thumbnail_width:200;
$th = (isset($j->thumbnail_height)) ? $j->thumbnail_height:180;
$tr = $tw/$th;
$th=120; $tw = $th*$tr;
$tpl=get_markup_template('oembed_video.tpl');
$ret.=replace_macros($tpl, array(
'$embedurl'=>$embedurl,


Loading…
Cancel
Save