@formant/realtime-sdk 0.0.8 → 0.0.11

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.
@@ -0,0 +1,3 @@
1
+ export interface IJsonString {
2
+ value: string;
3
+ }
@@ -17,6 +17,7 @@ export declare const rtcPoseWithCovarianceStreamType: "pose-with-covariance";
17
17
  export declare const rtcPointCloudStreamType: "point-cloud";
18
18
  export declare const rtcMarkerArrayStreamType: "marker-array";
19
19
  export declare const rtcPointStreamType: "point";
20
- export declare const rtcStreamTypes: readonly ["ping", "pong", "stream-control", "streams-info", "agent-info", "numeric", "boolean", "bitset", "twist", "compressed-image", "h264-video-frame", "audio-chunk", "pose", "goal-id", "joint-state", "pose-with-covariance", "point-cloud", "point", "marker-array"];
20
+ export declare const rtcJsonStringType: "json-string";
21
+ export declare const rtcStreamTypes: readonly ["ping", "pong", "stream-control", "streams-info", "agent-info", "numeric", "boolean", "bitset", "twist", "compressed-image", "h264-video-frame", "audio-chunk", "pose", "goal-id", "joint-state", "pose-with-covariance", "point-cloud", "point", "marker-array", "json-string"];
21
22
  export declare const rtcImageStreamTypes: string[];
22
23
  export declare const rtcSystemStreamTypes: string[];
@@ -13,7 +13,7 @@
13
13
 
14
14
  var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
- var global = Function('return this')();
16
+ var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
@@ -2,7 +2,6 @@ import { IRtcPeer } from "../model/IRtcPeer";
2
2
  import { RtcConnectionStatus } from "../model/RtcConnectionStatus";
3
3
  import { Timestamp } from "../model/Timestamp";
4
4
  import { Uuid } from "../model/Uuid";
5
- import { SessionType } from "../protos/api/signaling/v1/signaling_pb";
6
5
  import { IRtcClientConfiguration } from "./models/IRtcClientConfiguration";
7
6
  import { IRtcConnectConfiguration } from "./models/IRtcConnectConfiguration";
8
7
  import { IRtcConnectionStatsInfo } from "./models/IRtcConnectionStatsInfo";
@@ -37,7 +36,7 @@ export declare class RtcClient {
37
36
  * Connects to a peer given its id.
38
37
  * Returns the id of the session, if one is created.
39
38
  */
40
- connect(remotePeerId: Uuid, config?: IRtcConnectConfiguration, sessionType?: SessionType): Promise<Uuid | undefined>;
39
+ connect(remotePeerId: Uuid, config?: IRtcConnectConfiguration): Promise<Uuid | undefined>;
41
40
  connectLan(agentEndpoint: string): Promise<Uuid | false>;
42
41
  getConnections(): RtcConnection[];
43
42
  createCustomDataChannel(remotePeerId: Uuid, channelName: string, init: RTCDataChannelInit, isBinary: boolean, listener: (peerId: Uuid, channel: RTCDataChannel) => void): () => void;
@@ -1,6 +1,8 @@
1
1
  import { RtcIceServerProtocol } from "../../model/RtcIceServerProtocol";
2
2
  import { RtcIceTransportPolicy } from "../../model/RtcIceTransportPolicy";
3
+ import { SessionType } from "../../protos/api/signaling/v1/signaling_pb";
3
4
  export interface IRtcConnectConfiguration {
4
5
  rtcIceServerProtocol?: RtcIceServerProtocol;
5
6
  rtcIceTransportPolicies?: RtcIceTransportPolicy[];
7
+ sessionType?: SessionType;
6
8
  }
@@ -1,5 +1,6 @@
1
1
  import { Timestamp } from "../../model/Timestamp";
2
2
  import { Uuid } from "../../model/Uuid";
3
+ import { SessionType } from "../../protos/api/signaling/v1/signaling_pb";
3
4
  import { IRtcStreamMessage } from "./IRtcStreamMessage";
4
5
  export interface IRtcConnectionBaseConfiguration {
5
6
  isOffer: boolean;
@@ -8,6 +9,7 @@ export interface IRtcConnectionBaseConfiguration {
8
9
  remotePeerId: Uuid;
9
10
  localUserId?: Uuid;
10
11
  remoteDeviceId?: Uuid;
12
+ sessionType?: SessionType;
11
13
  receive: (peerId: Uuid, message: IRtcStreamMessage) => void;
12
14
  onStreamsInfoUpdate?: (peerId: Uuid, timestamp: Timestamp) => void;
13
15
  track?: (event: string, properties?: object) => void;
@@ -3,6 +3,7 @@ import { ICompressedImage } from "../../model/ICompressedImage";
3
3
  import { IGoalID } from "../../model/IGoalID";
4
4
  import { IH264VideoFrame } from "../../model/IH264VideoFrame";
5
5
  import { IJointState } from "../../model/IJointState";
6
+ import { IJsonString } from "../../model/IJsonString";
6
7
  import { IMarker3DArray } from "../../model/IMarker3DArray";
7
8
  import { IPoint } from "../../model/IPoint";
8
9
  import { IPoseWithCovariance } from "../../model/IPoseWithCovariance";
@@ -40,4 +41,5 @@ export interface IRtcStreamPayload {
40
41
  pointCloud?: IRtcPointCloud;
41
42
  point?: IPoint;
42
43
  markerArray?: IMarker3DArray;
44
+ jsonString?: IJsonString;
43
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formant/realtime-sdk",
3
- "version": "0.0.8",
3
+ "version": "0.0.11",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/realtime-sdk/src/index.d.ts",