From 23d3de9084afe65694670d64cdbef23bc5111cee Mon Sep 17 00:00:00 2001 From: Austin Mroz Date: Sun, 29 Dec 2024 15:37:19 -0600 Subject: [PATCH] Enable AdvancedPreviews by default As the issue of properly streaming previews has been resolved and the feature has had ample testing, I'm swapping it it to be enabled by default. This makes sure a user who is installing VHS for the first time gets the best possible experience without the need to manually tweak settings --- web/js/VHS.core.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/js/VHS.core.js b/web/js/VHS.core.js index 80e9a11..630153f 100755 --- a/web/js/VHS.core.js +++ b/web/js/VHS.core.js @@ -837,7 +837,7 @@ function addVideoPreview(nodeType) { } Object.assign(previewWidget.value.params, params) if (!force_update && - !app.ui.settings.getSettingValue("VHS.AdvancedPreviews", false)) { + !app.ui.settings.getSettingValue("VHS.AdvancedPreviews", true)) { return; } if (timeout) { @@ -858,7 +858,7 @@ function addVideoPreview(nodeType) { params.timestamp = Date.now() this.parentEl.hidden = this.value.hidden; if (params.format?.split('/')[0] == 'video' || - app.ui.settings.getSettingValue("VHS.AdvancedPreviews", false) && + app.ui.settings.getSettingValue("VHS.AdvancedPreviews", true) && (params.format?.split('/')[1] == 'gif') || params.format == 'folder') { this.videoEl.autoplay = !this.value.paused && !this.value.hidden; let target_width = 256 @@ -873,7 +873,7 @@ function addVideoPreview(nodeType) { let ar = parseInt(size[0])/parseInt(size[1]) params.force_size = target_width+"x"+(target_width/ar) } - if (app.ui.settings.getSettingValue("VHS.AdvancedPreviews", false)) { + if (app.ui.settings.getSettingValue("VHS.AdvancedPreviews", true)) { this.videoEl.src = api.apiURL('/vhs/viewvideo?' + new URLSearchParams(params)); } else { previewWidget.videoEl.src = api.apiURL('/view?' + new URLSearchParams(params)); @@ -1339,7 +1339,7 @@ app.ui.settings.addSetting({ id: "VHS.AdvancedPreviews", name: "🎥🅥🅗🅢 Advanced Previews", type: "boolean", - defaultValue: false, + defaultValue: true, }); app.ui.settings.addSetting({ id: "VHS.DefaultMute",