Added fullscreen mode to miniplayer
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
playlistTooltip.style.left = `${x}px`
|
||||
playlistTooltip.style.top = `${y}px`
|
||||
}
|
||||
|
||||
let expanded = false
|
||||
</script>
|
||||
|
||||
<div class="h-full overflow-hidden">
|
||||
@@ -44,7 +46,5 @@
|
||||
</div>
|
||||
<slot />
|
||||
</section>
|
||||
<section class="absolute bottom-0 z-40 grid max-h-full w-full place-items-center">
|
||||
<MediaPlayer />
|
||||
</section>
|
||||
<MediaPlayer />
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
import { queue } from '$lib/stores'
|
||||
import type { PageServerData } from './$types'
|
||||
|
||||
let queueRef = $queue // This nonsense is to prevent an bug that causes svelte to throw an error when setting a property of the queue directly
|
||||
|
||||
export let data: PageServerData
|
||||
|
||||
const formatTime = (seconds: number): string => {
|
||||
@@ -22,7 +24,7 @@
|
||||
<button
|
||||
id="searchResult"
|
||||
on:click={() => {
|
||||
if (searchResult.type === 'song') $queue.enqueue(searchResult)
|
||||
if (searchResult.type === 'song') queueRef.current = searchResult
|
||||
}}
|
||||
class="grid aspect-square h-full place-items-center bg-cover bg-center bg-no-repeat"
|
||||
style="--thumbnail: url('/api/remoteImage?url={searchResult.thumbnail}')"
|
||||
@@ -30,7 +32,7 @@
|
||||
<i class="fa-solid fa-play opacity-0" />
|
||||
</button>
|
||||
<div>
|
||||
<div>{searchResult.name}</div>
|
||||
<div>{searchResult.name}{searchResult.type === 'song' && searchResult.album?.name ? ` - ${searchResult.album.name}` : ''}</div>
|
||||
{#if 'artists' in searchResult && searchResult.artists}
|
||||
<div>{searchResult.artists.map((artist) => artist.name).join(', ')}</div>
|
||||
{:else if 'createdBy' in searchResult && searchResult.createdBy}
|
||||
|
||||
@@ -18,7 +18,7 @@ export const GET: RequestHandler = async ({ url, request }) => {
|
||||
console.error(`Audio stream fetch failed: ${reason}`)
|
||||
return null
|
||||
})
|
||||
if (!stream || !stream.body) continue
|
||||
if (!stream || !stream.ok) continue
|
||||
|
||||
return stream
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user