Page MenuHomePhabricator

In Parsoid and MW API, implement handling for file types that do not have thumbnails, such as audio ogg files
Closed, DuplicatePublic

Description

with VE on http://en.wikipedia.org/wiki/Odyssey_Number_Five?veaction=edit media player templates break very badly ( scroll down )


Version: unspecified
Severity: major
URL: http://parsoid.wmflabs.org/en/Odyssey_Number_Five
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=50365

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:43 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz49896.

Created attachment 12595
Screenshot from Firefox 18 for the records

Attached:

49896.png (755×1 px, 132 KB)

Created attachment 12598
Much worse in chrome

Attached:

Screen_Shot_2013-06-20_at_3.02.24_PM.png (1×2 px, 587 KB)

Related URL: https://gerrit.wikimedia.org/r/69822 (Gerrit Change I9db6f0c7ab5162801545507bc08e220c7d107e6b)

In response to a request for a thumbnail of at most 220px width the API returns image dimensions of -1 and 2104px for this particular ogg file. This is bug 49921 in core.

Until this is fixed in core we'll try to work around this in Parsoid by rejecting nonsensical dimensions in API responses and forcing dimensions to a sane fallback.

  • Bug 50448 has been marked as a duplicate of this bug. ***

[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

Created attachment 12790
New Weirdness

better but still broken in a different way.

Attached:

Screen_Shot_2013-07-08_at_11.35.58_AM.png (938×1 px, 223 KB)

The VE interface is currently displaying 'noicon' or 'noplayer' as the caption for

[[Image:En-Birkdale_School.ogg|noicon|200px|center]]

Change 69822 abandoned by Hashar:
(bug 49896) Dirty workaround

Reason:
One year old, I guess this is no more needed / no more apply.

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

The bug as originally described (T51921) is fixed now. The remaining problem is that Parsoid and the API are effectively assuming that File::transform() will return a ThumbnailImage. But the point of the MediaTransformOutput hierarchy was to allow extensible HTML generation logic, not just customisation of URL/width/height. This flexibility was largely for the benefit of audio/video handling.

Parsoid really needs to be given the MediaTransformOutput subclass name, or something equivalent to it, if it is going to correctly reimplement TimedMediaTransformOutput::toHtml() in JavaScript.

What do we want it to look like? Should it have a functional player?

What do we want it to look like? Should it have a functional player?

Inside the editor, eventually, yes. However this also would be a concern for read-mode-based-on-Parsoid-HTML, I assume?

What do we want it to look like? Should it have a functional player?

A functional player in the Parsoid output would be nice in the long run, but for VE purposes we don't care about that just yet. I'd just like it to be as close to the wikitext output as possible, without necessarily being playable.

When I spoke to @Anomie about the audio/video metadata Parsoid needs, he said it would probably be best to provide it as part of the planned imageinfo rewrite: T89971. So, added blocker.

ssastry lowered the priority of this task from High to Medium.May 29 2015, 9:39 PM
ssastry moved this task from In Progress to Needs Triage on the Parsoid board.
ssastry set Security to None.
tstarling renamed this task from Images: Work around broken thumbnail image dimensions in API response for audio ogg file to In Parsoid and MW API, implement handling for file types that do not have thumbnails, such as audio ogg files.Sep 10 2015, 6:35 AM

Updated title since the API is not broken, it is just missing.

Change 550548 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/extensions/ParsoidBatchAPI@master] Add optional parameter to getAPIData() call

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

Change 550548 merged by jenkins-bot:
[mediawiki/extensions/ParsoidBatchAPI@master] Add optional parameter to getAPIData() call

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