From cc1826f936e224b016cd4de441547a6c9564e1e0 Mon Sep 17 00:00:00 2001 From: theo Date: Mon, 24 Jul 2023 18:44:10 +0530 Subject: [PATCH] volume.svelte: add mute --- src/lib/components/Player.svelte | 2 +- src/lib/components/Volume.svelte | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Player.svelte b/src/lib/components/Player.svelte index db31253..fcd5592 100644 --- a/src/lib/components/Player.svelte +++ b/src/lib/components/Player.svelte @@ -100,7 +100,7 @@ background: linear-gradient(to top, #0c2fad, #0575E6); padding: 0.3rem; cursor: pointer; - gap: 0.3rem; + gap: 0.5rem; margin-bottom: 0.5rem; border-radius: 0.3rem; } diff --git a/src/lib/components/Volume.svelte b/src/lib/components/Volume.svelte index 1dc5513..2165488 100644 --- a/src/lib/components/Volume.svelte +++ b/src/lib/components/Volume.svelte @@ -8,9 +8,13 @@ // volume = Math.max(0, Math.min(1, volume)); $audioElement.volume = volume; } + + function mutetoggle() { + $audioElement.muted = !$audioElement.muted + }
- +