Videos embedded in issues are not scaled correctly

Summary

Videos embedded in issues are not scaled correctly. They may not fit in the issue page and require scrolling if the video is large and in portrait mode.

Steps to reproduce

Embed a large video in portrait mode in an issue description. The video resolution should be approximately the width of the monitor used to reproduce, but its height should be more than that of the monitor.

![video](/uploads/372732e3b8382cc77a5f2ccf5339f468/video.mov)

What is the current bug behavior?

The video may not fit in the page and requires scrolling.

Inspecting the rendered markdown shows the following.

<video src="/group/project/uploads/563b6f53c38a6bebb8d6e74e9162aeaf/video.mov" controls="true" data-setup="{}" data-title="video" width="100%"></video>

Note width="100%".

What is the expected correct behavior?

On GitLab.com the rendered markdown for one issue with an embedded video shows the following.

<video src="/group/project/uploads/563b6f53c38a6bebb8d6e74e9162aeae/Screen_Recording_2019-10-07_at_09.22.07.mp4" width="400" controls="true" data-setup="{}" data-title="Screen_Recording_2019-10-07_at_09.22.07"></video>

Note width="400".

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 16.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.4.2-ee Revision: a3170599aa2 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.7 URL: https://gitlab.myteksi.net HTTP Clone URL: https://gitlab.myteksi.net/some-group/some-project.git SSH Clone URL: git@gitlab.myteksi.net:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 10.2.0 Repository storage paths:

  • default: /media/nfs/git_0/repositories
  • shard_1: /media/nfs/git_1/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Possible fixes

Workaround: Right-click on the video, open in new tab. The video should not require scrolling. I suppose it's browser dependent, but it works for me.

Assignee Loading
Time tracking Loading