90 lines
6.4 KiB
Markdown
90 lines
6.4 KiB
Markdown
# Install and connect — 0.7.0
|
||
|
||
## Normal setup
|
||
|
||
1. Install or update **Adaptive Music** using the existing Foundry manifest URL.
|
||
For the staged acceptance build, extract `adaptive-music.zip` into the existing
|
||
Foundry user-data `Data/modules/` directory and reload the isolated test world.
|
||
The ZIP contains one `adaptive-music/` directory. Do not install the outer release
|
||
bundle or source archive as the module.
|
||
2. As the single active GM, open Settings → Adaptive Music setup. Enter the private
|
||
trusted **HTTPS Music Assistant server address** and the dedicated account’s access
|
||
token, then select **Authenticate**. Use the origin, without a subpath or query.
|
||
3. Select **Connect audio**. The module automatically creates or reconnects its own
|
||
campaign receiver and pairs it to the authenticated account. No receiver identity
|
||
export or JSON backup import is needed. The selector includes only this browser’s
|
||
campaign-owned receiver; it does not enumerate household speakers.
|
||
4. Assign ambient and combat playlists to the selected scene and save assignments.
|
||
World defaults and boss/manual controls are optional. Enable music automation.
|
||
5. Players connect automatically. If a browser requires activation, open Campaign
|
||
audio and select **Enable Audio** once. Keep one audio tab per account.
|
||
|
||
The token stays in this tab’s memory, including across failed attempts and setup
|
||
window closure. Reload or Disconnect forgets it. Receiver identity is encrypted in
|
||
this GM browser’s local storage and reused after reauthentication. A changed MA
|
||
origin needs a new login and a separately scoped receiver. Clearing site storage
|
||
forgets the receiver. Receiver options can name a new receiver; existing remembered
|
||
names remain identity-bound. Forget remembered receiver removes the local identity
|
||
only, leaving MA resources and queues untouched.
|
||
|
||
Connection recovery → Reconnect remembered receiver reuses this tab’s credentials and preserves the queue while pausing automation. Optional existing STUN/TURN settings are in Receiver options; no public ICE service is enabled by default.
|
||
|
||
Reconnecting to an owned nonempty queue preserves it. Apply the automation setting
|
||
when ready to resume scene control. Unknown mutation outcomes stop automation and
|
||
require review; they are never silently replayed. Pause is emulated for MA 2.10.6
|
||
Sendspin by preserving a stopped queue’s index/position in the active GM session.
|
||
Crossfade and restoration after a GM crash/reload are not guaranteed. Old experimental identity-based assignments may need playlist reselection once; the remembered v0.7.0 receiver keeps subsequent catalog references stable.
|
||
|
||
## Connection diagnostics
|
||
|
||
Setup displays the actual stage: authentication, Sendspin connection, pairing,
|
||
clock sync, catalog or ready. It shows decoded frames, GM audio state and connected
|
||
listeners. **Check browser connection (no MA token)** tests both WebSocket routes
|
||
from the actual Foundry page and identifies enforced CSP blocks. It does not send
|
||
an MA authentication frame; normal browser cookies may still accompany the handshake.
|
||
**Copy connection diagnostics** supplies a report without address, token, receiver
|
||
keys or playlist titles. No browser developer console is required.
|
||
|
||
| Result | Action |
|
||
| --- | --- |
|
||
| Enforced CSP block | Have the host administrator review an exact trusted WSS-origin allowance in the existing connect-src policy. Do not remove CSP or allow all origins. |
|
||
| Socket fails before opening | Compare this browser’s MA page, private DNS/routing and local-network site permission. Browser APIs conceal the precise HTTP/TLS failure. |
|
||
| API auth denied | Enter a valid token; the remembered receiver is retained. |
|
||
| Sendspin auth/pair/sync fails | Check the separate authenticated /sendspin route and the account’s web-player control permission. |
|
||
| Dedicated queue unavailable after pairing | Retry connecting the remembered receiver after MA has registered its queue. |
|
||
| Frames arrive but audio is suspended | Select Enable GM audio or the player’s Enable Audio once. |
|
||
| Listener fails negotiation | Check its diagnostics and existing network/ICE route. It is automatically retried after timeout. |
|
||
| MA error 2 on playlist startup | MA could not find playable media even if catalog metadata exists. Check that content/provider in MA; this is separate from a WebSocket upgrade failure. |
|
||
| Unknown queue write | Review the dedicated queue, then deliberately reconnect; no blind retry occurs. |
|
||
|
||
Use trusted HTTPS for Foundry and private HTTPS/WSS for both MA `/ws` and `/sendspin`.
|
||
Keep Nginx access restrictions, Origin, certificate validation and browser protections.
|
||
Keep MA raw-frame VERBOSE logging disabled. No public API/proxy, core modification,
|
||
additional container, service, VM or LXC is required by this module. A direct HTTP MA
|
||
address cannot be used from HTTPS Foundry. Default ICE does not use a public relay;
|
||
remote players still need a viable existing WebRTC path.
|
||
|
||
Ubuntu Firefox and Chromium reached the deployed HTTPS endpoints from the Foundry
|
||
origin through normal public DNS resolution. The operator’s Mac instead maps MA to
|
||
the private proxy; that private proxy’s TCP 443 route times out from Ubuntu before
|
||
TLS. A single temporary VM-to-proxy TCP 443 flow has been proposed to the operator
|
||
with rollback in ignored .local/PRIVATE-ROUTE-REQUEST.md; it has not been applied.
|
||
No persistent DNS or broad proxy change is requested. The original Mac path remains
|
||
unverified. Run TESTING.md’s one acceptance sequence before public publication.
|
||
|
||
## Manual Gitea publication
|
||
|
||
The existing stable manifest and versioned download mechanism is preserved:
|
||
|
||
- Manifest: `https://cheddahboxmb.duckdns.org/CheddahBoxMB/adaptive-music/raw/branch/main/module.json`
|
||
- v0.7.0 asset: `https://cheddahboxmb.duckdns.org/CheddahBoxMB/adaptive-music/releases/download/v0.7.0/adaptive-music.zip`
|
||
|
||
These are the established repository’s URLs; this work never contacted Gitea or
|
||
verified public asset availability. After acceptance, manually publish the included
|
||
source to your existing repository, create tag/release `v0.7.0`, attach
|
||
`adaptive-music.zip` and the included manifest/checksums, and update the branch
|
||
manifest only after its versioned asset exists. The outer bundle includes full
|
||
source, docs, licenses, metadata and SHA256SUMS. Keep the previous immutable release
|
||
assets for rollback. To roll back, restore the prior branch manifest/module ZIP;
|
||
MA queues and remembered browser identities are not automatically deleted.
|