分片日志 +1
This commit is contained in:
parent
5b9f09b8fb
commit
6cd1bece7d
@ -117,7 +117,7 @@
|
|||||||
const chunkNumber = Math.ceil(item.size / 1024 / 64) // 64KB每片
|
const chunkNumber = Math.ceil(item.size / 1024 / 64) // 64KB每片
|
||||||
clientList.setChannel(`music-data-${item.id}`, {
|
clientList.setChannel(`music-data-${item.id}`, {
|
||||||
onmessage: async (event, client) => {
|
onmessage: async (event, client) => {
|
||||||
console.log('收到音乐数据 chunk', `${count}/${chunkNumber}`, buffer.byteLength)
|
console.log('收到音乐数据 chunk', `${count+1}/${chunkNumber}`, buffer.byteLength)
|
||||||
buffer = appendBuffer(buffer, event.data) // 合并分片准备存储
|
buffer = appendBuffer(buffer, event.data) // 合并分片准备存储
|
||||||
item.arrayBufferChunks.push(event.data) // 保存分片给边下边播
|
item.arrayBufferChunks.push(event.data) // 保存分片给边下边播
|
||||||
count++
|
count++
|
||||||
|
Loading…
Reference in New Issue
Block a user