# Install and connect — 0.7.2 ## 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. In **Connection**, enter the private **HTTPS Music Assistant server address** and the dedicated account’s access token. Use the server origin and select **Connect** to create or reconnect the campaign receiver, pair it, and load playlists. 3. Select **Choose scene music**. In **Scene Music**, choose the scene and save its ambient, combat, boss and native fallback assignments. You can also set world defaults and individual boss overrides. 4. Open **Playback** to enable automation, see the current track and listeners, or adjust campaign volume and control the dedicated MA queue. 5. Players connect automatically. If a browser requires activation, open Campaign audio and select **Enable Audio** once. Keep one audio tab per account. After a successful connection, the GM’s Foundry account remembers the encrypted server address and receiver name. On another computer or after reload, enter the same MA token and select **Connect** to unlock the saved address. Reload and **Disconnect** clear the in-memory token. If the token changes, enter the server address with the replacement token. **Advanced → Forget saved connection** clears the account record. The receiver identity remains encrypted in its browser vault. New MA playlist assignments resolve across browsers using the same MA token and origin. To update a legacy assignment, connect from the browser that originally saved it and save the scene again. From a different browser, reselect its playlists. Keep the active GM browser open for live MA playback and listener forwarding. Reconnecting to an owned nonempty queue preserves it. Enable automation in Playback when ready to resume scene control. Unknown mutation outcomes stop automation and require review. Pause preserves a stopped queue’s index and position for the active GM session. ## Connection diagnostics Connection shows authentication, receiver setup and catalog progress. **Check browser connection** tests both WebSocket routes from the actual Foundry page without sending an MA authentication frame. Normal browser cookies can 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. See TESTING.md for private-route evidence and the outstanding installed, Mac and WAN checks. ## 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.2 asset: `https://cheddahboxmb.duckdns.org/CheddahBoxMB/adaptive-music/releases/download/v0.7.2/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.2`, 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.