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

Details

Reference
bz49896

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:

Created attachment 12598
Much worse in chrome

Attached:

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:

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

ssastry moved this task from Backlog to In Progress on the Parsoid board.Apr 2 2015, 5:29 PM

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 Normal.May 29 2015, 9:39 PM
ssastry moved this task from In Progress to Backlog on the Parsoid board.
ssastry set Security to None.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 24 2015, 5:37 AM
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.