moq-wasm
    Preparing search index...

    Interface TrackWriter

    interface TrackWriter {
        "[dispose]"(): void;
        free(): void;
        nextSubscriber(): Promise<boolean>;
        write(
            payload: Uint8Array,
            new_group: boolean,
            loc_header: any,
        ): Promise<bigint | undefined>;
        writeGroup(payload: Uint8Array): Promise<bigint | undefined>;
    }
    Index
    • Returns void

    • Returns void

    • Resolves to true once a SUBSCRIBE for the track is answered, and to false once the session has ended: the moment to send what a new subscriber needs, since its SUBSCRIBE starts after the largest object.

      Returns Promise<boolean>

    • loc_header is the object's LOC properties (draft-ietf-moq-loc-04). Resolves to the object's group id when a subscriber took it, and to undefined otherwise; it is cached either way. An object within a group that was never started is dropped.

      Parameters

      • payload: Uint8Array
      • new_group: boolean
      • loc_header: any

      Returns Promise<bigint | undefined>

    • Sends payload as a group of its own, the layout of an MSF catalog (draft-ietf-moq-msf-02 §5). Resolves to the group's id when a subscriber took it, and to undefined otherwise.

      Parameters

      • payload: Uint8Array

      Returns Promise<bigint | undefined>