Page MenuHomePhabricator

Formalize how TMH provides a player for Score-generated ogg/vorbis files
Open, LowPublic

Description

Score directly calls the TimedMediaTransformOutput thumbnail generator in order to provide a player for the ogg/vorbis files generated by Score by lilypond.

This isn't really obviously and it's not entirely cleanly setup. We should definitely improved the structure for this kind of usage.

Event Timeline

This might also be something to keep an eye on for Wikispeech people

Change 289318 had a related patch set uploaded (by TheDJ):
Allow transform callers to add a classname

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

Change 289318 merged by jenkins-bot:
Allow transform callers to add a classname

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

  1. One option is to fix T60478: Improve interface for MediaHandlers to add JavaScript.
  2. Another would be to have a TimedMediaHandler::getPlayerModules()
  3. And lastly, we could have ext.score modules, that depend directly on TMH modules...

The best option would be to have something like TimedMediaHandler::getPlayerModules() in my view.

Ebe123 renamed this task from Formalize how TMH provides a player for Score generated ogg/vorbis files to Formalize how TMH provides a player for Score-generated ogg/vorbis files.Jul 4 2019, 3:43 PM

This bug's description is obsoleted by cf8a4f2133cb in 2020; Score now directly creates an <audio> tag for its generated mp3 that "just works." I think only if there's other media on the page does TMH JavaScript in ext.tmh.player.js still wrap the Score's audio tag with mw-tmh-player machinery, which is no longer desired behavior for Score audio and triggers bug T363630. As @tstarling comments there

TMH should set its own class attributes on the server side and avoid mangling unrelated content.

I think the added value of TMH's player for audio files is its support for closed captions in the TimedText namespace, but these aren't possible for the generated .mp3 file for Scores with audio.

Yes, this is known. Part of the problem here is that the Parsoid spec doesn't distinguish between multiple providers of audio and video elements.

So when TMH implemented the parsoid spec, it dropped its unique identifier that marked it as specific handler of that specific content. That will have to be addressed at some point.