@twilio/video-node-sdk - v1.0.0-beta.2
    Preparing search index...

    Interface LocalVideoTrack

    A local video track that the application feeds with I420 frames. Create via createLocalVideoTrack.

    interface LocalVideoTrack {
        enabled: boolean;
        kind: "video";
        name: string;
        getWriteStats(): WriteStats;
        write(frame: VideoFrameInput): boolean;
    }
    Index
    enabled: boolean

    Whether the track is enabled; setting false publishes black/silent media without unpublishing.

    kind: "video"

    Always 'video'.

    name: string

    Track name, unique across the local participant's published tracks.

    • Push an I420 frame into the track.

      Buffers are copied synchronously, so the caller may reuse or free them as soon as this returns.

      Throws TypeError/RangeError on invalid input (bad plane shape, non-finite integers, non-numeric timestamp, invalid rotation, plane buffer smaller than stride * height). Throws Error if the track is not bound to a source.

      Returns true when the frame was forwarded to the encoder sink. Returns false when the frame was dropped - most commonly because the encoder sink has not attached yet (frames written before connect() resolves), but also when libwebrtc's adapter rate-limits or rejects the frame's resolution. Every false is counted in LocalVideoTrack.getWriteStats.

      Parameters

      Returns boolean