Skip to content

grandi / Grandi

Interface: Grandi ​

Defined in: types.ts:339

Properties ​

AUDIO_FORMAT_FLOAT_32_INTERLEAVED ​

AUDIO_FORMAT_FLOAT_32_INTERLEAVED: Float32Interleaved

Defined in: types.ts:488

Deprecated ​

Use AudioFormat.Float32Interleaved instead.


AUDIO_FORMAT_FLOAT_32_SEPARATE ​

AUDIO_FORMAT_FLOAT_32_SEPARATE: Float32Separate

Defined in: types.ts:486

Deprecated ​

Use AudioFormat.Float32Separate instead.


AUDIO_FORMAT_INT_16_INTERLEAVED ​

AUDIO_FORMAT_INT_16_INTERLEAVED: Int16Interleaved

Defined in: types.ts:490

Deprecated ​

Use AudioFormat.Int16Interleaved instead.


AudioFormat ​

AudioFormat: typeof AudioFormat

Defined in: types.ts:484

Enum: supported raw audio formats for helpers/receive conversions.


Bandwidth ​

Bandwidth: typeof Bandwidth

Defined in: types.ts:494

Enum: receiver bandwidth modes.


BANDWIDTH_AUDIO_ONLY ​

BANDWIDTH_AUDIO_ONLY: AudioOnly

Defined in: types.ts:498

Deprecated ​

Use Bandwidth.AudioOnly instead.


BANDWIDTH_HIGHEST ​

BANDWIDTH_HIGHEST: Highest

Defined in: types.ts:502

Deprecated ​

Use Bandwidth.Highest instead.


BANDWIDTH_LOWEST ​

BANDWIDTH_LOWEST: Lowest

Defined in: types.ts:500

Deprecated ​

Use Bandwidth.Lowest instead.


BANDWIDTH_METADATA_ONLY ​

BANDWIDTH_METADATA_ONLY: MetadataOnly

Defined in: types.ts:496

Deprecated ​

Use Bandwidth.MetadataOnly instead.


COLOR_FORMAT_BEST ​

COLOR_FORMAT_BEST: Best

Defined in: types.ts:478

Deprecated ​

Use ColorFormat.Best instead.


COLOR_FORMAT_BGRX_BGRA ​

COLOR_FORMAT_BGRX_BGRA: BGRX_BGRA

Defined in: types.ts:468

Deprecated ​

Use ColorFormat.BGRX_BGRA instead.


COLOR_FORMAT_BGRX_BGRA_FLIPPED ​

COLOR_FORMAT_BGRX_BGRA_FLIPPED: BGRX_BGRA_FLIPPED

Defined in: types.ts:480

Deprecated ​

Use ColorFormat.BGRX_BGRA_FLIPPED instead.


COLOR_FORMAT_FASTEST ​

COLOR_FORMAT_FASTEST: Fastest

Defined in: types.ts:476

Deprecated ​

Use ColorFormat.Fastest instead.


COLOR_FORMAT_RGBX_RGBA ​

COLOR_FORMAT_RGBX_RGBA: RGBX_RGBA

Defined in: types.ts:472

Deprecated ​

Use ColorFormat.RGBX_RGBA instead.


COLOR_FORMAT_UYVY_BGRA ​

COLOR_FORMAT_UYVY_BGRA: UYVY_BGRA

Defined in: types.ts:470

Deprecated ​

Use ColorFormat.UYVY_BGRA instead.


COLOR_FORMAT_UYVY_RGBA ​

COLOR_FORMAT_UYVY_RGBA: UYVY_RGBA

Defined in: types.ts:474

Deprecated ​

Use ColorFormat.UYVY_RGBA instead.


ColorFormat ​

ColorFormat: typeof ColorFormat

Defined in: types.ts:466

Enum: receiver video color formats.


FORMAT_TYPE_FIELD_0 ​

FORMAT_TYPE_FIELD_0: Field0

Defined in: types.ts:512

Deprecated ​

Use FrameType.Field0 instead.


FORMAT_TYPE_FIELD_1 ​

FORMAT_TYPE_FIELD_1: Field1

Defined in: types.ts:514

Deprecated ​

Use FrameType.Field1 instead.


FORMAT_TYPE_INTERLACED ​

FORMAT_TYPE_INTERLACED: Interlaced

Defined in: types.ts:510

Deprecated ​

Use FrameType.Interlaced instead.


FORMAT_TYPE_PROGRESSIVE ​

FORMAT_TYPE_PROGRESSIVE: Progressive

Defined in: types.ts:508

Deprecated ​

Use FrameType.Progressive instead.


FourCC ​

FourCC: typeof FourCC

Defined in: types.ts:518

Enum: FourCC pixel/audio formats used in frames.


FOURCC_BGRA ​

FOURCC_BGRA: BGRA

Defined in: types.ts:534

Deprecated ​

Use FourCC.BGRA instead.


FOURCC_BGRX ​

FOURCC_BGRX: BGRX

Defined in: types.ts:536

Deprecated ​

Use FourCC.BGRX instead.


FOURCC_FLTp ​

FOURCC_FLTp: FLTp

Defined in: types.ts:542

Deprecated ​

Use FourCC.FLTp instead.


FOURCC_I420 ​

FOURCC_I420: I420

Defined in: types.ts:530

Deprecated ​

Use FourCC.I420 instead.


FOURCC_NV12 ​

FOURCC_NV12: NV12

Defined in: types.ts:532

Deprecated ​

Use FourCC.NV12 instead.


FOURCC_P216 ​

FOURCC_P216: P216

Defined in: types.ts:524

Deprecated ​

Use FourCC.P216 instead.


FOURCC_PA16 ​

FOURCC_PA16: PA16

Defined in: types.ts:526

Deprecated ​

Use FourCC.PA16 instead.


FOURCC_RGBA ​

FOURCC_RGBA: RGBA

Defined in: types.ts:538

Deprecated ​

Use FourCC.RGBA instead.


FOURCC_RGBX ​

FOURCC_RGBX: RGBX

Defined in: types.ts:540

Deprecated ​

Use FourCC.RGBX instead.


FOURCC_UYVA ​

FOURCC_UYVA: UYVA

Defined in: types.ts:522

Deprecated ​

Use FourCC.UYVA instead.


FOURCC_UYVY ​

FOURCC_UYVY: UYVY

Defined in: types.ts:520

Deprecated ​

Use FourCC.UYVY instead.


FOURCC_YV12 ​

FOURCC_YV12: YV12

Defined in: types.ts:528

Deprecated ​

Use FourCC.YV12 instead.


FrameType ​

FrameType: typeof FrameType

Defined in: types.ts:506

Enum: video frame format types (progressive/interlaced/fields).


TIMECODE_SYNTHESIZE ​

TIMECODE_SYNTHESIZE: bigint

Defined in: types.ts:548

NDI sentinel that asks the SDK to synthesize the timecode.

See ​

Synthesized timecode in the NDI SDK documentation

Methods ​

destroy() ​

destroy(): boolean

Defined in: types.ts:386

Optionally shuts down the process-global NDI library. When managing the lifecycle explicitly, destroy all native objects first.

Returns ​

boolean

true after requesting shutdown.

Example ​

js
import grandi from "grandi";
grandi.destroy();

find() ​

find(params?): Promise<Finder>

Defined in: types.ts:461

Creates a finder to discover NDI sources on the network.

Parameters ​

params? ​

FindOptions

Discovery options.

Returns ​

Promise<Finder>

A promise that resolves to a Finder instance.

Throws ​

Promise rejects on unsupported platform/CPU or if the finder cannot be created.

Example ​

js
import grandi from "grandi";
grandi.initialize();
const finder = await grandi.find({ showLocalSources: true });
await finder.wait(1000);
console.log(finder.sources());
finder.destroy();

frameSync() ​

frameSync(receiver): Promise<FrameSync>

Defined in: types.ts:428

Creates an NDI frame-synchronizer (time base corrector) backed by an existing receiver. While it exists, direct video, audio, and data captures on that receiver are unavailable; metadata and control methods such as tally remain usable. Destroy the frame-sync before the receiver. Direct capture becomes available again after the frame-sync is destroyed.

Parameters ​

receiver ​

Receiver

Returns ​

Promise<FrameSync>


initialize() ​

initialize(): boolean

Defined in: types.ts:374

Optionally initializes the process-global NDI library. The SDK does not require this call, but eager initialization is recommended when the application explicitly manages startup and shutdown.

Returns ​

boolean

true if initialization succeeded and the CPU is supported.

Example ​

js
import grandi from "grandi";
if (!grandi.initialize()) throw new Error("NDI init failed");

isSupportedCPU() ​

isSupportedCPU(): boolean

Defined in: types.ts:361

Checks if the current CPU architecture is supported by NDI.

Returns ​

boolean

true when NDI is supported on this CPU/platform.

Example ​

js
import grandi from "grandi";
if (!grandi.isSupportedCPU()) throw new Error("NDI unsupported here");

receive() ​

receive(params): Promise<Receiver>

Defined in: types.ts:420

Creates an NDI receiver for receiving video and audio from an NDI source.

Parameters ​

params ​

ReceiveOptions

Receiver options.

Returns ​

Promise<Receiver>

A promise that resolves to a Receiver instance.

Throws ​

Promise rejects on unsupported platform/CPU or if receiver creation fails.

Example ​

js
import grandi from "grandi";
grandi.initialize();
const finder = await grandi.find({ showLocalSources: true });
await finder.wait(1000);
const source = finder.sources()[0];
finder.destroy();
const receiver = await grandi.receive({ source });
const frame = await receiver.video(1000);
receiver.destroy();

routing() ​

routing(params): Promise<Routing>

Defined in: types.ts:444

Creates an NDI router for switching between different NDI sources.

Parameters ​

params ​

Router options.

groups? ​

string

name? ​

string

Returns ​

Promise<Routing>

A promise that resolves to a Routing instance.

Throws ​

Promise rejects on unsupported platform/CPU or if routing creation fails.

Example ​

js
import grandi from "grandi";
grandi.initialize();
const router = await grandi.routing({ name: "My Router" });
// router.change(source) to route a discovered source
router.destroy();

send() ​

send(params): Promise<Sender>

Defined in: types.ts:400

Creates an NDI sender for transmitting video and audio over the network.

Parameters ​

params ​

SendOptions

Sender options.

Returns ​

Promise<Sender>

A promise that resolves to a Sender instance.

Throws ​

Promise rejects on unsupported platform/CPU or if sender creation fails.

Example ​

js
import grandi from "grandi";
grandi.initialize();
const sender = await grandi.send({ name: "My Source" });

version() ​

version(): string

Defined in: types.ts:350

Gets the NDI SDK version string (e.g. "NDI SDK 6.0.0.0").

Returns ​

string

The NDI SDK version string.

Example ​

js
import grandi from "grandi";
console.log(grandi.version());

Apache-2.0 licensed. NDI is a trademark of Vizrt NDI AB.