mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-09 12:16:15 +00:00
Adds a third way to push a clip to a speaker, surfaced by @dagrider in #517: POST SetAVTransportURI + Play to the speaker's UPnP MediaRenderer control endpoint (port 8091). Unlike /speaker play_info it needs no app_key and no DNS interception, so it works on a plain LAN; the trade-off is it switches the speaker to the UPNP source and replaces the current playback (no duck-and-resume). - pkg/client: SetAVTransportURI, AVTransportPlay, PlayURLViaUPnP (+ the :8091 control-URL derivation and SOAP plumbing), with tests. - cmd/soundtouch-cli: `speaker url-upnp --url <url>`. - docs: document the UPnP/AVTransport option under POST /speaker. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
35 lines
1.4 KiB
Go
35 lines
1.4 KiB
Go
// Package speaker holds protocol-level constants for the Bose SoundTouch
|
|
// speaker's local API surface: the well-known HTTP port, the request paths
|
|
// exposed by every device, and the on-device file locations the migration
|
|
// flow needs to know about.
|
|
//
|
|
// This package is intentionally a leaf with no internal dependencies, so
|
|
// any layer can import it (client library, service, CLI, tests) without
|
|
// introducing a cycle or a cross-topic edge. Anything speaker-shaped that
|
|
// would otherwise be duplicated between packages belongs here.
|
|
package speaker
|
|
|
|
// HTTPPort is the well-known port the SoundTouch device exposes its local
|
|
// API on (e.g. /info, /presets, /group).
|
|
const HTTPPort = 8090
|
|
|
|
// UPnPPort is the port the SoundTouch device exposes its UPnP/DLNA
|
|
// MediaRenderer on, including the AVTransport control endpoint
|
|
// (/AVTransport/Control). Distinct from HTTPPort.
|
|
const UPnPPort = 8091
|
|
|
|
// Well-known HTTP paths the SoundTouch device serves on HTTPPort.
|
|
const (
|
|
DeviceInfoPath = "/info"
|
|
PresetsPath = "/presets"
|
|
RecentsPath = "/recents"
|
|
)
|
|
|
|
// On-device filesystem paths that the migration/sync flow needs to read or
|
|
// write over SSH. These live in the device's persistence area and are not
|
|
// part of the HTTP surface.
|
|
const (
|
|
SourcesFileLocation = "/mnt/nv/BoseApp-Persistence/1/Sources.xml"
|
|
GroupServiceFileLocation = "/mnt/nv/BoseApp-Persistence/1/GroupService.xml"
|
|
)
|