Page MenuHomePhabricator

Video thumbnail extends beyond mobile screen width on File pages
Closed, ResolvedPublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

  • notice the video thumbnail extends way off the screen instead of being scaled to fit.
  • in particular, notice the the Play button is off-screen, seriously affecting usability.

I suspect the WLM banner is somehow at fault.

See screenshots:

Screenshot_20210922_232404_com.android.chrome.jpg (2×1 px, 720 KB)

Screenshot_20210922_232413_com.android.chrome.jpg (2×1 px, 702 KB)

Screenshot_20210922_232351_com.android.chrome.jpg (2×1 px, 707 KB)

Event Timeline

TheDJ renamed this task from Video thumbnail extends beyond mobile screen width to Video thumbnail extends beyond mobile screen width on File pages.Sep 23 2021, 11:10 AM

Images are made responsive on mobile using:

.content a > img, .content noscript > img {
max-width: 100% !important;
height: auto !important;
}

That doesn't work for

<div class="mediaContainer" style="width:800px">
<video id="mwe_player_0" poster="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a1/%D0%A7%D0%B5%D1%80%D0%BD%D1%96%D0%B2%D0%B5%D1%86%D1%8C%D0%BA%D0%B8%D0%B9_%D0%BD%D0%B5%D0%BA%D1%80%D0%BE%D0%BF%D0%BE%D0%BB%D1%8C._%D0%9D%D0%B0%D0%B9%D0%B1%D1%96%D0%BB%D1%8C%D1%88%D0%B8%D0%B9_%D1%83_%D0%84%D0%B2%D1%80%D0%BE%D0%BF%D1%96_%D1%94%D0%B2%D1%80%D0%B5%D0%B9%D1%81%D1%8C%D0%BA%D0%B8%D0%B9_%D1%86%D0%B2%D0%B8%D0%BD%D1%82%D0%B0%D1%80.webm/800px--%D0%A7%D0%B5%D1%80%D0%BD%D1%96%D0%B2%D0%B5%D1%86%D1%8C%D0%BA%D0%B8%D0%B9_%D0%BD%D0%B5%D0%BA%D1%80%D0%BE%D0%BF%D0%BE%D0%BB%D1%8C._%D0%9D%D0%B0%D0%B9%D0%B1%D1%96%D0%BB%D1%8C%D1%88%D0%B8%D0%B9_%D1%83_%D0%84%D0%B2%D1%80%D0%BE%D0%BF%D1%96_%D1%94%D0%B2%D1%80%D0%B5%D0%B9%D1%81%D1%8C%D0%BA%D0%B8%D0%B9_%D1%86%D0%B2%D0%B8%D0%BD%D1%82%D0%B0%D1%80.webm.jpg" controls="" preload="none" style="width:800px;height: auto !important;max-width: 100% !important;display: block;" class="kskin" data-durationhint="255.16">
[..]
</video></div>

This has always been the case on File pages.
Not sure why you are seeing it on an image, might be that that specific banner ALSO doesn't deal well with restricted widths (or the file information tables), but that's secondary then.

This is resolved when using the video.js output mode, so if this doesn't get fixed on mwembed mode earlier we'll be able to move it off the table after that rolls out.

brooke moved this task from To sort to Backlog/maint on the TimedMediaHandler board.

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

[mediawiki/extensions/TimedMediaHandler@master] Fix mwembed overflow on mobile

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

Change 753570 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Fix mwembed overflow on mobile

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

TheDJ claimed this task.

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

[mediawiki/extensions/TimedMediaHandler@master] Do not set height:auto on audio elements

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

Change 756125 merged by jenkins-bot:

[mediawiki/extensions/TimedMediaHandler@master] Do not set height:auto on audio elements

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