(key?: string)
| 140 | } |
| 141 | |
| 142 | function initCurFile(key?: string) { |
| 143 | const fileMap = peerFilesInfo.value.fileMap |
| 144 | const fileName = key || Object.keys(fileMap)[0] |
| 145 | if (!fileName || !fileMap[fileName]) { |
| 146 | throw new Error('File not found') |
| 147 | } |
| 148 | |
| 149 | curFile.value = { |
| 150 | name: fileName, |
| 151 | size: fileMap[fileName]?.size || 0, |
| 152 | transmittedBytes: 0, |
| 153 | lastSize: 0, |
| 154 | speed: 0, |
| 155 | chunks: [] |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | async function handleObjData(obj: any) { |
| 160 | if (obj.type === 'user') { |
no outgoing calls
no test coverage detected