• Convenience API that builds on top of attachRtpScriptTransform for transforms that just need to extract metadata from frames and send it back.

    Type Parameters

    • Meta = unknown

    • O = unknown

    Parameters

    • rtpProcessor: RTCRtpReceiver | RTCRtpSender

      part of the RTP transceiver to attach the transform at (either the RTPRtcSender, or the RTPRtcReceiver).

    • worker: Worker

      worker where processing will take place; this worker must have the worker service started, and will have its callback invoked with the created transformer (see module description for requirements). the same worker can be used for multiple metadata extractions.

    • processMetadata: ((meta) => void)

      callback to invoke whenever a new metadata frame arrives

        • (meta): void
        • callback to invoke whenever a new metadata frame arrives

          Parameters

          • meta: Meta

          Returns void

    • options: AttachRtpScriptTransformOptions<O> = {}

      attachment options

    Returns Promise<(() => void)>

    Stop / deregister callback, wrapped in a promise that resolves when the transformer is fully set up.

Generated using TypeDoc