feature/USERS #12

Merged
ab merged 5 commits from feature/USERS into DEV 2026-04-08 16:51:25 +00:00
Showing only changes of commit d3aba1152c - Show all commits
@@ -1,4 +1,4 @@
import { API_ROOT } from './furumiApi'
import { furumiApi } from './furumiApi'
import { fmt } from './utils'
const MAX_PLAYBACK_ERROR_SKIPS = 5
@@ -109,8 +109,13 @@ export function attachAudioPlayback(
volSlider?.addEventListener('input', onVolInput)
async function loadStreamForTrack(slug: string) {
audio.src = `${API_ROOT}/stream/${slug}`
await audio.play().catch(() => { })
try {
const res = await furumiApi.get(`/stream/${slug}`, { responseType: 'blob' })
audio.src = URL.createObjectURL(res.data)
await audio.play().catch(() => { })
} catch {
// stream failed
}
}
function pauseAndClearSource() {