# pySSP Web Remote API Base URL: `http://:` The Web Remote service is controlled from **Options -> Web Remote**: - Enable/disable Web Remote - Set listening port - View the LAN URL to open in browser The Web Remote browser page now supports selecting transport mode: - `HTTP` (existing REST calls) - `WebSocket` (same API paths over WS request/response) All responses are JSON. ## UI Reference Screenshots Main Web Remote page: ![Web Remote Main](images/web_remote_main.png) Lyric links and lyric JSON API links: ![Web Remote Lyric Links](images/web_remote_lyric_links.png) Lock / automation lock controls: ![Web Remote Lock Controls](images/web_remote_lock_controls.png) Stage alert panel section: ![Web Remote Alert Box](images/web_remote_alert_box.png) - Success shape: ```json { "ok": true, "result": {} } ``` ## WebSocket Transport (API Parity) WebSocket endpoint: - `ws://:/ws` - `wss://:/ws` (if behind TLS proxy) `ws-port` is the Web Remote port + 1. Request message: ```json { "type": "api_request", "id": "req-1", "path": "/api/play/a-1-1", "method": "POST", "body": {} } ``` Response message: ```json { "type": "api_response", "id": "req-1", "status": 200, "payload": { "ok": true, "result": {} } } ``` Notes: - `path` supports the same HTTP API paths documented below. - `method` supports `GET` and `POST`. - `body` is optional and maps to JSON/form-style params used by the HTTP routes. - Query strings in `path` are also supported (example: `/api/seek?percent=33.5`). - Error shape: ```json { "ok": false, "error": { "code": "error_code", "message": "Human readable error" } } ``` ## Core Control - `GET /` - Browser UI with clickable groups, pages, and buttons plus transport controls. - `GET/POST /api/health` - `GET/POST /api/play/` - Example: `/api/play/a-1-1` - `GET/POST /api/pause` - Pauses active playback. Returns an error if nothing is playing. - `GET/POST /api/resume` - Resumes paused playback. Returns an error if nothing is paused. - `GET/POST /api/stop` - Same behavior as clicking `STOP` in the UI (fade rules apply). - `GET/POST /api/forcestop` - Immediate stop without fade. - `GET/POST /api/rapidfire` - `GET/POST /api/playnext` - Returns error if not currently playing or no next track is available. ## Toggle/Mode Endpoints Mode values: `enable`, `disable`, `toggle` - `GET/POST /api/talk/` - `GET/POST /api/playlist/` - `GET/POST /api/playlist/shuffle/` - Returns error if playlist is not enabled. - Alias routes: - `GET/POST /api/playlist/enableshuffle` - `GET/POST /api/playlist/disableshuffle` - `GET/POST /api/multiplay/` - `GET/POST /api/fadein/` - `GET/POST /api/fadeout/` - `GET/POST /api/crossfade/` - `GET/POST /api/lyric/` - Mode values: `show`, `blank`, `toggle` - Controls lyric output visibility for Web Lyric Display and native Qt Lyric Display. ## Navigation/Reset - `GET/POST /api/goto/` - Accepted target formats: - `` (example: `a`) - `-` (example: `a-1`) - `--