P2P Media Loader Documentation
    Preparing search index...

    Type Alias SegmentResponse

    Represents the response from a segment request, including the data and measured bandwidth.

    type SegmentResponse = {
        data: ArrayBuffer;
        bandwidth: number;
    }
    Index
    data: ArrayBuffer

    Segment data as an ArrayBuffer.

    May reference the same buffer the core keeps in segment storage for P2P upload. Treat it as read-only and never transfer it to a worker — copy it first (e.g. data.slice(0)), otherwise peers receive corrupted segments.

    bandwidth: number

    Measured bandwidth for the segment download, in bytes per second.