Append: Improve Volume Handling
This commit is contained in:
parent
a99e12c6e6
commit
652e8afc37
1 changed files with 5 additions and 7 deletions
|
@ -6,11 +6,12 @@
|
|||
import QueueFrame from "$lib/components/custom/QueueFrame.svelte";
|
||||
//import PlayerFrame from "$lib/components/custom/PlayerFrame.svelte";
|
||||
import {Button} from "$lib/components/ui/button";
|
||||
import {browser} from "$app/environment";
|
||||
|
||||
//let audioSource: HTMLAudioElement = $state(new Audio());
|
||||
//let paused: boolean = $derived(audioSource.paused);
|
||||
//let volume: number = $derived(audioSource.volume);
|
||||
function toFixedNumber(num, digits, base){
|
||||
const pow = Math.pow(base ?? 10, digits);
|
||||
return Math.round(num*pow) / pow;
|
||||
}
|
||||
|
||||
enum PlaybackMode {
|
||||
Linear,
|
||||
LoopOne,
|
||||
|
@ -80,7 +81,6 @@
|
|||
if (data && data.nowPlaying.entry) {
|
||||
data.nowPlaying.entry.forEach((entry) => {
|
||||
if (entry.username == OpenSubsonic.username) {
|
||||
title = entry.title;
|
||||
newSong(entry);
|
||||
foundInNowPlaying = true;
|
||||
}
|
||||
|
@ -234,8 +234,6 @@
|
|||
</div>
|
||||
<div class="border border-2 col-span-3">
|
||||
<h1>Center</h1>
|
||||
<button onclick={() => volume += 0.1}>Louder</button>
|
||||
<button onclick={() => volume -= 0.1}>Quieter</button>
|
||||
</div>
|
||||
<QueueFrame {queue} {fetchQueue} {saveQueue} {removeSongFromQueue} {playSong} currentIndex={currentSong.queueIndex} />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue