diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index b2280ce9..12f8e23a 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -484,7 +484,7 @@ export default { seekBarColors: { base: "rgba(255, 255, 255, 0.3)", buffered: "rgba(255, 255, 255, 0.54)", - played: "var(--efy_piped_color1)", + played: "var(--efy_piped_color)", }, }; diff --git a/src/piped.js b/src/piped.js index c7b961aa..205ef284 100644 --- a/src/piped.js +++ b/src/piped.js @@ -48,11 +48,14 @@ $ready('#efy_sidebar', ()=>{ } // Get EFY Color Gradient in Piped - let efy_colors = efy.colors; - efy_colors.forEach((a,i)=>{ - let b = a.split(' '); b.shift(); b[3] = '/ ' + b[3]; - efy_colors[i] = `oklch(${b.join(' ')})`; - }); - $css_prop('--efy_piped_color1', String(efy_colors)); + const efy_piped_color =()=>{ let efy_colors = []; + efy.colors.forEach((a,i)=>{ + a = a.split(' ').slice(1); a[3] = `/ ${a[3]}`; + efy_colors[i] = `oklch(${a.join(' ')})`; + }); + $css_prop('--efy_piped_color', String(efy_colors)); + }; efy_piped_color(); + + $event($('#efy_gradient'), 'change', efy_piped_color); }, 1); \ No newline at end of file