(chunk: any)
| 11 | } |
| 12 | |
| 13 | public write(chunk: any) { |
| 14 | const buffer = new ArrayBuffer(chunk.byteLength); |
| 15 | new Uint8Array(buffer).set(chunk); |
| 16 | |
| 17 | // Inform MP4Box where in the file this chunk is from. |
| 18 | (buffer as any).fileStart = this.offset; |
| 19 | this.offset += buffer.byteLength; |
| 20 | |
| 21 | this.setStatus('fetch', (this.offset / 1024 ** 2).toFixed(1) + ' MiB'); |
| 22 | this.file.appendBuffer(buffer); |
| 23 | } |
| 24 | |
| 25 | public close() { |
| 26 | this.setStatus('fetch', 'Done'); |
no test coverage detected