From fea9c266fe41ed86dfa511d7e1cbfed9867e05e1 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Fri, 15 Dec 2023 21:30:07 +0000 Subject: [PATCH] Actually use the configured limit. --- src/components/VideoPlayer.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index 77d1d641..eabe9988 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -474,6 +474,8 @@ export default { const disableVideo = this.getPreferenceBoolean("listen", false) && !this.video.livestream; + const prefetchLimit = Math.min(Math.max(this.getPreferenceNumber("prefetchLimit", 2), 0), 10); + this.$player.configure({ preferredVideoCodecs: this.preferredVideoCodecs, preferredAudioCodecs: ["opus", "mp4a"], @@ -481,7 +483,7 @@ export default { disableVideo: disableVideo, }, streaming: { - segmentPrefetchLimit: 10, + segmentPrefetchLimit: prefetchLimit, retryParameters: { maxAttempts: Infinity, baseDelay: 250,