diff --git a/public/client.js b/public/client.js index 20c9ff7..453f9fb 100644 --- a/public/client.js +++ b/public/client.js @@ -215,7 +215,7 @@ export default class ClientList { }, children: [ Avatar({ - src: item.avatar || '/favicon.ico', + src: item.avatar ?? '/favicon.ico', style: { width: '32px', height: '32px', @@ -230,7 +230,7 @@ export default class ClientList { onclick: event => document.body.appendChild(Dialog({ children: [ Avatar({ - src: item.avatar || '/favicon.ico', + src: item.avatar ?? '/favicon.ico', style: { width: '240px', height: '240px', diff --git a/public/music.js b/public/music.js index f4199d0..13618d3 100644 --- a/public/music.js +++ b/public/music.js @@ -140,8 +140,9 @@ export default class MusicList { } async play(item) { if (!item.arrayBuffer) { - // 不支持流式加载wav和flac, 需要全部加载完毕才能播放 - if (item.type === 'audio/wav' || item.type === 'audio/flac') { + console.log('加载音乐类型:', item.type) + // 不支持流式加载wav和flac和m4a, 需要全部加载完毕才能播放 + if (item.type === 'audio/wav' || item.type === 'audio/flac' || item.type === 'audio/x-m4a') { await this.load(item) this.audio.src = URL.createObjectURL(new Blob([item.arrayBuffer], { type: item.type })) this.audio.play()