P2P Media Loader Documentation
    Preparing search index...

    Type Alias StreamSwarmIdBuilderContext

    The stream identity data passed to a custom streamSwarmIdBuilder.

    type StreamSwarmIdBuilderContext = {
        swarmId: string;
        runtimeId: string;
        streamType: StreamType;
        properties: Readonly<StreamProperties>;
        identityHash: string;
        defaultStreamSwarmId: string;
        peerProtocolVersion: string;
    }
    Index
    swarmId: string

    The swarm ID of the stream: the configured swarmId or the manifest response URL.

    runtimeId: string

    Runtime identifier of the stream from the engine. May differ from peer to peer — avoid using it in the ID.

    streamType: StreamType

    Stream type.

    properties: Readonly<StreamProperties>

    Raw stream properties from the manifest.

    identityHash: string

    Stream identity hash derived from the normalized stream properties. The same for all peers.

    defaultStreamSwarmId: string

    The stream swarm ID the default derivation would produce: ${peerProtocolVersion}-${swarmId}-${streamType}-${identityHash}. Useful as a base for custom IDs, e.g. `${tenant}-${defaultStreamSwarmId}`.

    peerProtocolVersion: string

    Version of the peer swarm protocol used in the default stream swarm ID derivation.