Member Junction
    Preparing search index...

    The per-session arbiter. Obtain the one for a client with VideoSourceArbiter.ForSink so every writer shares it; constructing a second one for the same client would make two writers again.

    Index

    Constructors

    Methods

    • Subscribes to structural changes (a source registered, removed, enabled, disabled, picked, focused, or the forwarded set changing). Not called per frame.

      Parameters

      • handler: () => void

      Returns () => void

      An unsubscribe function.

    • A source offers a frame. It is forwarded to the model only if the source is enabled, among the sources the model should see, and not inside the negotiated pacing interval.

      Parameters

      • sourceId: string

        The producing source (it must be registered).

      • base64Image: string

        The frame, base64-encoded.

      • mimeType: string = 'image/jpeg'

        Image MIME type. Defaults to 'image/jpeg'.

      Returns boolean

      true if the frame was sent to the model.

    • The user explicitly picks the source the agent sees (null clears the pick). A pick beats every other rule. Returns false for an unknown or disabled source (nothing changes).

      Parameters

      • sourceId: string

      Returns boolean

    • Marks the CHANNEL whose surface the user is looking at (null clears it): every source registered for that channel counts as focused, including one that registers after this call (a surface the user is already on before its first frame). Used by the 'focused' rule alongside SetFocusedSource.

      Parameters

      • channelKey: string

      Returns void

    • Turns a source on or off. A disabled source is not a candidate and forwards nothing.

      Parameters

      • sourceId: string

        The source.

      • enabled: boolean

        The new state.

      • notify: boolean = true

        Whether to tell the model. Default true. A caller that sends its own note about the same change (a channel lowering its exposure) passes false so the model is told once.

      Returns boolean

      false for an unknown source; true otherwise (including "already in that state").