Video size problem

Created on 20 December 2024, 4 months ago

Almost at the bottom of the page https://prova.gmpe.it/fisica/acustica I have the link “video”.

<a class="glightbox" href="/sites/default/files/fisica/bang.mp4" data-gallery="video" data-width="335px" data-height="260px"><span class="link">video</span></a>

The video is good, but the dimensions are not correct. Did I make a mistake in some setting?

Thanks and best regards

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇮🇹Italy giordy

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @giordy
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia

    Hi giordy, your videos has aspect ration 4/3 and only 320 pixels width. GLightbox has default values for aspect ration 16/9 and at least 720 pixels width. But you can add custom CSS to resize your video (easiest way) or use plyr plugin settings (it will need to write custom module and apply unique settings for specific page).

    <style>
    .path-node-1258 plyr__video-wrapper plyr__video-wrapper--fixed-ratio {
      aspect-ratio: 4 / 3 !important;
    }
    
    .path-node-1258 #gvideo0 {
      max-width: 100% !important;
    }
    </style>
  • 🇷🇸Serbia levmyshkin Novi Sad, Serbia
  • 🇮🇹Italy giordy

    I would have found an alternative solution:
    - I create an html page
    - I call the page with glightbox-inline

    It works with Edge and Chrome, but not with Firefox

  • 🇮🇹Italy giordy

    I found an even simpler solution: I changed the video resolution.

Production build 0.71.5 2024