mirror of
https://github.com/vector-im/element-call.git
synced 2026-02-11 04:27:03 +00:00
catch a couple of exceptions
This commit is contained in:
@@ -58,8 +58,12 @@ export const usePTTSounds = (): PTTSounds => {
|
||||
break;
|
||||
}
|
||||
if (ref.current) {
|
||||
ref.current.currentTime = 0;
|
||||
await ref.current.play();
|
||||
try {
|
||||
ref.current.currentTime = 0;
|
||||
await ref.current.play();
|
||||
} catch (e) {
|
||||
console.log("Couldn't play sound effect", e);
|
||||
}
|
||||
} else {
|
||||
console.log("No media element found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user