@agatx/serenada-core
    Preparing search index...

    Interface SerenadaSessionHandle

    Public interface for an active call session. Consumers should use this instead of the concrete SerenadaSession class.

    interface SerenadaSessionHandle {
        callQualitySummary: CallQualitySummary | null;
        callStats: CallStats | null;
        canScreenShare: boolean;
        hasMultipleCameras: boolean;
        iceConnectionState: RTCIceConnectionState;
        independentContentVideoEnabled: boolean;
        isSignalingConnected: boolean;
        localStream: MediaStream | null;
        onPermissionsRequired: ((permissions: MediaCapability[]) => void) | null;
        peerConnectionState: RTCPeerConnectionState;
        remoteStreams: Map<string, MediaStream>;
        rtcSignalingState: RTCSignalingState;
        state: CallState;
        cancelJoin(): void;
        captureSnapshot(source?: SnapshotSource): Promise<SnapshotResult>;
        destroy(): void;
        end(): void;
        flipCamera(): Promise<void>;
        getLocalContentStream(): MediaStream | null;
        getRemoteCameraStream(cid: string): MediaStream | undefined;
        getRemoteContentStream(cid: string): MediaStream | undefined;
        getRemoteIndependentContentVideo(cid: string): boolean;
        getRemoteStream(cid: string): MediaStream | undefined;
        leave(): void;
        onConnectionEvent(callback: (event: ConnectionEvent) => void): () => void;
        onPeerMessage(callback: (message: PeerMessage) => void): () => void;
        resumeJoin(): Promise<void>;
        setAudioEnabled(enabled: boolean): void;
        setCameraMode(mode: CameraMode): void;
        setVideoEnabled(enabled: boolean): void;
        startScreenShare(): Promise<void>;
        stopScreenShare(): Promise<void>;
        subscribe(callback: (state: CallState) => void): () => void;
        toggleAudio(): void;
        toggleVideo(): void;
    }

    Implemented by

    Index

    Properties

    callQualitySummary: CallQualitySummary | null

    Aggregate call-quality summary. Updated live during the call and finalized at end; readable after the session stops. null before sampling begins (first inCall).

    callStats: CallStats | null
    canScreenShare: boolean
    hasMultipleCameras: boolean
    iceConnectionState: RTCIceConnectionState
    independentContentVideoEnabled: boolean

    Whether this session negotiated the independent content video path.

    isSignalingConnected: boolean
    localStream: MediaStream | null
    onPermissionsRequired: ((permissions: MediaCapability[]) => void) | null
    peerConnectionState: RTCPeerConnectionState
    remoteStreams: Map<string, MediaStream>
    rtcSignalingState: RTCSignalingState
    state: CallState

    Methods

    • Local content (screen share) stream for optional local preview.

      Returns MediaStream | null

    • Remote camera stream for a participant, or undefined. In independent content mode this is the camera-only stream; otherwise it falls back to the legacy combined stream (same as remoteStreams.get(cid)).

      Parameters

      • cid: string

      Returns MediaStream | undefined

    • Remote content (screen share) stream for a participant when the independent content video stream is negotiated, else undefined.

      Parameters

      • cid: string

      Returns MediaStream | undefined

    • Whether a remote participant advertised independent content video support. Missing capabilities default to false.

      Parameters

      • cid: string

      Returns boolean

    • Legacy camera stream accessor — same as remoteStreams.get(cid).

      Parameters

      • cid: string

      Returns MediaStream | undefined