question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add minimum video width

See original GitHub issue

Problem: Some webms are very narrow (for example if filmed vertically). So the width is for example only 200px. This means, that the time slider is too small to be useful. This problem gets worse, the higher page zoom you use.

Solution: Add an option to have a minimum video width. But do not scale height accordingly.

Code example: Here is my proposal: After line 12855 I added:

var minVideoSize = 700;
if (data.isVideo && (minVideoSize > width)) {
    this._oldL = (Post.sizing.wWidth - minVideoSize) / 2 - 1;  // calculates the left coordinate so that the div will be centered
    this._width = minVideoSize; // without this zooming will not work well
    width = minVideoSize; // setting width will set the child element's (<video>) width too, because it inherits the width
}

minVideoSize should be gotten from somewhere in the config obviously.

Thank you.

By the way, the similar problem appears with audio files (especially when using a higher page zoom) - the time slider gets very narrow.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SthephanShinkufagcommented, Jan 13, 2017

@ganego, hmmm, really. This bug is already fixed in Nightly. M’kay, I suppose Firefox devs will apply changes in next stable version. Check the commit.

0reactions
ganegocommented, Jan 13, 2017

I only use FF (nightly 53 at the moment) and I have the code I posted, in my script. Works like expected - the control bar is full width like it would be in your chrome screenshot. I tested it with a completely new profile and tampermonkey and greasmonkey - works. If you can be bothered you could try if FF52/53 changed something? You can get the nightly (v53) from here: https://www.mozilla.org/en-US/firefox/nightly/all/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Always Up-to-Date Guide to Social Media Video Specs
Recommended video dimensions 1280 x 720 for Landscape and Portrait. Minimum width is 1200 pixels (length depends on aspect ratio) for ...
Read more >
Optimal Video Dimensions - Video Cloud Studio Documentation
Recommended width and height for videos with 4:3 aspect ratios ; 384 x 288, 352 x 264, 496 x 372 ; 320 x...
Read more >
HTML video width Attribute - W3Schools
The width attribute specifies the width of a video player, in pixels. Tip: Always specify both the height and width attributes for videos....
Read more >
All the Facebook Ad Sizes You Need to Know in 2022
This guide to Facebook ad sizes is updated for 2022 and includes all the new specs, dimensions, and file formats for every type...
Read more >
Fluid Width Video | CSS-Tricks
With this technique, you wrap the video in another element which has an intrinsic aspect ratio, then absolute position the video within that....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found