更新音频
This commit is contained in:
@@ -1,54 +1,62 @@
|
||||
const audioFils = {
|
||||
胜利: "https://static.shelingxingqiu.com/attachment/2025-09-15/dcsz3389qp0vph9zjl.mp3",
|
||||
失败: "https://static.shelingxingqiu.com/attachment/2025-09-15/dcsz33746j2laokpdx.mp3",
|
||||
请射箭测试距离:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dcszloz51yo7agju3z.mp3",
|
||||
距离合格:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dcszloz55jzwupxdfd.mp3",
|
||||
距离不足:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dcszloz2l6rikmbjlj.mp3",
|
||||
轮到你了:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dcszv5hsbhdvjroggf.mp3",
|
||||
第一轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fl26qrspvy79.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwf81d9ibgwvj.mp3",
|
||||
第二轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fehshrpe5ook.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cvasp6fca4utl.mp3",
|
||||
第三轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fgbz3iimk7yy.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cvws0a45n43yd.mp3",
|
||||
第四轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fjwf50tlxxbi.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwfjy508hllbe.mp3",
|
||||
第五轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fg63lqrslhm7.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cvpctfwjzkqgf.mp3",
|
||||
决金箭轮:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fhjycwubbwil.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cvuumxo4jybpr.mp3",
|
||||
请蓝方射箭:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fr0zpluiabph.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwg1k059xeiya.mp3",
|
||||
请红方射箭:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fu169yerpwey.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwfhm13t1paxt.mp3",
|
||||
中场休息:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblu6fug8faqrbtwd.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct0c3qxmht5ypubwm.mp3",
|
||||
比赛结束:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblsdl717ilr0b3o0.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct1uodgi5i98q41ht.mp3",
|
||||
比赛开始:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbblsdl7qlkqgvthfr.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct1uoddlg85tmo9bc.mp3",
|
||||
请开始射击:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbljrfx5guqt5oulk.mp3",
|
||||
未上靶:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbkxm60bul0khcoqq.mp3",
|
||||
"1环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklufj59qmdo96ha.mp3",
|
||||
"2环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklufogy49ousbv4.mp3",
|
||||
"3环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklufl3hhijeasck.mp3",
|
||||
"4环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklufo8vo7k6jxdz.mp3",
|
||||
"5环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklkzq7lrbfpr6ij.mp3",
|
||||
"6环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbkll0fw7hbmmhxkl.mp3",
|
||||
"7环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbkll0fkirkanghmf.mp3",
|
||||
"8环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbkll0cly2noykieg.mp3",
|
||||
"9环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbkll0gsuumekhpkn.mp3",
|
||||
"10环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-07-14/dbbklgw2dk22ek7qha.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct1uod2ol85bptsth.mp3",
|
||||
射击无效:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-08-26/dcc9qc84rir8gkj3mo.mp3",
|
||||
距离不足5米:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-08-27/dcd59px1cavp1hogxi.mp3",
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct1uocy6y4ipqzmum.mp3",
|
||||
未上靶:
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cw7mqlmloxf0l.mp3",
|
||||
"1环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cw3qvjznfzaof.mp3",
|
||||
"2环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwb0of0vb3cje.mp3",
|
||||
"3环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwd9o2zv1qmbi.mp3",
|
||||
"4环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwc499rhc5k9r.mp3",
|
||||
"5环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cw2ruyvchecw2.mp3",
|
||||
"6环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cw50qqkfvhmpe.mp3",
|
||||
"7环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwbgkprfhognw.mp3",
|
||||
"8环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cweula94nxwna.mp3",
|
||||
"9环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwdc7bibtk3ze.mp3",
|
||||
"10环":
|
||||
"https://static.shelingxingqiu.com/attachment/2025-09-15/dct08cwdq83u3fadj9.mp3",
|
||||
};
|
||||
|
||||
class AudioManager {
|
||||
@@ -111,19 +119,21 @@ class AudioManager {
|
||||
// 处理音频加载错误
|
||||
handleAudioError(key) {
|
||||
const currentRetries = this.retryCount.get(key) || 0;
|
||||
|
||||
|
||||
if (currentRetries < this.maxRetries) {
|
||||
// 增加重试计数
|
||||
this.retryCount.set(key, currentRetries + 1);
|
||||
|
||||
|
||||
console.log(`音频 ${key} 开始第 ${currentRetries + 1} 次重试...`);
|
||||
|
||||
|
||||
// 延迟重试
|
||||
setTimeout(() => {
|
||||
this.retryLoadAudio(key);
|
||||
}, this.retryDelay);
|
||||
} else {
|
||||
console.error(`音频 ${key} 重试 ${this.maxRetries} 次后仍然失败,停止重试`);
|
||||
console.error(
|
||||
`音频 ${key} 重试 ${this.maxRetries} 次后仍然失败,停止重试`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +144,7 @@ class AudioManager {
|
||||
if (oldAudio) {
|
||||
oldAudio.destroy();
|
||||
}
|
||||
|
||||
|
||||
// 创建新的音频实例
|
||||
this.createAudio(key);
|
||||
}
|
||||
@@ -198,7 +208,7 @@ class AudioManager {
|
||||
|
||||
// 重新加载所有音频
|
||||
reloadAllAudios() {
|
||||
console.log('重新加载所有音频...');
|
||||
console.log("重新加载所有音频...");
|
||||
this.audioMap.forEach((audio, key) => {
|
||||
audio.destroy();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user