fix(player): replace public stream URL with internal proxy path
CD — Kai-Sa-Cam Deployment / deploy (push) Successful in 11s

This commit is contained in:
2026-10-25 14:21:58 +01:00
parent a51be775cc
commit b705c88e8a
2 changed files with 21 additions and 1 deletions
+20
View File
@@ -18,6 +18,26 @@ export function useRecorder({
const isRecordingRef = useRef(isRecording);
isRecordingRef.current = isRecording;
useEffect(() => {
fetch("/api/recordings/status")
.then((res) => res.json())
.then((data) => {
if (data.isRecording) {
setIsRecording(true);
startTimeRef.current = data.startTime || Date.now();
onStart?.();
intervalRef.current = window.setInterval(() => {
onTimeUpdate?.(
Math.floor(
(Date.now() - (startTimeRef.current || Date.now())) / 1000,
),
);
}, 1000);
}
})
.catch(() => {});
}, [onStart, onTimeUpdate]);
const stopRecording = useCallback(async () => {
setError(null);
try {
+1 -1
View File
@@ -65,7 +65,7 @@ export function useTalk({ gain = 1 }: UseTalkOptions = {}) {
const source = audioContext.createMediaStreamSource(stream);
const gainNode = audioContext.createGain();
gainNode.gain.value = gain;
gainNode.gain.value = gain * 2;
gainNodeRef.current = gainNode;
source.connect(gainNode);