diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1b4ec..9a50734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -100,6 +100,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 `ParseEncodingPreset` fallback) instead of `aac_lc_32k`. New installs enabling audio conversion will now default to MP3 32 kbps as the UI advertises. +- Audio playback now silently recovers from a 401 on `/api/calls/:id/audio` + by triggering a single token refresh and retrying the same call. Fixes + the case where a sibling device login (phone, tablet, second tab) pushes + a desktop's access JWT out of the per-user concurrent-token cap and + leaves \ playback failing until the next scheduled refresh. ## [1.1.2] — 2026-04-24 diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index 9758305..744dbea 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -4,11 +4,40 @@ import { Provider } from "react-redux"; import { BrowserRouter, Routes, Route } from "react-router-dom"; import { store } from "@/app/store"; import { useAppSelector } from "@/app/store"; -import { selectAuthReady } from "@/app/slices/shared/authSlice"; +import { selectAuthReady, setCredentials } from "@/app/slices/shared/authSlice"; import { useAuthInit } from "@/hooks/shared/useAuthInit"; import { useTokenRefresh } from "@/hooks/shared/useTokenRefresh"; +import { audioPlayer } from "@/services/audio/player"; +import type { RefreshResponse } from "@/types"; import "@/index.css"; +// Wire a silent auth-recovery hook into the audio player so that when an +// `