update README and package.json

This commit is contained in:
2026-04-22 02:18:07 -07:00
parent e9c72d13df
commit 4b50524e21
2 changed files with 11 additions and 6 deletions
+7 -3
View File
@@ -5,6 +5,7 @@ API Media Player is a web-first PWA for browsing Hydrus media and handing playba
## What works today
- Start the app with `npm start` and connect a Hydrus server from the web settings screen
- Use `npm run dev` when you want the live-reload development server
- Add one or more Hydrus clients from the Settings page or a local `.env` file
- Launch playback in native apps:
- Windows and Linux desktop: `mpv` through `mpv-handler://`
@@ -20,16 +21,18 @@ API Media Player is a web-first PWA for browsing Hydrus media and handing playba
npm install
```
3. Start the dev server:
3. Start the app:
```bash
npm start
```
4. Open `http://localhost:5173`.
4. Open `http://localhost:4173`.
On a fresh install the app opens the Hydrus server settings first. Add your host, port, and API key there, test the connection, then save the server before browsing the library. Playback itself is always external, so actual media launch still depends on the platform-specific player flow below.
`npm start` now builds the app and serves the production output, which is the safer default for devices like Raspberry Pi. Use `npm run dev` only when you specifically want the Vite development server and live reload.
## Connect Hydrus (optional)
If you want real library data, duplicate `.env.example` as `.env` and fill in your Hydrus values:
@@ -110,7 +113,7 @@ If you want direct file loads in the browser to jump into `mpv` before the page
Examples:
```text
http://localhost:5173/userscripts/api-media-player-open-in-mpv.user.js
http://localhost:4173/userscripts/api-media-player-open-in-mpv.user.js
http://127.0.0.1:4173/userscripts/api-media-player-open-in-mpv.user.js
```
@@ -120,6 +123,7 @@ It only activates on `localhost`, loopback, RFC1918 LAN IPs, and `.local` or `.l
```bash
npm start
npm run dev
npm run build
npm run preview
npm run typecheck
+4 -3
View File
@@ -4,10 +4,11 @@
"private": true,
"description": "Web-first PWA media player that integrates with Hydrus",
"scripts": {
"dev": "vite",
"start": "vite",
"dev": "vite --host 0.0.0.0",
"prestart": "vite build",
"start": "vite preview --host 0.0.0.0 --strictPort --port 4173",
"build": "vite build",
"preview": "vite preview",
"preview": "vite preview --host 0.0.0.0",
"typecheck": "tsc --noEmit",
"setup:mpv-handler": "node ./scripts/setup-mpv-handler.mjs",
"install:mpv-handler": "npm run setup:mpv-handler",