降低延迟

This commit is contained in:
2023-10-03 00:17:03 +08:00
parent 380878667b
commit b4aef2a89f
2 changed files with 5 additions and 4 deletions

View File

@ -7,8 +7,9 @@ webrtc 实现的 p2p 信道
- [x] 主机记录各自曲目列表以供查询
- [x] 播放时高亮显示
- [x] 合并操作按钮
- [ ] 对方退出时清除其列表
- [x] 响应列表时不再广播
- [ ] 对方退出时清除其列表
- [ ] 分片请求时立即播放
- [ ] 集群分发
- [ ] 下载加速
- [ ] 即时通讯

View File

@ -17,9 +17,9 @@
import ClientList from './client.js'
// 缓冲分片发送
const CHUNK_SIZE = 1024 * 64 // 每个块的大小为128KB
const THRESHOLD = 1024 * 1024 // 缓冲区的阈值为1MB
const DELAY = 100 // 延迟500ms
const CHUNK_SIZE = 1024 * 64 // 默认每个块的大小为128KB
const THRESHOLD = 1024 * 1024 // 默认缓冲区的阈值为1MB
const DELAY = 50 // 默认延迟500ms
// 将两个ArrayBuffer合并成一个
function appendBuffer(buffer1, buffer2) {