Skip to content

Commit 0dd9018

Browse files
Feros Botjjleng
authored andcommitted
fix: fix play button functinoality on the call log table
ORIGINAL_AUTHOR=Feros Bot <bot@feros.ai> GitOrigin-RevId: d7ca0264ebbc136a44faa70d745f1ddb828cd7f2
1 parent 84e2845 commit 0dd9018

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

studio/web/src/components/calls/call-log-table.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ export function CallLogTable({
143143
if (el) {
144144
audioRefs.current[call.id] = el;
145145
} else {
146-
const existing = audioRefs.current[call.id];
147-
if (existing) {
148-
existing.pause();
149-
delete audioRefs.current[call.id];
150-
}
146+
delete audioRefs.current[call.id];
151147
}
152148
}}
153149
src={getAbsoluteUrl(call.recording_url)}
@@ -164,7 +160,15 @@ export function CallLogTable({
164160
if (playingId && audioRefs.current[playingId]) {
165161
audioRefs.current[playingId]!.pause();
166162
}
167-
audio.play();
163+
void audio.play().catch((error: unknown) => {
164+
if (
165+
error instanceof DOMException &&
166+
error.name === "AbortError"
167+
) {
168+
return;
169+
}
170+
console.error("Failed to play recording", error);
171+
});
168172
setPlayingId(call.id);
169173
}
170174
}}

0 commit comments

Comments
 (0)