@fishjam-cloud/ts-client 0.25.0 → 0.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +43 -0
- package/dist/index.mjs +1 -1
- package/dist/index.react-native.mjs +17 -0
- package/dist/protobufs/fishjam/media_events/peer/peer.d.ts +130 -0
- package/dist/protobufs/fishjam/media_events/peer/peer.js +1283 -0
- package/dist/protobufs/fishjam/media_events/server/server.d.ts +197 -0
- package/dist/protobufs/fishjam/media_events/server/server.js +2121 -0
- package/dist/protobufs/fishjam/media_events/shared.d.ts +48 -0
- package/dist/protobufs/fishjam/media_events/shared.js +315 -0
- package/dist/protobufs/fishjam/peer_notifications.d.ts +83 -0
- package/dist/protobufs/fishjam/peer_notifications.js +559 -0
- package/dist/ts-client/package.json +82 -0
- package/dist/ts-client/src/FishjamClient.d.ts +438 -0
- package/dist/ts-client/src/FishjamClient.js +821 -0
- package/dist/ts-client/src/auth.d.ts +3 -0
- package/dist/ts-client/src/auth.js +8 -0
- package/dist/ts-client/src/connectEventsHandler.d.ts +2 -0
- package/dist/ts-client/src/connectEventsHandler.js +22 -0
- package/dist/ts-client/src/errors.d.ts +3 -0
- package/dist/ts-client/src/errors.js +5 -0
- package/dist/ts-client/src/guards.d.ts +7 -0
- package/dist/ts-client/src/guards.js +8 -0
- package/dist/ts-client/src/index.d.ts +9 -0
- package/dist/ts-client/src/index.js +6 -0
- package/dist/ts-client/src/livestream.d.ts +20 -0
- package/dist/ts-client/src/livestream.js +78 -0
- package/dist/ts-client/src/messageQueue.d.ts +13 -0
- package/dist/ts-client/src/messageQueue.js +23 -0
- package/dist/ts-client/src/reconnection.d.ts +27 -0
- package/dist/ts-client/src/reconnection.js +124 -0
- package/dist/ts-client/src/tests/messageQueue.test.d.ts +1 -0
- package/dist/ts-client/src/tests/messageQueue.test.js +54 -0
- package/dist/ts-client/src/types.d.ts +216 -0
- package/dist/ts-client/src/types.js +1 -0
- package/dist/ts-client/src/version.d.ts +1 -0
- package/dist/ts-client/src/version.js +2 -0
- package/package.json +18 -11
package/dist/index.d.mts
CHANGED
|
@@ -9,6 +9,38 @@ declare class TrackTypeError extends Error {
|
|
|
9
9
|
constructor();
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
declare enum PeerMessage_SdkDeprecation_Status {
|
|
13
|
+
STATUS_UNSPECIFIED = 0,
|
|
14
|
+
STATUS_UP_TO_DATE = 1,
|
|
15
|
+
STATUS_DEPRECATED = 2,
|
|
16
|
+
STATUS_UNSUPPORTED = 3,
|
|
17
|
+
UNRECOGNIZED = -1
|
|
18
|
+
}
|
|
19
|
+
/** Deprecation status for SDK version */
|
|
20
|
+
interface PeerMessage_SdkDeprecation {
|
|
21
|
+
status: PeerMessage_SdkDeprecation_Status;
|
|
22
|
+
message: string;
|
|
23
|
+
}
|
|
24
|
+
declare const PeerMessage_SdkDeprecation: MessageFns$3<PeerMessage_SdkDeprecation>;
|
|
25
|
+
type Builtin$3 = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
26
|
+
type DeepPartial$3<T> = T extends Builtin$3 ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$3<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$3<U>> : T extends {} ? {
|
|
27
|
+
[K in keyof T]?: DeepPartial$3<T[K]>;
|
|
28
|
+
} : Partial<T>;
|
|
29
|
+
type KeysOfUnion$3<T> = T extends T ? keyof T : never;
|
|
30
|
+
type Exact$3<P, I extends P> = P extends Builtin$3 ? P : P & {
|
|
31
|
+
[K in keyof P]: Exact$3<P[K], I[K]>;
|
|
32
|
+
} & {
|
|
33
|
+
[K in Exclude<keyof I, KeysOfUnion$3<P>>]: never;
|
|
34
|
+
};
|
|
35
|
+
interface MessageFns$3<T> {
|
|
36
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
37
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
38
|
+
fromJSON(object: any): T;
|
|
39
|
+
toJSON(message: T): unknown;
|
|
40
|
+
create<I extends Exact$3<DeepPartial$3<T>, I>>(base?: I): T;
|
|
41
|
+
fromPartial<I extends Exact$3<DeepPartial$3<T>, I>>(object: I): T;
|
|
42
|
+
}
|
|
43
|
+
|
|
12
44
|
declare const getLogger: (enableLogging: boolean) => {
|
|
13
45
|
readonly debug: (arg: unknown, ...args: unknown[]) => void;
|
|
14
46
|
readonly warn: (arg: unknown, ...args: unknown[]) => void;
|
|
@@ -896,9 +928,17 @@ type ReconnectConfig = {
|
|
|
896
928
|
addTracksOnReconnect?: boolean;
|
|
897
929
|
};
|
|
898
930
|
|
|
931
|
+
/**
|
|
932
|
+
* Metadata attached to a track published by a peer.
|
|
933
|
+
* Sent over the signaling channel so other peers know what kind of track they're receiving.
|
|
934
|
+
* @category Tracks
|
|
935
|
+
*/
|
|
899
936
|
type TrackMetadata = {
|
|
937
|
+
/** The kind of media this track carries. */
|
|
900
938
|
type: 'camera' | 'microphone' | 'screenShareVideo' | 'screenShareAudio' | 'customVideo' | 'customAudio';
|
|
939
|
+
/** Whether the track is currently muted/disabled. */
|
|
901
940
|
paused: boolean;
|
|
941
|
+
/** The peer's display name, used in recordings. */
|
|
902
942
|
displayName?: string;
|
|
903
943
|
};
|
|
904
944
|
type GenericMetadata = Record<string, unknown> | undefined;
|
|
@@ -1171,6 +1211,7 @@ declare class FishjamClient<PeerMetadata = GenericMetadata, ServerMetadata = Gen
|
|
|
1171
1211
|
private initConnection;
|
|
1172
1212
|
private getUrl;
|
|
1173
1213
|
private initWebsocket;
|
|
1214
|
+
handleSdkDeprecation(sdkDeprecation: PeerMessage_SdkDeprecation): void;
|
|
1174
1215
|
/**
|
|
1175
1216
|
* Retrieves statistics related to the RTCPeerConnection.
|
|
1176
1217
|
* These statistics provide insights into the performance and status of the connection.
|
|
@@ -1536,9 +1577,11 @@ declare class FishjamClient<PeerMetadata = GenericMetadata, ServerMetadata = Gen
|
|
|
1536
1577
|
type ReceiveLivestreamResult = {
|
|
1537
1578
|
stream: MediaStream;
|
|
1538
1579
|
stop: () => Promise<void>;
|
|
1580
|
+
getStatistics: () => Promise<RTCStatsReport>;
|
|
1539
1581
|
};
|
|
1540
1582
|
type PublishLivestreamResult = {
|
|
1541
1583
|
stopPublishing: () => Promise<void>;
|
|
1584
|
+
getStatistics: () => Promise<RTCStatsReport>;
|
|
1542
1585
|
};
|
|
1543
1586
|
declare enum LivestreamError {
|
|
1544
1587
|
UNAUTHORIZED = "unauthorized",
|