Page MenuHomePhabricator

MinimumVideoPlayerSize config setting doesn't do anything when using videojs player
Open, Needs TriagePublicBUG REPORT

Assigned To
None
Authored By
HebronNor
Dec 19 2019, 8:01 AM
Referenced Files
F31481530: image.png
Dec 19 2019, 8:01 AM
F31481535: image.png
Dec 19 2019, 8:01 AM
F31481532: image.png
Dec 19 2019, 8:01 AM
F31481540: image.png
Dec 19 2019, 8:01 AM
F31481537: image.png
Dec 19 2019, 8:01 AM

Description

When using the videojs player with TimedMediaHandler; the MinimumVideoPlayerSize configuration setting doesn't do anything.

Configuration;

$wgTmhWebPlayer = 'videojs';     # commented out this to test Kaltura player
$wgMinimumVideoPlayerSize = 200; # default value

image.png (202×348 px, 37 KB)

Test video is 120 wide, and should open in popup. Tested in both Firefox and Chrome, with the same behavior.

With Kaltura:

image.png (267×697 px, 87 KB)

image.png (585×973 px, 726 KB)

With VideoJS:

image.png (267×653 px, 85 KB)

image.png (273×663 px, 92 KB)

Versions:
MediaWiki 1.33.1
PHP 7.2.24-0ubuntu0.18.04.1 (fpm-fcgi)
TimedMediaHandler 0.6.0

Event Timeline

$wgMinimumVideoPlayerSize is a pretty difficult hammer to use for fine editorial control, and is not supported by the new videojs mode. The general intention is to add an explicit keyword for an 'inline' player mode which would always display in-place, rather than making it dependent on player size, though that's a separate bit of work and not yet done.

I'll update the documentation so it's clear it's an obsolete setting.

Change 588449 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/TimedMediaHandler@master] Clarify MinimumVideoPlayerSize setting is mwembed-specific

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

Change 588449 merged by jenkins-bot:
[mediawiki/extensions/TimedMediaHandler@master] Clarify MinimumVideoPlayerSize setting is mwembed-specific

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

@brion I've been thinking a bit about this, and been pondering about inline vs the standards playsinline attribute.. Do you think it makes more sense to go with inline and then use the playsinline attribute internally, or should they be two different things etc.. Bit hard to figure out what the best approach is here to avoid confusing, both as a wikitext user (inline might be more natural to them) and to developers (who might expect playsinline)

Current proposal:

  1. Videos can be marked with playsinline. This means that an attempt will be made to display the video inline instead of a dialog
  2. When playsinline is used AND video width > MinimumInlineSize config variable (default standard thumbnail width?), then add the inline class to the html5 element and set the playsinline attribute
  3. When the inline class is used, there is no dialog that pops up to present the video but we will load the video inline.
  4. I'd be nice to have videos be inline by default on their own File page ? Not sure if we can support this with the current thumb nailing logic. (Yes, those transforms have: $params['isFilePageThumb'] = true;)

Points of attention

  1. If playinsinline is 'conditional' and independent of the value set by the author, this requires special consideration in Parsoid. Class vs attribute meaning ?
  2. There is no playsinline for native audio elements

Change 794592 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/TimedMediaHandler@master] Add inlineplayer media param

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

Test wiki on Patch demo by TheDJ using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/9fa99b863d/w/