Skip to content

Commit

Permalink
起動時に予鈴音源が読み込まれていない問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreNion committed Dec 19, 2023
1 parent 07cfc8d commit 2a26a44
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ onMounted(async () => {
console.warn(e);
}
// 予鈴音源を読み込む
try {
const preChimeHandle = await opfsRoot.getFileHandle('pre-chime.mp3', { create: false });
const preChimeBuffer = await preChimeHandle.getFile();
preChimeSource().value = URL.createObjectURL(preChimeBuffer);
} catch (e) {
console.warn(e);
}
// アラート音源を読み込む
try {
const alertHandle = await opfsRoot.getFileHandle('alert.mp3', { create: false });
Expand Down

0 comments on commit 2a26a44

Please sign in to comment.