File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
studio/web/src/components/calls Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff 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 } }
You can’t perform that action at this time.
0 commit comments