API Reference
    Preparing search index...

    Interface StreamOptions

    Local stream publication options.

    interface StreamOptions {
        audioBitrate?: number;
        filter?: (options: { remote: RemotePeer }) => boolean;
        id: string | number;
        managed?: boolean;
        stream: MediaStream;
        videoBitrate?: number;
    }
    Index

    Properties

    audioBitrate?: number

    Preferred audio bitrate in bits per second. For example, 16000 for 16 kbps.

    filter?: (options: { remote: RemotePeer }) => boolean

    Optional callback to allow or block publishing to a remote peer.

    id: string | number

    Application-level stream identifier.

    managed?: boolean

    Whether the peer should manage the lifecycle of the stream's tracks. If true, tracks will be stopped when the stream is unpublished or replaced.

    stream: MediaStream

    Media stream to publish.

    videoBitrate?: number

    Preferred video bitrate in bits per second. For example, 64000 for 64 kbps.