cosmetic stuff

This commit is contained in:
Tamius Han 2021-10-31 23:18:44 +01:00
parent 7f7ab7b752
commit 78da45d468
3 changed files with 26 additions and 40 deletions

View File

@ -50,6 +50,7 @@
"tablist",
"tamius",
"textbox",
"ultrawide",
"ultrawidify",
"unmark",
"unmarking",

View File

@ -257,12 +257,6 @@ class Resizer {
this.lastAr = {type: ar.type, ratio: ar.ratio};
}
// if (this.extensionMode === ExtensionMode.Basic && !PlayerData.isFullScreen() && ar.type !== AspectRatioType.Reset) {
// // don't actually apply or calculate css when using basic mode if not in fullscreen
// // ... unless we're resetting the aspect ratio to original
// return;
// }
if (! this.video) {
this.conf.destroy();
}
@ -336,7 +330,6 @@ class Resizer {
this.applyCss(stretchFactors, translate);
}
toFixedAr() {
// converting to fixed AR means we also turn off autoAR
this.setAr({

View File

@ -31,7 +31,6 @@ export type VideoDimensions = {
actualHeight?: number;
}
// računa velikost videa za približevanje/oddaljevanje
// does video size calculations for zooming/cropping
@ -48,9 +47,7 @@ class Scaler {
}
// Skrbi za "stare" možnosti, kot na primer "na širino zaslona", "na višino zaslona" in "ponastavi".
// Približevanje opuščeno.
// handles "legacy" options, such as 'fit to widht', 'fit to height' and AspectRatioType.Reset. No zoom tho
// handles "legacy" options, such as 'fit to width', 'fit to height' and AspectRatioType.Reset. No zoom tho
modeToAr (ar) {
if (ar.type !== AspectRatioType.FitWidth && ar.type !== AspectRatioType.FitHeight && ar.ratio) {
return ar.ratio;
@ -71,9 +68,6 @@ class Scaler {
ratioOut = this.conf.player.dimensions.width / this.conf.player.dimensions.height;
}
// POMEMBNO: lastAr je potrebno nastaviti šele po tem, ko kličemo _res_setAr(). _res_setAr() predvideva,
// da želimo nastaviti statično (type: 'static') razmerje stranic — tudi, če funkcijo kličemo tu oz. v ArDetect.
//
// IMPORTANT NOTE: lastAr needs to be set after _res_setAr() is called, as _res_setAr() assumes we're
// setting a static aspect ratio (even if the function is called from here or ArDetect).
@ -106,7 +100,7 @@ class Scaler {
* is narrower than video ar, we need to pre-downscale the video. This scaling already
* undoes any zoom that style="height:123%" on the video element adds.
*
* There are few exceptions and additional caveatss:
* There are few exceptions and additional caveats:
* * AspectRatioType.FitHeight: we don't want to pre-downscale the video at all, as things
* will be scaled to fit height as-is.
* * When player is wider than stream, we want to undo any height compensations site
@ -164,10 +158,8 @@ class Scaler {
return {error: "this.conf.player.dimensions_error"};
}
// zdaj lahko končno začnemo računati novo velikost videa
// we can finally start computing required video dimensions now:
// Dejansko razmerje stranic datoteke/<video> značke
// Actual aspect ratio of the file/<video> tag
if (ar.type === AspectRatioType.Initial || !ar.ratio) {