From 5cf5465d20f21ed76c0ea027b9de07e8db9878eb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 3 Jan 2024 15:23:20 +0100 Subject: [PATCH] Fix player ratio on audio only --- client/src/assets/player/shared/peertube/peertube-plugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts index 3587a3e92..80b767024 100644 --- a/client/src/assets/player/shared/peertube/peertube-plugin.ts +++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts @@ -229,7 +229,7 @@ class PeerTubePlugin extends Plugin { // In portrait screen mode, we allow player with bigger height size than width const portraitMode = getComputedStyle(el).getPropertyValue(this.options.autoPlayerRatio.cssPlayerPortraitModeVariable) === '1' - const currentRatio = !portraitMode && data.ratio < 1 + const currentRatio = isNaN(data.ratio) || (!portraitMode && data.ratio < 1) ? defaultRatio : data.ratio