Page MenuHomePhabricator

Render TMH in Parsoid's output
Open, HighPublic


@ssastry asks,

do you know why the audio player renders differently in Parsoid vs. legacy? See the infobox on vs .. I don't remember if this is known and not yet fixed or a bug / regression

It looks like TMH's assets aren't loaded because of Parsoid's native implementation,

diff --git a/src/Wt2Html/PP/Processors/AddMediaInfo.php b/src/Wt2Html/PP/Processors/AddMediaInfo.php
index e2135c3a3..36438ef96 100644
--- a/src/Wt2Html/PP/Processors/AddMediaInfo.php
+++ b/src/Wt2Html/PP/Processors/AddMediaInfo.php
@@ -794,6 +794,11 @@ class AddMediaInfo implements Wt2HtmlDOMProcessor {
+                       if ( !$isImage ) {
+                               $env->getMetadata()->addModuleStyles( [ 'ext.tmh.player.styles' ] );
+                               $env->getMetadata()->addModules( [ 'ext.tmh.player' ] );
+                       }
                        $alt = null;
                        $keepAltInDataMw = !$isImage || $errs;
                        $attr = WTSUtils::getAttrFromDataMw( $dataMw, 'alt', $keepAltInDataMw );

Parsoid's player is just the browser's native rendering.

A somewhat related note is T313875

Event Timeline

Arlolra triaged this task as Medium priority.Tue, Sep 19, 12:14 AM
Arlolra moved this task from Backlog to In Progress on the Content-Transform-Team-WIP board.
Arlolra moved this task from Needs Triage to Missing Functionality on the Parsoid board.
MSantos raised the priority of this task from Medium to High.Tue, Sep 19, 3:45 PM

Change 959029 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Add TMH modules

Change 959029 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Add missing TMH modules