This commit is contained in:
2023-10-03 05:47:00 +08:00
parent 18ea4841e0
commit 20d3c059d7
1 changed files with 1 additions and 1 deletions

View File

@ -114,8 +114,8 @@
var count = 0 var count = 0
clientList.setChannel(`music-data-${item.id}`, { clientList.setChannel(`music-data-${item.id}`, {
onmessage: async (event, client) => { onmessage: async (event, client) => {
buffer = appendBuffer(buffer, event.data)
console.log('收到音乐数据 chunk', count, buffer.byteLength) console.log('收到音乐数据 chunk', count, buffer.byteLength)
buffer = appendBuffer(buffer, event.data)
count++ count++
if (buffer.byteLength >= item.size) { if (buffer.byteLength >= item.size) {
console.log('音乐数据接收完毕') console.log('音乐数据接收完毕')