Skip to content

FallbackTransport

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:72

A transport that dials WebTransport and, unless that is ready within the WebSocket delay, QMux over WebSocket alongside it: the first ready carries the session and the other is closed. Before ready it stands in for the dials in progress; after, it is the winner’s.

readonly closed: Promise<CloseInfo>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:76

The winner’s closed; rejects with the dial’s failure when neither dial came up (TA-9).

MoqtTransport.closed


readonly incomingBidirectionalStreams: ReadableStream<BidirectionalStreamLike>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:80

The winner’s incoming bidirectional streams.

MoqtTransport.incomingBidirectionalStreams


readonly incomingUnidirectionalStreams: ReadableStream<ReadableStream<Uint8Array<ArrayBufferLike>>>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:78

The winner’s incoming unidirectional streams.

MoqtTransport.incomingUnidirectionalStreams


readonly ready: Promise<void>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:74

Resolves once one of the dials is ready; rejects with the WebSocket dial’s failure, or when closed first.

get carrier():
| FallbackCarrier
| undefined;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:103

The transport the session runs on; undefined until ready.

| FallbackCarrier | undefined


get protocol(): string;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:108

The protocol the winner’s peer selected (TA-8); empty until ready resolves.

string

MoqtTransport.protocol

close(info?): void;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:121

Close the winner (TA-10); before ready, cancel every dial in progress (TA-11).

Parameter Type
info? { closeCode?: number; reason?: string; }
info.closeCode? number
info.reason? string

void

MoqtTransport.close


createBidirectionalStream(): Promise<BidirectionalStreamLike>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:116

Open a bidirectional stream to the peer.

Promise<BidirectionalStreamLike>

MoqtTransport.createBidirectionalStream


createUnidirectionalStream(options?): Promise<WritableStream<Uint8Array<ArrayBufferLike>>>;

Defined in: relay-sdks/ts/packages/relay-websocket/src/fallback.ts:112

Open a unidirectional stream to the peer, scheduled by options.sendOrder where the transport supports it.

Parameter Type
options? MoqtSendStreamOptions

Promise<WritableStream<Uint8Array<ArrayBufferLike>>>

MoqtTransport.createUnidirectionalStream