fix: defensive audio init
This commit is contained in:
parent
a2c91ebc32
commit
5eeba76bc5
1 changed files with 6 additions and 2 deletions
|
|
@ -68,7 +68,9 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
|
||||||
const match = Binary.search(syncStore.session, sessionID, (s) => s.id)
|
const match = Binary.search(syncStore.session, sessionID, (s) => s.id)
|
||||||
const isChild = match.found && syncStore.session[match.index].parentID
|
const isChild = match.found && syncStore.session[match.index].parentID
|
||||||
if (isChild) break
|
if (isChild) break
|
||||||
idlePlayer?.play()
|
try {
|
||||||
|
idlePlayer?.play()
|
||||||
|
} catch {}
|
||||||
setStore("list", store.list.length, {
|
setStore("list", store.list.length, {
|
||||||
...base,
|
...base,
|
||||||
type: "turn-complete",
|
type: "turn-complete",
|
||||||
|
|
@ -84,7 +86,9 @@ export const { use: useNotification, provider: NotificationProvider } = createSi
|
||||||
const isChild = match.found && syncStore.session[match.index].parentID
|
const isChild = match.found && syncStore.session[match.index].parentID
|
||||||
if (isChild) break
|
if (isChild) break
|
||||||
}
|
}
|
||||||
errorPlayer?.play()
|
try {
|
||||||
|
errorPlayer?.play()
|
||||||
|
} catch {}
|
||||||
setStore("list", store.list.length, {
|
setStore("list", store.list.length, {
|
||||||
...base,
|
...base,
|
||||||
type: "error",
|
type: "error",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue