Last modified: 2014-11-19 20:45:48 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64270, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62270 - Support video and audio content
Support video and audio content
Status: NEW
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal major
: ---
Assigned To: Parsoid Team
:
Depends on:
Blocks: 54844 61769
  Show dependency treegraph
 
Reported: 2014-03-05 20:29 UTC by Gabriel Wicke
Modified: 2014-11-19 20:45 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gabriel Wicke 2014-03-05 20:29:14 UTC
We currently treat video and audio content like images, which is not ideal for Flow, mobile and offline dumps.

We need to

- get information about something being an audio or video file from the API
- develop a spec that makes sense in HTML5 (likely using video/audio tags instead of img)

To make this directly useful for page views we might also need to integrate with https://www.mediawiki.org/wiki/Extension:TimedMediaHandler, ideally using client-side JS code.
Comment 1 Gabriel Wicke 2014-03-07 18:48:07 UTC
There is a videoinfo API end point that provides a mediatype and a link to the full-size resource, which we can set in a <source> tag inside <video> or <audio>. It also seems to support everything we currently get from imageinfo, so I guess we can just switch to using that.

http://en.wikipedia.org/w/api.php?action=query&prop=videoinfo&titles=File:Wiki.png&format=json&viprop=url|mediatype

There is also prop=transcodestatus, which returns the list of transcodes for a video [1]. This should be used by the client as the list of transcodes changes over time (after upload, when new sizes are added). It currently also only seems to work locally, so the API request for a video on commons needs to go to commons [2]. I guess that could be fixed in the API in the longer term. The current resource attribute is always a relative link, which makes it somewhat hard for a client to discover that they'll need to contact commons. Maybe this can be worked around client-side though by a) sending the API request to both commons and the local wikis, or b) fixing prop=transcodestatus to always work in the local wiki. In a perfect world all our media was on commons anyway so we could just use a single API all the time.

[1]: http://commons.wikimedia.org/w/api.php?action=query&prop=transcodestatus&titles=File:Sparkler_359-fps_Slow-Motion.webm&format=json
[2]: http://en.wikipedia.org/w/api.php?action=query&prop=transcodestatus&titles=File:Sparkler_359-fps_Slow-Motion.webm&format=json
Comment 2 Brion Vibber 2014-03-07 19:34:05 UTC
Note you can get the transcodes from prop=videoinfo on the local wiki using the 'derivatives' key:

http://en.wikipedia.org/w/api.php?action=query&prop=videoinfo&titles=File:Sparkler_359-fps_Slow-Motion.webm&format=json&viprop=url|mediatype|derivatives

http://en.wikipedia.org/w/api.php?action=query&prop=videoinfo&titles=File:Zh-xi%C3%A8xie.ogg&format=json&viprop=url|mediatype|derivatives

Be warned there is an inconsistency which causes some numeric entries to appear as strings in the JSON output (bug 55742 -- I have an old patch for it but nobody's got round to reviewing it, we should probably poke it).
Comment 3 Brion Vibber 2014-03-07 19:38:04 UTC
See also some old notes I made: https://www.mediawiki.org/wiki/User:Brion_VIBBER/Media_rendering_encapsulation
Comment 4 Gabriel Wicke 2014-03-07 19:57:00 UTC
(In reply to Brion Vibber from comment #2)
> Note you can get the transcodes from prop=videoinfo on the local wiki using
> the 'derivatives' key:

Ahh, nice! That solves the resource issue, so we can continue to use relative links in there.
Comment 5 spage 2014-11-07 19:24:34 UTC
Flow would like this to work, embedding video and audio in Flow results in https://www.mediawiki.org/wiki/Topic:S52i2un1zblzd8s8#flow-post-s5fley5jhc8a8pub

<img> links to the raw video and audio files that the browser renders as a broken image, hence raising the severity of this.  In regular pages ogg and webm appear as <audio> or <video> tags within div class="mediaContainer", even with JavaScript disabled.
Comment 6 C. Scott Ananian 2014-11-18 19:48:16 UTC
S -- this wasn't on the current quarter's roadmap.  How high of a priority is it?  We should try to coordinate a schedule between our teams.

Full audio/video support will probably take a bit of effort to nail down.  Is flow interested in starting to work with a rough first draft, with the caveat that our DOM spec could change and break things as we nail down more details of obscure audio/video parameters (there are a lot of them, IIRC)?  Or would you rather wait until we've got a reasonable test suite and decent options coverage and are more confident our DOM spec is on the right track?
Comment 7 Erik Bernhardson 2014-11-19 19:11:39 UTC
currently flow is storing the html content and not migrating it forward(that is an independent bug we need to fix).  Personally due to this i would rather wait for a more stable DOM spec.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links