@formant/realtime-sdk 0.0.19 → 1.0.0
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/LICENSE.txt +19 -0
- package/README.md +43 -0
- package/dist/{common → client}/Credentials.d.ts +1 -1
- package/dist/common/BaseClient.d.ts +4 -3
- package/dist/common/LogReporter.d.ts +1 -3
- package/dist/common/LruCache.d.ts +1 -1
- package/dist/common/PromiseLruCache.d.ts +1 -1
- package/dist/common/ResponseError.d.ts +3 -2
- package/dist/common/StatsManager.d.ts +1 -1
- package/dist/common/StatsReporter.d.ts +7 -6
- package/dist/common/config/index.d.ts +2 -0
- package/dist/common/defined.d.ts +3 -0
- package/dist/common/isErrorType.d.ts +1 -0
- package/dist/common/narrowError.d.ts +1 -1
- package/dist/common/redact.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/AnnotationAreaType.d.ts +2 -0
- package/dist/model/CognitoRegion.d.ts +2 -0
- package/dist/model/Feature.d.ts +2 -2
- package/dist/model/HealthStatus.d.ts +2 -0
- package/dist/model/HexRgbColor.d.ts +1 -0
- package/dist/model/IAnnotationAreaTypeMap.d.ts +4 -0
- package/dist/model/IBattery.d.ts +6 -0
- package/dist/model/IBitset.d.ts +4 -0
- package/dist/model/IBoundingBox.d.ts +6 -0
- package/dist/model/IDictionary.d.ts +3 -0
- package/dist/model/IFile.d.ts +6 -0
- package/dist/model/IFilter.d.ts +10 -0
- package/dist/model/IGoal.d.ts +5 -0
- package/dist/model/IHealth.d.ts +5 -0
- package/dist/model/IImage.d.ts +6 -0
- package/dist/model/IImageAnnotation.d.ts +9 -0
- package/dist/model/ILocalization.d.ts +14 -0
- package/dist/model/ILocation.d.ts +6 -0
- package/dist/model/IMap.d.ts +10 -0
- package/dist/model/INumericSetEntry.d.ts +5 -0
- package/dist/model/IOdometry.d.ts +7 -0
- package/dist/model/IPath.d.ts +5 -0
- package/dist/model/IPoint.d.ts +1 -1
- package/dist/model/IPointCloud.d.ts +6 -0
- package/dist/model/IRtcSession.d.ts +1 -1
- package/dist/model/IRtcStream.d.ts +1 -0
- package/dist/model/IScopeFilter.d.ts +6 -0
- package/dist/model/IStreamTypeMap.d.ts +27 -0
- package/dist/model/ITagSets.d.ts +3 -0
- package/dist/model/ITags.d.ts +2 -3
- package/dist/model/ITransformNode.d.ts +8 -0
- package/dist/model/IUser.d.ts +18 -4
- package/dist/model/IUserScope.d.ts +16 -0
- package/dist/model/IVideo.d.ts +7 -0
- package/dist/model/IsoDate.d.ts +1 -1
- package/dist/model/LanguageType.d.ts +2 -0
- package/dist/model/LogLevel.d.ts +1 -1
- package/dist/model/Marker3DAction.d.ts +1 -1
- package/dist/model/Marker3DType.d.ts +1 -1
- package/dist/model/OrganizationPlan.d.ts +1 -1
- package/dist/model/RequireKeys.d.ts +3 -0
- package/dist/model/RtcConnectionStatus.d.ts +1 -1
- package/dist/model/RtcIceServerProtocol.d.ts +1 -1
- package/dist/model/RtcIceTransportPolicy.d.ts +1 -1
- package/dist/model/RtcStreamType.d.ts +2 -2
- package/dist/model/SmsOptInStatus.d.ts +2 -0
- package/dist/model/StreamType.d.ts +2 -0
- package/dist/model/Timeout.d.ts +1 -1
- package/dist/model/Timestamp.d.ts +1 -1
- package/dist/model/Uuid.d.ts +1 -1
- package/dist/model/VideoMimeType.d.ts +2 -0
- package/dist/model/cognitoRegions.d.ts +1 -0
- package/dist/model/features.d.ts +1 -1
- package/dist/model/healthStatuses.d.ts +5 -0
- package/dist/model/languageTypes.d.ts +1 -0
- package/dist/model/rtcStreamTypes.d.ts +2 -1
- package/dist/model/smsOptInStatuses.d.ts +1 -0
- package/dist/model/videoMimeTypes.d.ts +1 -0
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.d.ts +106 -120
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.js +27 -175
- package/dist/protos/api/signaling/v1/signaling_pb.js +7 -1
- package/dist/realtime-sdk/src/index.d.ts +10 -10
- package/dist/rtc-client/DeadlineEnforcer.d.ts +4 -0
- package/dist/rtc-client/DeadlineReachedError.d.ts +3 -0
- package/dist/rtc-client/IHasPeerConnection.d.ts +3 -0
- package/dist/rtc-client/IHasRemoteDeviceId.d.ts +4 -0
- package/dist/rtc-client/RtcClient.d.ts +3 -0
- package/dist/rtc-client/RtcClientV1.d.ts +1 -0
- package/dist/rtc-client/RtcConnection.d.ts +18 -14
- package/dist/rtc-client/RtcConnectionV1.d.ts +2 -1
- package/dist/rtc-client/RtcSessionMetrics.d.ts +5 -4
- package/dist/rtc-client/RtcSessionMetricsV1.d.ts +8 -6
- package/dist/rtc-client/gatherPingMetrics.d.ts +2 -2
- package/dist/rtc-client/models/IIceMode.d.ts +1 -1
- package/dist/rtc-client/models/IRtcClientConfiguration.d.ts +1 -1
- package/dist/rtc-client/models/IRtcConnectionConfiguration.d.ts +1 -1
- package/dist/rtc-client/models/IRtcStreamPayload.d.ts +2 -0
- package/dist/rtc-client/models/IStreamControl.d.ts +1 -1
- package/dist/rtc-client/models/RtcChannelLabel.d.ts +1 -1
- package/dist/rtc-client/models/RtcCommunicationType.d.ts +1 -1
- package/dist/rtc-client/utils/assertHasPeerConnection.d.ts +1 -0
- package/dist/rtc-client/utils/garbageCollect.d.ts +1 -0
- package/dist/rtc-client/utils/getErrorMessage.d.ts +1 -0
- package/dist/rtc-client/utils/partition.d.ts +1 -0
- package/dist/ui/utils/browser.d.ts +1 -1
- package/package.json +3 -3
- package/dist/protos/api/signaling/v1/signaling_grpc_pb.js +0 -276
|
@@ -29,6 +29,8 @@ export declare class RtcClient {
|
|
|
29
29
|
private isConnectionInitiator;
|
|
30
30
|
private isOutgoingConnection;
|
|
31
31
|
private peerDataChannelListeners;
|
|
32
|
+
private rtcInstancesConstructed;
|
|
33
|
+
private statsLoopsExecuted;
|
|
32
34
|
constructor(config: IRtcClientConfiguration);
|
|
33
35
|
send(remotePeerId: Uuid, message: IRtcStreamMessage, config: IRtcSendConfiguration): void;
|
|
34
36
|
controlRemoteStream(remotePeerId: Uuid, streamControl: IStreamControl): void;
|
|
@@ -61,6 +63,7 @@ export declare class RtcClient {
|
|
|
61
63
|
private closeConnections;
|
|
62
64
|
private getActiveConnection;
|
|
63
65
|
private update;
|
|
66
|
+
private gatherConnectionStats;
|
|
64
67
|
private reset;
|
|
65
68
|
private updateIceServers;
|
|
66
69
|
private setupHandlers;
|
|
@@ -17,6 +17,7 @@ export declare class RtcClientV1 {
|
|
|
17
17
|
private updateInterval;
|
|
18
18
|
private connections;
|
|
19
19
|
private connectingSessions;
|
|
20
|
+
private rtcInstancesConstructed;
|
|
20
21
|
constructor(config: IRtcClientConfigurationV1);
|
|
21
22
|
send(peerId: Uuid, message: IRtcStreamMessage, config: IRtcSendConfiguration): void;
|
|
22
23
|
controlRemoteStream(peerId: Uuid, streamControl: IStreamControl): void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Timestamp } from "../model/Timestamp";
|
|
2
2
|
import { Uuid } from "../model/Uuid";
|
|
3
3
|
import { Signal } from "../protos/api/signaling/v1/signaling_pb";
|
|
4
|
+
import { IHasPeerConnection } from "./IHasPeerConnection";
|
|
5
|
+
import { IHasRemoteDeviceId } from "./IHasRemoteDeviceId";
|
|
4
6
|
import { IPingInfo } from "./models/IPingInfo";
|
|
5
7
|
import { IRtcConnectionConfiguration } from "./models/IRtcConnectionConfiguration";
|
|
6
8
|
import { IRtcConnectionStatsInfo } from "./models/IRtcConnectionStatsInfo";
|
|
@@ -8,8 +10,8 @@ import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration";
|
|
|
8
10
|
import { IRtcSessionMetricsMessageCounts } from "./models/IRtcSessionMetricsMessageCounts";
|
|
9
11
|
import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
|
|
10
12
|
import { IStreamControl } from "./models/IStreamControl";
|
|
11
|
-
export declare class RtcConnection {
|
|
12
|
-
|
|
13
|
+
export declare class RtcConnection implements IHasPeerConnection, IHasRemoteDeviceId {
|
|
14
|
+
private iceServers;
|
|
13
15
|
private config;
|
|
14
16
|
private dataChannelNotifier;
|
|
15
17
|
private readonly connectTimeoutMs;
|
|
@@ -21,20 +23,16 @@ export declare class RtcConnection {
|
|
|
21
23
|
private readonly reassemblyTimeoutMs;
|
|
22
24
|
private readonly reassemblyTableCleanupMs;
|
|
23
25
|
private readonly heartbeatTimeoutMs;
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
private
|
|
27
|
-
private
|
|
28
|
-
private
|
|
26
|
+
private _peerConnection;
|
|
27
|
+
get peerConnection(): RTCPeerConnection;
|
|
28
|
+
private heartbeatChannel;
|
|
29
|
+
private latestTtlStreamChannel;
|
|
30
|
+
private reliableStreamChannel;
|
|
31
|
+
private latestReliableStreamChannel;
|
|
32
|
+
private latestTryOnceStreamChannel;
|
|
29
33
|
private streamLatestTimestamp;
|
|
30
34
|
private reassemblyTable;
|
|
31
35
|
private reassemblyTableLastTimestamp;
|
|
32
|
-
private reassemblyTableCleanupTimeout;
|
|
33
|
-
private pingUpdateTimeout;
|
|
34
|
-
private pingV2UpdateTimeout;
|
|
35
|
-
private pingV2MetricsGatherTimeout;
|
|
36
|
-
private streamsInfoUpdateTimeout;
|
|
37
|
-
private heartbeatTimeout;
|
|
38
36
|
private pingTimeMs;
|
|
39
37
|
private lastMessageTimestamp;
|
|
40
38
|
private sessionMetrics;
|
|
@@ -43,7 +41,13 @@ export declare class RtcConnection {
|
|
|
43
41
|
private hasIceCandidate;
|
|
44
42
|
private pingV2Map;
|
|
45
43
|
private pingInfo;
|
|
46
|
-
|
|
44
|
+
private readonly reassemblyTableCleanupTimeout;
|
|
45
|
+
private readonly pingUpdateTimeout;
|
|
46
|
+
private readonly pingV2UpdateTimeout;
|
|
47
|
+
private readonly pingV2MetricsGatherTimeout;
|
|
48
|
+
private readonly streamsInfoUpdateTimeout;
|
|
49
|
+
private readonly heartbeatTimeout;
|
|
50
|
+
constructor(peerConnection: RTCPeerConnection, iceServers: RTCIceServer[], config: IRtcConnectionConfiguration, dataChannelNotifier: (channel: RTCDataChannel) => void);
|
|
47
51
|
handleSignal(signal: Signal): Promise<Signal | undefined>;
|
|
48
52
|
/**
|
|
49
53
|
* Sends a message to the remote peer.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IRtcSignal } from "../model/IRtcSignal";
|
|
2
|
+
import { IHasPeerConnection } from "./IHasPeerConnection";
|
|
2
3
|
import { IRtcConnectionConfigurationV1 } from "./models-v1/IRtcConnectionConfigurationV1";
|
|
3
4
|
import { IIceMode } from "./models/IIceMode";
|
|
4
5
|
import { IRtcSendConfiguration } from "./models/IRtcSendConfiguration";
|
|
5
6
|
import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
|
|
6
7
|
import { IStreamControl } from "./models/IStreamControl";
|
|
7
|
-
export declare class RtcConnectionV1 {
|
|
8
|
+
export declare class RtcConnectionV1 implements IHasPeerConnection {
|
|
8
9
|
peerConnection: RTCPeerConnection;
|
|
9
10
|
private config;
|
|
10
11
|
iceMode?: IIceMode;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { Timestamp } from "../model/Timestamp";
|
|
2
|
+
import { IHasPeerConnection } from "./IHasPeerConnection";
|
|
3
|
+
import { IHasRemoteDeviceId } from "./IHasRemoteDeviceId";
|
|
2
4
|
import { IRtcSessionMetricsMessageCounts } from "./models/IRtcSessionMetricsMessageCounts";
|
|
3
5
|
import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
|
|
4
6
|
import { IRtcStreamsInfo } from "./models/IRtcStreamsInfo";
|
|
5
|
-
import { RtcConnection } from "./RtcConnection";
|
|
6
7
|
export declare class RtcSessionMetrics {
|
|
7
|
-
private sessionId;
|
|
8
|
-
private connection;
|
|
9
8
|
counts: IRtcSessionMetricsMessageCounts;
|
|
10
|
-
|
|
9
|
+
private readonly sessionId;
|
|
10
|
+
private readonly connection;
|
|
11
|
+
constructor(sessionId: string, connection: IHasPeerConnection & IHasRemoteDeviceId);
|
|
11
12
|
updateRemoteMessagesCounts(message: IRtcStreamMessage): void;
|
|
12
13
|
getLocalStreamsInfo(timestamp: Timestamp): IRtcStreamsInfo;
|
|
13
14
|
incrementLocalSent(message: IRtcStreamMessage): void;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { IHasPeerConnection } from "./IHasPeerConnection";
|
|
1
2
|
import { IRtcStreamMessage } from "./models/IRtcStreamMessage";
|
|
2
|
-
|
|
3
|
+
type IRtcConnectionV1 = IHasPeerConnection;
|
|
3
4
|
export declare class RtcSessionMetricsV1 {
|
|
4
|
-
private
|
|
5
|
-
private
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
constructor(sessionId: string, connection:
|
|
5
|
+
private readonly sentMessagesCounts;
|
|
6
|
+
private readonly receivedMessagesCounts;
|
|
7
|
+
private readonly sessionId;
|
|
8
|
+
private readonly connection;
|
|
9
|
+
constructor(sessionId: string, connection: IRtcConnectionV1);
|
|
9
10
|
incrementMessageSent(message: IRtcStreamMessage): void;
|
|
10
11
|
incrementMessageReceived(message: IRtcStreamMessage): void;
|
|
11
12
|
uploadMetrics(): Promise<void>;
|
|
12
13
|
}
|
|
14
|
+
export {};
|
|
@@ -8,8 +8,8 @@ export interface IPingPong {
|
|
|
8
8
|
sent: Timestamp;
|
|
9
9
|
received: Timestamp;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type PingValue = IPing | IPingPong;
|
|
12
|
+
export type PingMap = Map<Uuid, PingValue>;
|
|
13
13
|
interface IGatherPingV2MetricsOptions {
|
|
14
14
|
temporalNow?: number;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type IIceMode = "local" | "STUN" | "TURN";
|
|
@@ -3,7 +3,7 @@ import { Uuid } from "../../model/Uuid";
|
|
|
3
3
|
import { SignalingPromiseClient } from "../../protos/api/signaling/v1/signaling_grpc_web_pb";
|
|
4
4
|
import { SessionType } from "../../protos/api/signaling/v1/signaling_pb";
|
|
5
5
|
import { IRtcStreamMessage } from "./IRtcStreamMessage";
|
|
6
|
-
export
|
|
6
|
+
export type IRtcClientConfiguration = {
|
|
7
7
|
receive: (peerId: Uuid, message: IRtcStreamMessage) => void;
|
|
8
8
|
onStreamsInfoUpdate?: (peerId: Uuid, timestamp: Timestamp) => void;
|
|
9
9
|
alternateRTCPeerConnection?: typeof RTCPeerConnection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IRtcConnectionBaseConfiguration } from "./IRtcConnectionBaseConfiguration";
|
|
2
2
|
import { IRtcConnectionRemoteConfiguration } from "./IRtcConnectionRemoteConfiguration";
|
|
3
|
-
export
|
|
3
|
+
export type IRtcConnectionConfiguration = {
|
|
4
4
|
baseConfig: IRtcConnectionBaseConfiguration;
|
|
5
5
|
remoteConfig?: IRtcConnectionRemoteConfiguration;
|
|
6
6
|
};
|
|
@@ -5,6 +5,7 @@ import { IH264VideoFrame } from "../../model/IH264VideoFrame";
|
|
|
5
5
|
import { IJointState } from "../../model/IJointState";
|
|
6
6
|
import { IJsonString } from "../../model/IJsonString";
|
|
7
7
|
import { IMarker3DArray } from "../../model/IMarker3DArray";
|
|
8
|
+
import { IOdometry } from "../../model/IOdometry";
|
|
8
9
|
import { IPoint } from "../../model/IPoint";
|
|
9
10
|
import { IPoseWithCovariance } from "../../model/IPoseWithCovariance";
|
|
10
11
|
import { ITransform } from "../../model/ITransform";
|
|
@@ -45,4 +46,5 @@ export interface IRtcStreamPayload {
|
|
|
45
46
|
point?: IPoint;
|
|
46
47
|
markerArray?: IMarker3DArray;
|
|
47
48
|
jsonString?: IJsonString;
|
|
49
|
+
odometry?: IOdometry;
|
|
48
50
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const rtcPipelineType = "rtc";
|
|
2
2
|
export declare const telemetryPipelineType = "telemetry";
|
|
3
|
-
export
|
|
3
|
+
export type IStreamControl = IRtcStreamControl | ITelemetryStreamControl | IDegradeVideoStreamControl | IAudioStreamControl | ISetLowBandwidthMode;
|
|
4
4
|
export interface IStreamControlBase {
|
|
5
5
|
streamName: string;
|
|
6
6
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { rtcChannelLabels } from "./rtcChannelLabels";
|
|
2
|
-
export
|
|
2
|
+
export type RtcChannelLabel = (typeof rtcChannelLabels)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RtcCommunicationType = "message" | "message-chunk";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function assertHasPeerConnection(it: RTCPeerConnection | null): asserts it is RTCPeerConnection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function forceGarbageCollection(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function partition<T>(source: T[], predicate: (_: T, idx: number, array: T[]) => boolean): [T[], T[]];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type BrowserType = "Firefox" | "Chrome" | "Edge" | "Safari" | "IE" | "Other";
|
|
2
2
|
export declare function browser(): BrowserType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formant/realtime-sdk",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/realtime-sdk/src/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"make-protos": "cd ../../../ && make protos && cd -"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"env-var": "^7.3.
|
|
18
|
+
"env-var": "^7.3.1",
|
|
19
19
|
"@types/google-protobuf": "~3.7.0",
|
|
20
20
|
"grpc-web": "^1.2.1"
|
|
21
21
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"circular-dependency-plugin": "^5.2.2",
|
|
29
29
|
"copy-webpack-plugin": "^6.4.1",
|
|
30
30
|
"file-loader": "^5.1.0",
|
|
31
|
-
"fork-ts-checker-webpack-plugin": "^6.5.
|
|
31
|
+
"fork-ts-checker-webpack-plugin": "^6.5.3",
|
|
32
32
|
"terser-webpack-plugin": "^2.3.5",
|
|
33
33
|
"ts-loader": "^6.2.1",
|
|
34
34
|
"tsc-alias": "^1.4.1",
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
// GENERATED CODE -- DO NOT EDIT!
|
|
2
|
-
|
|
3
|
-
'use strict';
|
|
4
|
-
var grpc = require('@grpc/grpc-js');
|
|
5
|
-
var protos_api_signaling_v1_signaling_pb = require('../../../../protos/api/signaling/v1/signaling_pb.js');
|
|
6
|
-
var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
|
|
7
|
-
|
|
8
|
-
function serialize_v1_signaling_api_CreatePeerRequest(arg) {
|
|
9
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.CreatePeerRequest)) {
|
|
10
|
-
throw new Error('Expected argument of type v1.signaling.api.CreatePeerRequest');
|
|
11
|
-
}
|
|
12
|
-
return Buffer.from(arg.serializeBinary());
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function deserialize_v1_signaling_api_CreatePeerRequest(buffer_arg) {
|
|
16
|
-
return protos_api_signaling_v1_signaling_pb.CreatePeerRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function serialize_v1_signaling_api_CreatePeerResponse(arg) {
|
|
20
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.CreatePeerResponse)) {
|
|
21
|
-
throw new Error('Expected argument of type v1.signaling.api.CreatePeerResponse');
|
|
22
|
-
}
|
|
23
|
-
return Buffer.from(arg.serializeBinary());
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function deserialize_v1_signaling_api_CreatePeerResponse(buffer_arg) {
|
|
27
|
-
return protos_api_signaling_v1_signaling_pb.CreatePeerResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function serialize_v1_signaling_api_DeletePeerRequest(arg) {
|
|
31
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.DeletePeerRequest)) {
|
|
32
|
-
throw new Error('Expected argument of type v1.signaling.api.DeletePeerRequest');
|
|
33
|
-
}
|
|
34
|
-
return Buffer.from(arg.serializeBinary());
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
function deserialize_v1_signaling_api_DeletePeerRequest(buffer_arg) {
|
|
38
|
-
return protos_api_signaling_v1_signaling_pb.DeletePeerRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function serialize_v1_signaling_api_DeletePeerResponse(arg) {
|
|
42
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.DeletePeerResponse)) {
|
|
43
|
-
throw new Error('Expected argument of type v1.signaling.api.DeletePeerResponse');
|
|
44
|
-
}
|
|
45
|
-
return Buffer.from(arg.serializeBinary());
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function deserialize_v1_signaling_api_DeletePeerResponse(buffer_arg) {
|
|
49
|
-
return protos_api_signaling_v1_signaling_pb.DeletePeerResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function serialize_v1_signaling_api_GetHealthRequest(arg) {
|
|
53
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetHealthRequest)) {
|
|
54
|
-
throw new Error('Expected argument of type v1.signaling.api.GetHealthRequest');
|
|
55
|
-
}
|
|
56
|
-
return Buffer.from(arg.serializeBinary());
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function deserialize_v1_signaling_api_GetHealthRequest(buffer_arg) {
|
|
60
|
-
return protos_api_signaling_v1_signaling_pb.GetHealthRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function serialize_v1_signaling_api_GetHealthResponse(arg) {
|
|
64
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetHealthResponse)) {
|
|
65
|
-
throw new Error('Expected argument of type v1.signaling.api.GetHealthResponse');
|
|
66
|
-
}
|
|
67
|
-
return Buffer.from(arg.serializeBinary());
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function deserialize_v1_signaling_api_GetHealthResponse(buffer_arg) {
|
|
71
|
-
return protos_api_signaling_v1_signaling_pb.GetHealthResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
function serialize_v1_signaling_api_GetIceServersRequest(arg) {
|
|
75
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetIceServersRequest)) {
|
|
76
|
-
throw new Error('Expected argument of type v1.signaling.api.GetIceServersRequest');
|
|
77
|
-
}
|
|
78
|
-
return Buffer.from(arg.serializeBinary());
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function deserialize_v1_signaling_api_GetIceServersRequest(buffer_arg) {
|
|
82
|
-
return protos_api_signaling_v1_signaling_pb.GetIceServersRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function serialize_v1_signaling_api_GetIceServersResponse(arg) {
|
|
86
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetIceServersResponse)) {
|
|
87
|
-
throw new Error('Expected argument of type v1.signaling.api.GetIceServersResponse');
|
|
88
|
-
}
|
|
89
|
-
return Buffer.from(arg.serializeBinary());
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function deserialize_v1_signaling_api_GetIceServersResponse(buffer_arg) {
|
|
93
|
-
return protos_api_signaling_v1_signaling_pb.GetIceServersResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function serialize_v1_signaling_api_GetPeersRequest(arg) {
|
|
97
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetPeersRequest)) {
|
|
98
|
-
throw new Error('Expected argument of type v1.signaling.api.GetPeersRequest');
|
|
99
|
-
}
|
|
100
|
-
return Buffer.from(arg.serializeBinary());
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function deserialize_v1_signaling_api_GetPeersRequest(buffer_arg) {
|
|
104
|
-
return protos_api_signaling_v1_signaling_pb.GetPeersRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function serialize_v1_signaling_api_GetPeersResponse(arg) {
|
|
108
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.GetPeersResponse)) {
|
|
109
|
-
throw new Error('Expected argument of type v1.signaling.api.GetPeersResponse');
|
|
110
|
-
}
|
|
111
|
-
return Buffer.from(arg.serializeBinary());
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function deserialize_v1_signaling_api_GetPeersResponse(buffer_arg) {
|
|
115
|
-
return protos_api_signaling_v1_signaling_pb.GetPeersResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function serialize_v1_signaling_api_ReceiveSignalStreamRequest(arg) {
|
|
119
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamRequest)) {
|
|
120
|
-
throw new Error('Expected argument of type v1.signaling.api.ReceiveSignalStreamRequest');
|
|
121
|
-
}
|
|
122
|
-
return Buffer.from(arg.serializeBinary());
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
function deserialize_v1_signaling_api_ReceiveSignalStreamRequest(buffer_arg) {
|
|
126
|
-
return protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
function serialize_v1_signaling_api_ReceiveSignalStreamResponse(arg) {
|
|
130
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamResponse)) {
|
|
131
|
-
throw new Error('Expected argument of type v1.signaling.api.ReceiveSignalStreamResponse');
|
|
132
|
-
}
|
|
133
|
-
return Buffer.from(arg.serializeBinary());
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function deserialize_v1_signaling_api_ReceiveSignalStreamResponse(buffer_arg) {
|
|
137
|
-
return protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
function serialize_v1_signaling_api_RefreshPeerRequest(arg) {
|
|
141
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.RefreshPeerRequest)) {
|
|
142
|
-
throw new Error('Expected argument of type v1.signaling.api.RefreshPeerRequest');
|
|
143
|
-
}
|
|
144
|
-
return Buffer.from(arg.serializeBinary());
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function deserialize_v1_signaling_api_RefreshPeerRequest(buffer_arg) {
|
|
148
|
-
return protos_api_signaling_v1_signaling_pb.RefreshPeerRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function serialize_v1_signaling_api_RefreshPeerResponse(arg) {
|
|
152
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.RefreshPeerResponse)) {
|
|
153
|
-
throw new Error('Expected argument of type v1.signaling.api.RefreshPeerResponse');
|
|
154
|
-
}
|
|
155
|
-
return Buffer.from(arg.serializeBinary());
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function deserialize_v1_signaling_api_RefreshPeerResponse(buffer_arg) {
|
|
159
|
-
return protos_api_signaling_v1_signaling_pb.RefreshPeerResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function serialize_v1_signaling_api_SendSignalRequest(arg) {
|
|
163
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.SendSignalRequest)) {
|
|
164
|
-
throw new Error('Expected argument of type v1.signaling.api.SendSignalRequest');
|
|
165
|
-
}
|
|
166
|
-
return Buffer.from(arg.serializeBinary());
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function deserialize_v1_signaling_api_SendSignalRequest(buffer_arg) {
|
|
170
|
-
return protos_api_signaling_v1_signaling_pb.SendSignalRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
function serialize_v1_signaling_api_SendSignalResponse(arg) {
|
|
174
|
-
if (!(arg instanceof protos_api_signaling_v1_signaling_pb.SendSignalResponse)) {
|
|
175
|
-
throw new Error('Expected argument of type v1.signaling.api.SendSignalResponse');
|
|
176
|
-
}
|
|
177
|
-
return Buffer.from(arg.serializeBinary());
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function deserialize_v1_signaling_api_SendSignalResponse(buffer_arg) {
|
|
181
|
-
return protos_api_signaling_v1_signaling_pb.SendSignalResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
var SignalingService = exports.SignalingService = {
|
|
186
|
-
getHealth: {
|
|
187
|
-
path: '/v1.signaling.api.Signaling/GetHealth',
|
|
188
|
-
requestStream: false,
|
|
189
|
-
responseStream: false,
|
|
190
|
-
requestType: protos_api_signaling_v1_signaling_pb.GetHealthRequest,
|
|
191
|
-
responseType: protos_api_signaling_v1_signaling_pb.GetHealthResponse,
|
|
192
|
-
requestSerialize: serialize_v1_signaling_api_GetHealthRequest,
|
|
193
|
-
requestDeserialize: deserialize_v1_signaling_api_GetHealthRequest,
|
|
194
|
-
responseSerialize: serialize_v1_signaling_api_GetHealthResponse,
|
|
195
|
-
responseDeserialize: deserialize_v1_signaling_api_GetHealthResponse,
|
|
196
|
-
},
|
|
197
|
-
createPeer: {
|
|
198
|
-
path: '/v1.signaling.api.Signaling/CreatePeer',
|
|
199
|
-
requestStream: false,
|
|
200
|
-
responseStream: false,
|
|
201
|
-
requestType: protos_api_signaling_v1_signaling_pb.CreatePeerRequest,
|
|
202
|
-
responseType: protos_api_signaling_v1_signaling_pb.CreatePeerResponse,
|
|
203
|
-
requestSerialize: serialize_v1_signaling_api_CreatePeerRequest,
|
|
204
|
-
requestDeserialize: deserialize_v1_signaling_api_CreatePeerRequest,
|
|
205
|
-
responseSerialize: serialize_v1_signaling_api_CreatePeerResponse,
|
|
206
|
-
responseDeserialize: deserialize_v1_signaling_api_CreatePeerResponse,
|
|
207
|
-
},
|
|
208
|
-
deletePeer: {
|
|
209
|
-
path: '/v1.signaling.api.Signaling/DeletePeer',
|
|
210
|
-
requestStream: false,
|
|
211
|
-
responseStream: false,
|
|
212
|
-
requestType: protos_api_signaling_v1_signaling_pb.DeletePeerRequest,
|
|
213
|
-
responseType: protos_api_signaling_v1_signaling_pb.DeletePeerResponse,
|
|
214
|
-
requestSerialize: serialize_v1_signaling_api_DeletePeerRequest,
|
|
215
|
-
requestDeserialize: deserialize_v1_signaling_api_DeletePeerRequest,
|
|
216
|
-
responseSerialize: serialize_v1_signaling_api_DeletePeerResponse,
|
|
217
|
-
responseDeserialize: deserialize_v1_signaling_api_DeletePeerResponse,
|
|
218
|
-
},
|
|
219
|
-
refreshPeer: {
|
|
220
|
-
path: '/v1.signaling.api.Signaling/RefreshPeer',
|
|
221
|
-
requestStream: false,
|
|
222
|
-
responseStream: false,
|
|
223
|
-
requestType: protos_api_signaling_v1_signaling_pb.RefreshPeerRequest,
|
|
224
|
-
responseType: protos_api_signaling_v1_signaling_pb.RefreshPeerResponse,
|
|
225
|
-
requestSerialize: serialize_v1_signaling_api_RefreshPeerRequest,
|
|
226
|
-
requestDeserialize: deserialize_v1_signaling_api_RefreshPeerRequest,
|
|
227
|
-
responseSerialize: serialize_v1_signaling_api_RefreshPeerResponse,
|
|
228
|
-
responseDeserialize: deserialize_v1_signaling_api_RefreshPeerResponse,
|
|
229
|
-
},
|
|
230
|
-
getPeers: {
|
|
231
|
-
path: '/v1.signaling.api.Signaling/GetPeers',
|
|
232
|
-
requestStream: false,
|
|
233
|
-
responseStream: false,
|
|
234
|
-
requestType: protos_api_signaling_v1_signaling_pb.GetPeersRequest,
|
|
235
|
-
responseType: protos_api_signaling_v1_signaling_pb.GetPeersResponse,
|
|
236
|
-
requestSerialize: serialize_v1_signaling_api_GetPeersRequest,
|
|
237
|
-
requestDeserialize: deserialize_v1_signaling_api_GetPeersRequest,
|
|
238
|
-
responseSerialize: serialize_v1_signaling_api_GetPeersResponse,
|
|
239
|
-
responseDeserialize: deserialize_v1_signaling_api_GetPeersResponse,
|
|
240
|
-
},
|
|
241
|
-
getIceServers: {
|
|
242
|
-
path: '/v1.signaling.api.Signaling/GetIceServers',
|
|
243
|
-
requestStream: false,
|
|
244
|
-
responseStream: false,
|
|
245
|
-
requestType: protos_api_signaling_v1_signaling_pb.GetIceServersRequest,
|
|
246
|
-
responseType: protos_api_signaling_v1_signaling_pb.GetIceServersResponse,
|
|
247
|
-
requestSerialize: serialize_v1_signaling_api_GetIceServersRequest,
|
|
248
|
-
requestDeserialize: deserialize_v1_signaling_api_GetIceServersRequest,
|
|
249
|
-
responseSerialize: serialize_v1_signaling_api_GetIceServersResponse,
|
|
250
|
-
responseDeserialize: deserialize_v1_signaling_api_GetIceServersResponse,
|
|
251
|
-
},
|
|
252
|
-
sendSignal: {
|
|
253
|
-
path: '/v1.signaling.api.Signaling/SendSignal',
|
|
254
|
-
requestStream: false,
|
|
255
|
-
responseStream: false,
|
|
256
|
-
requestType: protos_api_signaling_v1_signaling_pb.SendSignalRequest,
|
|
257
|
-
responseType: protos_api_signaling_v1_signaling_pb.SendSignalResponse,
|
|
258
|
-
requestSerialize: serialize_v1_signaling_api_SendSignalRequest,
|
|
259
|
-
requestDeserialize: deserialize_v1_signaling_api_SendSignalRequest,
|
|
260
|
-
responseSerialize: serialize_v1_signaling_api_SendSignalResponse,
|
|
261
|
-
responseDeserialize: deserialize_v1_signaling_api_SendSignalResponse,
|
|
262
|
-
},
|
|
263
|
-
receiveSignalStream: {
|
|
264
|
-
path: '/v1.signaling.api.Signaling/ReceiveSignalStream',
|
|
265
|
-
requestStream: false,
|
|
266
|
-
responseStream: true,
|
|
267
|
-
requestType: protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamRequest,
|
|
268
|
-
responseType: protos_api_signaling_v1_signaling_pb.ReceiveSignalStreamResponse,
|
|
269
|
-
requestSerialize: serialize_v1_signaling_api_ReceiveSignalStreamRequest,
|
|
270
|
-
requestDeserialize: deserialize_v1_signaling_api_ReceiveSignalStreamRequest,
|
|
271
|
-
responseSerialize: serialize_v1_signaling_api_ReceiveSignalStreamResponse,
|
|
272
|
-
responseDeserialize: deserialize_v1_signaling_api_ReceiveSignalStreamResponse,
|
|
273
|
-
},
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
exports.SignalingClient = grpc.makeGenericClientConstructor(SignalingService);
|