Started on media player

This commit is contained in:
Eclypsed
2024-04-09 00:10:23 -04:00
parent c5408d76b6
commit 8e52bd71c4
19 changed files with 1095 additions and 319 deletions

View File

@@ -0,0 +1,13 @@
import type { RequestHandler } from '@sveltejs/kit'
export const GET: RequestHandler = async ({ url }) => {
// const connectionId = url.searchParams.get('connection')
// const id = url.searchParams.get('id')
// if (!(connectionId && id)) return new Response('Missing query parameter', { status: 400 })
const imageUrl = url.searchParams.get('url')
if (!imageUrl) return new Response('Missing url', { status: 400 })
const image = await fetch(imageUrl).then((response) => response.arrayBuffer())
return new Response(image)
}