@bvdmitri/web360 / RandomAccessSource
Interface: RandomAccessSource
Defined in: core/src/ports/source.ts:10
Random access to a recording's bytes, without holding them all.
Remarks
A camera file runs to gigabytes, so a reader asks only for the ranges it needs: the container's box headers, its moov, the vendor trailer, then each sample as it is decoded. A browser implements it over a Blob (slice then arrayBuffer), Node over a file handle, and a test over bytes in memory. read resolves exactly length bytes from offset, or rejects when the range is not inside size.
Properties
size
readonlysize:number
Defined in: core/src/ports/source.ts:11
Methods
read()
read(
offset,length):Promise<Uint8Array<ArrayBufferLike>>
Defined in: core/src/ports/source.ts:12
Parameters
offset
number
length
number
Returns
Promise<Uint8Array<ArrayBufferLike>>