MockRTC API Reference
    Preparing search index...

    Interface OfferOptions

    interface OfferOptions {
        addDataStream?: boolean;
        connectionMetadata?: ConnectionMetadata;
        mirrorSDP?: string;
    }
    Index
    addDataStream?: boolean

    When using mirrorSDP, for SDP that only defines video/audio media we will receive an offer with no data stream attached. This can be a problem for proxied connections, which need a data stream to hook up the external connection later. If addDataStream is set to true, a data stream will always be created even if not present in the mirrored SDP.

    This option has no effect if mirrorSDP is not set.

    connectionMetadata?: ConnectionMetadata

    Extra metadata to associate with the connection. This will be exposed on events like peer-connected, and can be used to add context to connections.

    If this value is provided during renegotiation, it is merged key-wise with any existing metadata value for the connection (i.e. existing metadata values will not change, unless a new value for the same key is provided).

    mirrorSDP?: string

    A raw SDP string that should be mirrored (best efforts) where possible to create an equivalent offer, including the same media with the same params.