Open muescha opened 3 months ago
I can't reproduce this bug.
in theory, the mini version is formed from two pairs of variables
const miniSize = NOVA.aspectRatio.sizeToFit({
// 'src_width': movie_player.clientWidth,
// 'src_height': movie_player.clientHeight,
'src_width': NOVA.videoElement.videoWidth,
'src_height': NOVA.videoElement.videoHeight,
'max_width': (window.innerWidth / user_settings.player_float_scroll_size_ratio),
'max_height': (window.innerHeight / user_settings.player_float_scroll_size_ratio),
});
try uncommenting this line and checking. Invalid data may be transmitted https://github.com/raingart/Nova-YouTube-extension/blob/43e60f84878035f2bbe4b2dc5247fb33ba38394e/plugins/common.js#L860
how is it happening for me: https://github.com/user-attachments/assets/7bec1b79-404e-43ac-8315-8ed0783790b6
thx for the video: in my case I had the value set to: 1.2
(in your video is 2.5
) maybe there is a "treshhold" where it is not "crashing the things"
I will dig into it a little with debugging
this are the debug values:
{
src_width: 1080,
src_height: 1920,
max_width: 800,
max_height: 802.5
}
aspectRatio: 0.41796875
did you need more values?
Yes, this turns out not to be a bug, but a strange solution.
It was necessary to indicate that the value should be in more understandable values, for example, percentages.
if you hover over it option, the tooltip shows:
title: 'Less value - larger size',
- which is completely unintuitive.
I think I'll just limit the value to min=2
It remains as a legacy. This is how I originally implemented it. Because I didn’t guess what to use as a reference value. That is, a percentage of what? And then many users may have configured their values. They need to be somehow convected and new ones. And the solution in other scripts is to select from a list of static values. I'll leave it as it is
but restricting it to min 2 is also not good - because I like the floating a little bit more big.
more intuitive would be a % value. Like the size should be 80%
of the original width. or 20%
of the original width/height.
This may not be a solution for you depending on your usage, but if you also select "Player force resize 16:9", any shorts played will retain the same height/width as all other videos in the mini player.
Setup:
shorts-redirect
)player-pin-scroll
)What I see:
What I expect:
Possible solution:
1.2
then the unshorted should have something between2.1
and2.2
- so I guess it is factor 1.2 x 1.8 = 2.16 (I manually can only set2.1
or2.2
in the settings dialogDebug Info:
analysed floating
video
div in developer toolsPlayer Size:
1.2
Normal Video:
Unshorted Video:
1.2
:2.1
:2.2
:Example URL
Setup:
Screenshots
floating player is too big
without scrolling (no floating player is activated)