Member Junction
    Preparing search index...

    The subset of the @livekit/rtc-node module this wrapper constructs from. VERIFY ctor signatures.

    interface RtcNodeModule {
        AudioFrame: new (
            data: Int16Array,
            sampleRate: number,
            channels: number,
            samplesPerChannel: number,
        ) => RtcAudioFrame;
        AudioSource: new (sampleRate: number, channels: number) => RtcAudioSource;
        AudioStream: new (
            track: RtcTrack,
            sampleRate?: number,
            channels?: number,
        ) => RtcAudioStream;
        LocalAudioTrack: {
            createAudioTrack(
                name: string,
                source: RtcAudioSource,
            ): RtcLocalAudioTrack;
        };
        LocalVideoTrack?: {
            createVideoTrack(
                name: string,
                source: RtcVideoSource,
            ): RtcLocalVideoTrack;
        };
        Room: new () => RtcRoom;
        RoomEvent: {
            ActiveSpeakersChanged: string;
            Disconnected: string;
            ParticipantAttributesChanged: string;
            ParticipantConnected: string;
            ParticipantDisconnected: string;
            TrackMuted: string;
            TrackPublished: string;
            TrackSubscribed: string;
            TrackSubscriptionFailed: string;
            TrackUnmuted: string;
            TrackUnpublished: string;
            TrackUnsubscribed: string;
        };
        TrackKind: { KIND_AUDIO: number; KIND_VIDEO: number };
        TrackPublishOptions: new (
            data?: {
                dtx?: boolean;
                red?: boolean;
                simulcast?: boolean;
                source?: number;
                stream?: string;
            },
        ) => RtcTrackPublishOptions;
        TrackSource: {
            SOURCE_CAMERA: number;
            SOURCE_MICROPHONE: number;
            SOURCE_SCREENSHARE: number;
            SOURCE_SCREENSHARE_AUDIO: number;
        };
        VideoBufferType: { I420: number };
        VideoFrame?: new (
            data: Uint8Array,
            width: number,
            height: number,
            type: number,
        ) => RtcVideoFrame;
        VideoRotation: {
            VIDEO_ROTATION_0: number;
            VIDEO_ROTATION_180: number;
            VIDEO_ROTATION_270: number;
            VIDEO_ROTATION_90: number;
        };
        VideoSource?: new (width: number, height: number) => RtcVideoSource;
        VideoStream: new (track: RtcTrack) => RtcVideoStream;
    }
    Index

    Properties

    AudioFrame: new (
        data: Int16Array,
        sampleRate: number,
        channels: number,
        samplesPerChannel: number,
    ) => RtcAudioFrame

    new AudioFrame(data, sampleRate, channels, samplesPerChannel).

    AudioSource: new (sampleRate: number, channels: number) => RtcAudioSource

    new AudioSource(sampleRate, channels).

    AudioStream: new (
        track: RtcTrack,
        sampleRate?: number,
        channels?: number,
    ) => RtcAudioStream

    new AudioStream(track, sampleRate, channels) — resamples inbound to the requested rate.

    LocalAudioTrack: {
        createAudioTrack(
            name: string,
            source: RtcAudioSource,
        ): RtcLocalAudioTrack;
    }

    LocalAudioTrack.createAudioTrack(name, source).

    LocalVideoTrack?: {
        createVideoTrack(
            name: string,
            source: RtcVideoSource,
        ): RtcLocalVideoTrack;
    }

    LocalVideoTrack.createVideoTrack(name, source). Optional, like VideoSource.

    Room: new () => RtcRoom

    new Room().

    RoomEvent: {
        ActiveSpeakersChanged: string;
        Disconnected: string;
        ParticipantAttributesChanged: string;
        ParticipantConnected: string;
        ParticipantDisconnected: string;
        TrackMuted: string;
        TrackPublished: string;
        TrackSubscribed: string;
        TrackSubscriptionFailed: string;
        TrackUnmuted: string;
        TrackUnpublished: string;
        TrackUnsubscribed: string;
    }

    Event-name constants. VERIFY exact member names.

    TrackKind: { KIND_AUDIO: number; KIND_VIDEO: number }

    Track-kind constants. VERIFY: KIND_AUDIO, KIND_VIDEO.

    TrackPublishOptions: new (
        data?: {
            dtx?: boolean;
            red?: boolean;
            simulcast?: boolean;
            source?: number;
            stream?: string;
        },
    ) => RtcTrackPublishOptions

    new TrackPublishOptions({ source }) — the publish-options protobuf message. REQUIRED by publishTrack: passing a plain object leaves source unset and the track improperly bound, so the native AudioSource.captureFrame rejects every frame with InvalidState. Construct the real proto.

    TrackSource: {
        SOURCE_CAMERA: number;
        SOURCE_MICROPHONE: number;
        SOURCE_SCREENSHARE: number;
        SOURCE_SCREENSHARE_AUDIO: number;
    }

    Track-source constants — SOURCE_MICROPHONE tags the bot's published voice track; SOURCE_CAMERA and SOURCE_SCREENSHARE tell a participant's camera from a screen they share; SOURCE_SCREENSHARE_AUDIO marks the sound of a shared tab or screen, which the bot does not hear. A track published without a source reports SOURCE_UNKNOWN (0), which the bot hears.

    VideoBufferType: { I420: number }

    Video buffer-type constants. VERIFY: VideoBufferType.I420.

    VideoFrame?: new (
        data: Uint8Array,
        width: number,
        height: number,
        type: number,
    ) => RtcVideoFrame

    new VideoFrame(data, width, height, type): one frame to capture. Optional, like VideoSource.

    VideoRotation: {
        VIDEO_ROTATION_0: number;
        VIDEO_ROTATION_180: number;
        VIDEO_ROTATION_270: number;
        VIDEO_ROTATION_90: number;
    }

    Video rotation constants. VERIFY: VideoRotation.VIDEO_ROTATION_* (WebRTC's clockwise convention).

    VideoSource?: new (width: number, height: number) => RtcVideoSource

    new VideoSource(width, height): where the bot's avatar frames go. Optional: without it the bot publishes no video.

    VideoStream: new (track: RtcTrack) => RtcVideoStream

    new VideoStream(track) — the decoded frames of one subscribed video track. VERIFY against @livekit/rtc-node: takes no options in 0.13.x, and copies every frame into JavaScript at the publisher's rate, so only tracks the bot reads get one.