Phuedx has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/165753

Change subject: Don't give audio tags a height style
......................................................................

Don't give audio tags a height style

Without refactoring how the TimedMediaTransformOutput and
TimedMediaHandler classes handle outputting audio files, this is the
simplest change to stop audio tags being styled with a height.

Bug: 71365
Change-Id: I20bc3f6edc5669bcf91d5cf5feff1c4cee05fbf4
---
M TimedMediaTransformOutput.php
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/53/165753/1

diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php
index 01570b0..9750113 100644
--- a/TimedMediaTransformOutput.php
+++ b/TimedMediaTransformOutput.php
@@ -380,7 +380,7 @@
 
                $mediaAttr = array(
                        'id' => self::PLAYER_ID_PREFIX . 
TimedMediaTransformOutput::$serial++,
-                       'style' => "width:{$width};height:{$height}",
+                       'style' => "width:{$width}",
                        // Get the correct size:
                        'poster' => $posterUrl,
 
@@ -391,6 +391,11 @@
                        // tell browser to not load the video before
                        'preload'=>'none',
                );
+
+               if ( $this->isVideo ) {
+                       $mediaAttr['style'] .= "height:{$height}";
+               }
+
                if( $autoPlay === true ){
                        $mediaAttr['autoplay'] = 'true';
                }

-- 
To view, visit https://gerrit.wikimedia.org/r/165753
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I20bc3f6edc5669bcf91d5cf5feff1c4cee05fbf4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to