cosmetic stuff
This commit is contained in:
parent
7f7ab7b752
commit
78da45d468
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -50,6 +50,7 @@
|
|||||||
"tablist",
|
"tablist",
|
||||||
"tamius",
|
"tamius",
|
||||||
"textbox",
|
"textbox",
|
||||||
|
"ultrawide",
|
||||||
"ultrawidify",
|
"ultrawidify",
|
||||||
"unmark",
|
"unmark",
|
||||||
"unmarking",
|
"unmarking",
|
||||||
|
@ -257,12 +257,6 @@ class Resizer {
|
|||||||
this.lastAr = {type: ar.type, ratio: ar.ratio};
|
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) {
|
if (! this.video) {
|
||||||
this.conf.destroy();
|
this.conf.destroy();
|
||||||
}
|
}
|
||||||
@ -336,7 +330,6 @@ class Resizer {
|
|||||||
this.applyCss(stretchFactors, translate);
|
this.applyCss(stretchFactors, translate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
toFixedAr() {
|
toFixedAr() {
|
||||||
// converting to fixed AR means we also turn off autoAR
|
// converting to fixed AR means we also turn off autoAR
|
||||||
this.setAr({
|
this.setAr({
|
||||||
|
@ -31,7 +31,6 @@ export type VideoDimensions = {
|
|||||||
actualHeight?: number;
|
actualHeight?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// računa velikost videa za približevanje/oddaljevanje
|
|
||||||
// does video size calculations for zooming/cropping
|
// 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".
|
// handles "legacy" options, such as 'fit to width', 'fit to height' and AspectRatioType.Reset. No zoom tho
|
||||||
// Približevanje opuščeno.
|
|
||||||
// handles "legacy" options, such as 'fit to widht', 'fit to height' and AspectRatioType.Reset. No zoom tho
|
|
||||||
modeToAr (ar) {
|
modeToAr (ar) {
|
||||||
if (ar.type !== AspectRatioType.FitWidth && ar.type !== AspectRatioType.FitHeight && ar.ratio) {
|
if (ar.type !== AspectRatioType.FitWidth && ar.type !== AspectRatioType.FitHeight && ar.ratio) {
|
||||||
return ar.ratio;
|
return ar.ratio;
|
||||||
@ -71,9 +68,6 @@ class Scaler {
|
|||||||
ratioOut = this.conf.player.dimensions.width / this.conf.player.dimensions.height;
|
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
|
// 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).
|
// 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
|
* 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.
|
* 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
|
* * AspectRatioType.FitHeight: we don't want to pre-downscale the video at all, as things
|
||||||
* will be scaled to fit height as-is.
|
* will be scaled to fit height as-is.
|
||||||
* * When player is wider than stream, we want to undo any height compensations site
|
* * 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"};
|
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:
|
// we can finally start computing required video dimensions now:
|
||||||
|
|
||||||
// Dejansko razmerje stranic datoteke/<video> značke
|
|
||||||
// Actual aspect ratio of the file/<video> tag
|
// Actual aspect ratio of the file/<video> tag
|
||||||
|
|
||||||
if (ar.type === AspectRatioType.Initial || !ar.ratio) {
|
if (ar.type === AspectRatioType.Initial || !ar.ratio) {
|
||||||
|
Loading…
Reference in New Issue
Block a user