diff --git a/frontend/src/components/player/VideoPlayerConfig.vue b/frontend/src/components/player/VideoPlayerConfig.vue index fc9c0e1..8ca9b2f 100644 --- a/frontend/src/components/player/VideoPlayerConfig.vue +++ b/frontend/src/components/player/VideoPlayerConfig.vue @@ -241,7 +241,9 @@ {{ $t("Scale") }} - + + {{ $t("Custom") }} + @@ -250,6 +252,51 @@ + + + + {{ $t("Custom") }}: {{ renderScale(scale) }} + + + + + + + + + + + + + + + + + +
+ + {{ $t("Scale") }} ({{ $t("Custom") }}) +
+ +
+ + % +
@@ -559,6 +606,7 @@ export default defineComponent({ resolutions: [], speedNum: Math.floor(this.speed * 100), + scaleNum: Math.floor(this.scale * 100), subtitles: "", subtitlesSizes: ["s", "m", "l", "xl", "xxl"], @@ -703,6 +751,16 @@ export default defineComponent({ this.focus(); }, + goToCustomScale: function (e?: Event) { + if (e) { + e.preventDefault(); + e.stopPropagation(); + } + + this.page = "scale-custom"; + this.focus(); + }, + renderSpeed: function (speed: number) { if (speed > 1) { return Math.floor(speed * 100) + "%"; @@ -921,6 +979,14 @@ export default defineComponent({ this.speedState = this.speedNum / 100; }, + updateScaleNum: function () { + if (typeof this.scaleNum !== "number" || isNaN(this.scaleNum) || this.scaleNum < 0.1) { + return; + } + + this.scaleState = this.scaleNum / 100; + }, + clickOnEnter: function (event: KeyboardEvent) { if (event.key === "Enter") { event.preventDefault(); @@ -973,6 +1039,9 @@ export default defineComponent({ speed: function () { this.speedNum = Math.floor(this.speed * 100); }, + scale: function () { + this.scaleNum = Math.floor(this.scale * 100); + }, rTick: function () { this.updateResolutions(); this.updateEffectiveSubtitles();