From 083695564901272ef38621acdd190c25fdf0b478 Mon Sep 17 00:00:00 2001 From: huysynf Date: Mon, 22 Jul 2024 09:57:38 +0700 Subject: [PATCH] fix show with height when embed video in client --- classes/Tools/Video/Player/VideoPlayerShortcode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Tools/Video/Player/VideoPlayerShortcode.php b/classes/Tools/Video/Player/VideoPlayerShortcode.php index b8eab634..cc98ed77 100644 --- a/classes/Tools/Video/Player/VideoPlayerShortcode.php +++ b/classes/Tools/Video/Player/VideoPlayerShortcode.php @@ -95,7 +95,7 @@ public function renderShortCode( $attrs ) $width = intval( arrayPath( $meta, 'width', (int) 0 ) ); $height = intval( arrayPath( $meta, 'height', (int) 0 ) ); if ( !empty($width) && !empty($height) ) { - $extras .= " width={$asset->width} height={$asset->height}"; + $extras .= " width={$width} height={$height}"; } } else { $extras .= " width={$asset->width} height={$asset->height}"; @@ -134,4 +134,4 @@ public function renderShortCode( $attrs ) return $tag; } -} \ No newline at end of file +}