viewer icon indicating copy to clipboard operation
viewer copied to clipboard

Vertical video aspect ratio wrong in public view

Open philippjeschek opened this issue 2 years ago • 9 comments

Steps to reproduce

  1. Upload video with 9:16 aspect ratio
  2. Share video, hide download and copy public link
  3. Open shared link in new tab

Expected behavior

Video should be displayed in correct aspect ratio.

Actual behavior

Video gets displayed very large/zoomed in and you have to scroll to view the full video

Host OS

Ubuntu 22.04.2 LTS

Nextcloud AIO version

27.0.1

Current channel

Stable

Other valuable info

Only happend after upgrading from 27.0.0 to 27.0.1. In 27.0.0 everything works as expected.

Example file: https://cloud.philippjeschek.com/s/XgYj95qRCntm59d

philippjeschek avatar Jul 26 '23 12:07 philippjeschek

I confirm this. Same situation even with videos with landscape ratio video files shared by public link. Control buttons and part of the videos are not visible without scrolling down. Nextcloud 27.0.1, checked with Chrome and Firefox 115.

nicrame avatar Jul 28 '23 21:07 nicrame

Also confirmed. Still happening in Nextcloud 28.0.1, also with videos in landscape ratio and shared by public link.

creopard avatar Jan 25 '24 21:01 creopard

Same here on 28...

Lawkss avatar May 06 '24 18:05 Lawkss

Also on NC 29.

Lawkss avatar Jul 03 '24 21:07 Lawkss

In 27.1.11:

If I do:

.view__file {
  margin: 0 auto; 
}

#imgViewer .view__file {
  height: 100%;
  width 45vh;
}

It seems to remedy the issue. Obviously I need to do some more testing but if it looks ok and the NC devs haven't already fixed it I'll create a pull request.

sptcguy avatar Jul 06 '24 23:07 sptcguy

I think I tracked it down to the Videos.vue file. It has the max-height attribute set to 100%. If I remove that, the video displays correctly across desktop and mobile.

sptcguy avatar Jul 08 '24 04:07 sptcguy

Could someone open a PR with a fix? :)

artonge avatar Jul 08 '24 09:07 artonge

Could someone open a PR with a fix? :)

Done: https://github.com/nextcloud/viewer/pull/2349

sptcguy avatar Jul 08 '24 12:07 sptcguy

For those who don't want to wait the PR to be merged, you can fix the bug with the Custom CSS application and by putting this CSS:

#preview video {
  max-height: calc(100vh - var(--header-height) - 65px - 200px - 16px) !important;
}

reggermont avatar Aug 31 '24 18:08 reggermont