docs: media player subsystem architecture and conventions

Document the media server process, /media/ port map, library layout on
the ./media bind mount, Hope's media MCP toolset, the music/mic
mutual-exclusion rule, and yt-dlp download/proxy conventions.
This commit is contained in:
snowspeeder committed 2026-08-29 13:22:01 -04:00
1 parent 04c4a53594
commit a53c090882
9 files changed
+479 -13

No files matched your search

+10 -2
View File
@@ -1263,7 +1263,13 @@ function clearMediaAudio() {
function updateMediaNowCard(track) {
mediaTitleEl.textContent = track.title || track.id;
mediaChannelEl.textContent = track.channel || (track.kind === "stream" ? "Live stream" : "");
if (track.status === "failed") {
mediaChannelEl.textContent = "Download failed — pick another result or try again.";
} else if (track.status === "downloading") {
mediaChannelEl.textContent = "Preparing…";
} else {
mediaChannelEl.textContent = track.channel || (track.kind === "stream" ? "Live stream" : "");
}
if (track.art_url) {
mediaArt.src = track.art_url;
mediaArt.hidden = false;
@@ -1403,7 +1409,9 @@ mediaAudio.addEventListener("timeupdate", () => {
});
mediaAudio.addEventListener("durationchange", updateSeekUI);
mediaAudio.addEventListener("error", () => {
if (mediaCurrentTrackId) {
// An empty src (track still downloading) also fires this — only surface
// real playback failures.
if (mediaCurrentTrackId && mediaAudio.getAttribute("src")) {
mediaChannelEl.textContent = "Playback error — the track may still be preparing.";
}
});