jenkins-bot has submitted this change and it was merged.

Change subject: Fix regression that embedded video player didn't work
......................................................................


Fix regression that embedded video player didn't work

A small update to the markup didn't match the JS, causing
the player to be hidden in the embedded mode sometimes.
Go back to using an explicit id wrapper.

Also, now not loading the mwembed specific JS in videojs mode.

Bug: T146124
Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a
(cherry picked from commit 4518ad18ac8837cba98be0158ca9f84987a30b18)
---
M TimedMediaIframeOutput.php
M resources/embedPlayerIframe.css
2 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Thcipriani: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php
index 1db1326..e3ba8e1 100644
--- a/TimedMediaIframeOutput.php
+++ b/TimedMediaIframeOutput.php
@@ -70,11 +70,11 @@
 
                if ( $wgTmhWebPlayer == 'mwembed' ) {
                        $wgOut->addModules( [ 'mw.MediaWikiPlayer.loader', 
'ext.tmh.embedPlayerIframe' ] );
+                       $wgOut->addModuleStyles( 'embedPlayerIframeStyle' );
                } elseif ( $wgTmhWebPlayer === 'videojs' ) {
                        $wgOut->addModules( 'ext.tmh.player' );
                        $wgOut->addModuleStyles( 'ext.tmh.player.styles' );
                }
-               $wgOut->addModuleStyles( 'embedPlayerIframeStyle' );
                $wgOut->sendCacheControl();
                $rlClient = $wgOut->getRlClient();
 
@@ -97,7 +97,9 @@
        ?>
 <body>
                <img src="<?php echo $videoTransform->getUrl(); ?>" 
id="bgimage" ></img>
-               <?php echo $videoTransform->toHtml(); ?>
+               <div id="videoContainer">
+                       <?php echo $videoTransform->toHtml(); ?>
+               </div>
        <?php echo $wgOut->getBottomScripts(); ?>
 </body>
 </html>
diff --git a/resources/embedPlayerIframe.css b/resources/embedPlayerIframe.css
index 3fb3f32..4027208 100644
--- a/resources/embedPlayerIframe.css
+++ b/resources/embedPlayerIframe.css
@@ -18,9 +18,9 @@
        width:100%;
        height:100%;
 }
-.mediaContainer {
+#videoContainer {
        visibility: hidden;
 }
-.mediaContainer .videoHolder {
+#videoContainer .videoHolder {
        position: static;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: wmf/1.28.0-wmf.20
Gerrit-Owner: Paladox <thomasmulhall...@yahoo.com>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Hashar <has...@free.fr>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Jforrester <jforres...@wikimedia.org>
Gerrit-Reviewer: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org>
Gerrit-Reviewer: TheDJ <hartman.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to