diff --git a/third_party/antenna/pi.antenna.php b/third_party/antenna/pi.antenna.php index e8d595c..4778520 100755 --- a/third_party/antenna/pi.antenna.php +++ b/third_party/antenna/pi.antenna.php @@ -71,8 +71,9 @@ public function Antenna() $wmode_param = (ee()->TMPL->fetch_param('wmode')) ? "&wmode=" . ee()->TMPL->fetch_param('wmode') : ""; // Correct for a bug in YouTube response if only maxheight is set and the video is over 612px wide - if (empty($max_height)) $max_height = "&maxheight=" . ee()->TMPL->fetch_param('max_width'); - + if (((strpos($video_url, "youtube.com/") !== FALSE OR strpos($video_url, "youtu.be/") !== FALSE)) AND (empty($max_height))) { + $max_height = "&maxheight=" . ee()->TMPL->fetch_param('max_width'); + } // Cache can be disabled by setting 0 as the cache_minutes param if (ee()->TMPL->fetch_param('cache_minutes') !== FALSE && is_numeric(ee()->TMPL->fetch_param('cache_minutes'))) { $this->refresh_cache = ee()->TMPL->fetch_param('cache_minutes');