Page MenuHomePhabricator

Make videos load smoother
Closed, ResolvedPublic

Description

The lack of fixed height for video thumbnails makes them load a little chaotic, since the browser doesn't preserve their height until the thumbnails have loaded & then reshuffles the entire already-rendered contents to fit them in once their sizes are known.
Given how the vast majority of thumbnails exceed 150px (and are then scaled back to that height), I think it would make sense to set a fixed 150px height.
Added benefit: all video titles would be at a consistent position, regardless of the video aspect ratio.

Here are a few images to illustrate what would change:

  1. Notice how the page loads much cleaner, immediately reserving the thumbnails space, instead of continuously pushing around the other elements once thumbs are loaded
  2. Notice, at the end, how the 2nd thumbnail now has the same height (with black bars) as the other videos. This will affect videos wider than a 258:150 (which is close to 16:9) aspect ratio (which is a slim minority of our videos). IMO, this is desirable (it's consistent with black bar treatment for landscape videos, and the titles are now in a consistent place)

Current:

variable-height.gif (844×1 px, 1009 KB)

Proposed:

fixed-height.gif (844×1 px, 344 KB)

Acceptance criteria:

  • Video thumbnails have a fixed height of 150px

Note: this bit of code already had a patch (while working on something else), and has already been merged (even though it has not yet undergone backlog grooming). Because this has minimal (and probably desirable) impact, I will let it go ahead & be deployed.
If backlog grooming comes around and finds that this is undesirable, ping @matthiasmullie & I will remove the relevant code. Otherwise, this can move straight to "Needs QA"

Event Timeline

Change 663187 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Set fixed video thumb height

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

Change 663187 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Set fixed video thumb height

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

Note: this bit of code has already been merged (even though it has not yet undergone backlog grooming). Because this has minimal impact and I suspect the behavior is desirable, I will let it go ahead & be deployed.
If backlog grooming comes around and finds that this is undesirable, ping me & I will remove the relevant code. Otherwise, this can move straight to "Needs QA"

I'm very happy to move this in production - @mwilliams do you agree?

Etonkovidova updated the task description. (Show Details)