A modern, network-enabled music player platform built on Rockbox technology. rockboxd.tsiry-sandratraina.com
rust deno navidrome airplay libadwaita zig mpris snapcast mpd rockbox audio subsonic
2

Configure Feed

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

wasm/example: fix dev start — copy-wasm resolution + RepeatMode type

- copy-wasm.mjs used require.resolve("rockbox-wasm"), which throws
ERR_PACKAGE_PATH_NOT_EXPORTED against the package's import-only exports.
The example lives inside the package, so read dist/ from ../../dist directly.
- useRockbox INITIAL_STATUS.repeat was 0; StatusEvent.repeat is now the
RepeatMode enum → use RepeatMode.Off.

Verified: `npm run build` (tsc + vite) succeeds.

+9 -7
+2 -5
bindings/wasm/example/scripts/copy-wasm.mjs
··· 5 5 // must be built first: `bash ../scripts/build.sh` from bindings/wasm. 6 6 7 7 import { cp, mkdir, access } from "node:fs/promises"; 8 - import { createRequire } from "node:module"; 9 8 import { dirname, resolve } from "node:path"; 10 9 import { fileURLToPath } from "node:url"; 11 10 12 - const require = createRequire(import.meta.url); 13 11 const here = dirname(fileURLToPath(import.meta.url)); 14 12 15 - // Resolve the installed package's entry → its dist/ directory (works whether 16 - // the file: dependency is symlinked or copied into node_modules). 17 - const distDir = dirname(require.resolve("rockbox-wasm")); 13 + // This example lives inside the package, so its built dist/ is two levels up. 14 + const distDir = resolve(here, "../../dist"); 18 15 const dest = resolve(here, "../public/rockbox"); 19 16 20 17 try {
+2 -1
bindings/wasm/example/src/useRockbox.ts
··· 1 1 import { useCallback, useRef, useState } from "react"; 2 2 import { 3 3 RockboxPlayer, 4 + RepeatMode, 4 5 type ProgressEvent, 5 6 type StatusEvent, 6 7 type TrackEvent, ··· 11 12 index: -1, 12 13 queue_len: 0, 13 14 shuffle: false, 14 - repeat: 0, 15 + repeat: RepeatMode.Off, 15 16 }; 16 17 17 18 /**
+5 -1
bindings/wasm/example/tsconfig.tsbuildinfo
··· 1 - {"root":["./src/app.tsx","./src/main.tsx","./src/userockbox.ts","./vite.config.ts"],"version":"5.9.3"} 1 + <<<<<<< HEAD 2 + {"root":["./src/app.tsx","./src/main.tsx","./src/userockbox.ts","./vite.config.ts"],"version":"5.9.3"} 3 + ======= 4 + {"root":["./src/app.tsx","./src/main.tsx","./src/userockbox.ts","./vite.config.ts"],"errors":true,"version":"5.9.3"} 5 + >>>>>>> 11087dcf2d (wasm/example: fix dev start — copy-wasm resolution + RepeatMode type)