A music player that connects to your cloud/distributed storage.
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v4 32 lines 814 B view raw
1import { ostiary, rpc, workerProxy } from "~/common/worker.js"; 2 3/** 4 * @import {ActionsWithTunnel, ProxiedActions} from "~/common/worker.d.ts" 5 * @import {InputActions} from "~/components/input/types.d.ts" 6 * @import {Actions} from "~/components/artwork/types.d.ts" 7 */ 8 9//////////////////////////////////////////// 10// ACTIONS 11//////////////////////////////////////////// 12 13/** 14 * @type {ActionsWithTunnel<Actions>['get']} 15 */ 16export async function get({ data: track, ports }) { 17 /** @type {ProxiedActions<InputActions>} */ 18 const input = workerProxy(() => { 19 ports.input.start(); 20 return ports.input; 21 }); 22 23 return await input.artwork(track.uri); 24} 25 26//////////////////////////////////////////// 27// ⚡️ 28//////////////////////////////////////////// 29 30ostiary((context) => { 31 rpc(context, { get }); 32});