@formant/realtime-sdk 1.0.0 → 1.2.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/README.md +10 -0
- package/dist/client/AuthClient.d.ts +1 -1
- package/dist/common/setPromiseInterval.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/model/IRtcSession.d.ts +2 -0
- package/dist/model/IUser.d.ts +1 -0
- package/dist/model/RtcSessionType.d.ts +2 -0
- package/dist/model/rtcSessionTypes.d.ts +1 -0
- package/dist/protos/api/signaling/v1/signaling.proto +17 -0
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.d.ts +12 -0
- package/dist/protos/api/signaling/v1/signaling_grpc_web_pb.js +61 -0
- package/dist/protos/api/signaling/v1/signaling_pb.d.ts +69 -0
- package/dist/protos/api/signaling/v1/signaling_pb.js +579 -1
- package/dist/realtime-sdk/src/index.d.ts +2 -0
- package/dist/rtc-client/RtcConnectionV1.d.ts +1 -1
- package/dist/rtc-client/utils/encodeStreamId.d.ts +1 -1
- package/package.json +4 -5
|
@@ -33,11 +33,14 @@ goog.exportSymbol('proto.v1.signaling.api.GetIceServersRequest', null, global);
|
|
|
33
33
|
goog.exportSymbol('proto.v1.signaling.api.GetIceServersResponse', null, global);
|
|
34
34
|
goog.exportSymbol('proto.v1.signaling.api.GetPeersRequest', null, global);
|
|
35
35
|
goog.exportSymbol('proto.v1.signaling.api.GetPeersResponse', null, global);
|
|
36
|
+
goog.exportSymbol('proto.v1.signaling.api.GetSessionsRequest', null, global);
|
|
37
|
+
goog.exportSymbol('proto.v1.signaling.api.GetSessionsResponse', null, global);
|
|
36
38
|
goog.exportSymbol('proto.v1.signaling.api.Peer', null, global);
|
|
37
39
|
goog.exportSymbol('proto.v1.signaling.api.ReceiveSignalStreamRequest', null, global);
|
|
38
40
|
goog.exportSymbol('proto.v1.signaling.api.ReceiveSignalStreamResponse', null, global);
|
|
39
41
|
goog.exportSymbol('proto.v1.signaling.api.RefreshPeerRequest', null, global);
|
|
40
42
|
goog.exportSymbol('proto.v1.signaling.api.RefreshPeerResponse', null, global);
|
|
43
|
+
goog.exportSymbol('proto.v1.signaling.api.RtcSession', null, global);
|
|
41
44
|
goog.exportSymbol('proto.v1.signaling.api.SendSignalRequest', null, global);
|
|
42
45
|
goog.exportSymbol('proto.v1.signaling.api.SendSignalResponse', null, global);
|
|
43
46
|
goog.exportSymbol('proto.v1.signaling.api.SessionType', null, global);
|
|
@@ -84,6 +87,69 @@ if (goog.DEBUG && !COMPILED) {
|
|
|
84
87
|
*/
|
|
85
88
|
proto.v1.signaling.api.Signal.displayName = 'proto.v1.signaling.api.Signal';
|
|
86
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Generated by JsPbCodeGenerator.
|
|
92
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
93
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
94
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
95
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
96
|
+
* valid.
|
|
97
|
+
* @extends {jspb.Message}
|
|
98
|
+
* @constructor
|
|
99
|
+
*/
|
|
100
|
+
proto.v1.signaling.api.RtcSession = function(opt_data) {
|
|
101
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
102
|
+
};
|
|
103
|
+
goog.inherits(proto.v1.signaling.api.RtcSession, jspb.Message);
|
|
104
|
+
if (goog.DEBUG && !COMPILED) {
|
|
105
|
+
/**
|
|
106
|
+
* @public
|
|
107
|
+
* @override
|
|
108
|
+
*/
|
|
109
|
+
proto.v1.signaling.api.RtcSession.displayName = 'proto.v1.signaling.api.RtcSession';
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Generated by JsPbCodeGenerator.
|
|
113
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
114
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
115
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
116
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
117
|
+
* valid.
|
|
118
|
+
* @extends {jspb.Message}
|
|
119
|
+
* @constructor
|
|
120
|
+
*/
|
|
121
|
+
proto.v1.signaling.api.GetSessionsRequest = function(opt_data) {
|
|
122
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
123
|
+
};
|
|
124
|
+
goog.inherits(proto.v1.signaling.api.GetSessionsRequest, jspb.Message);
|
|
125
|
+
if (goog.DEBUG && !COMPILED) {
|
|
126
|
+
/**
|
|
127
|
+
* @public
|
|
128
|
+
* @override
|
|
129
|
+
*/
|
|
130
|
+
proto.v1.signaling.api.GetSessionsRequest.displayName = 'proto.v1.signaling.api.GetSessionsRequest';
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Generated by JsPbCodeGenerator.
|
|
134
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
135
|
+
* server response, or constructed directly in Javascript. The array is used
|
|
136
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
|
137
|
+
* If no data is provided, the constructed object will be empty, but still
|
|
138
|
+
* valid.
|
|
139
|
+
* @extends {jspb.Message}
|
|
140
|
+
* @constructor
|
|
141
|
+
*/
|
|
142
|
+
proto.v1.signaling.api.GetSessionsResponse = function(opt_data) {
|
|
143
|
+
jspb.Message.initialize(this, opt_data, 0, -1, proto.v1.signaling.api.GetSessionsResponse.repeatedFields_, null);
|
|
144
|
+
};
|
|
145
|
+
goog.inherits(proto.v1.signaling.api.GetSessionsResponse, jspb.Message);
|
|
146
|
+
if (goog.DEBUG && !COMPILED) {
|
|
147
|
+
/**
|
|
148
|
+
* @public
|
|
149
|
+
* @override
|
|
150
|
+
*/
|
|
151
|
+
proto.v1.signaling.api.GetSessionsResponse.displayName = 'proto.v1.signaling.api.GetSessionsResponse';
|
|
152
|
+
}
|
|
87
153
|
/**
|
|
88
154
|
* Generated by JsPbCodeGenerator.
|
|
89
155
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
|
@@ -1174,6 +1240,517 @@ proto.v1.signaling.api.Signal.prototype.setSessionType = function(value) {
|
|
|
1174
1240
|
|
|
1175
1241
|
|
|
1176
1242
|
|
|
1243
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1244
|
+
/**
|
|
1245
|
+
* Creates an object representation of this proto.
|
|
1246
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1247
|
+
* Optional fields that are not set will be set to undefined.
|
|
1248
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1249
|
+
* For the list of reserved names please see:
|
|
1250
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1251
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1252
|
+
* JSPB instance for transitional soy proto support:
|
|
1253
|
+
* http://goto/soy-param-migration
|
|
1254
|
+
* @return {!Object}
|
|
1255
|
+
*/
|
|
1256
|
+
proto.v1.signaling.api.RtcSession.prototype.toObject = function(opt_includeInstance) {
|
|
1257
|
+
return proto.v1.signaling.api.RtcSession.toObject(opt_includeInstance, this);
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Static version of the {@see toObject} method.
|
|
1263
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1264
|
+
* the JSPB instance for transitional soy proto support:
|
|
1265
|
+
* http://goto/soy-param-migration
|
|
1266
|
+
* @param {!proto.v1.signaling.api.RtcSession} msg The msg instance to transform.
|
|
1267
|
+
* @return {!Object}
|
|
1268
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1269
|
+
*/
|
|
1270
|
+
proto.v1.signaling.api.RtcSession.toObject = function(includeInstance, msg) {
|
|
1271
|
+
var f, obj = {
|
|
1272
|
+
sessionId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
1273
|
+
offerPeerId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
1274
|
+
answerPeerId: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
|
1275
|
+
organizationId: jspb.Message.getFieldWithDefault(msg, 4, ""),
|
|
1276
|
+
sessionType: jspb.Message.getFieldWithDefault(msg, 5, "")
|
|
1277
|
+
};
|
|
1278
|
+
|
|
1279
|
+
if (includeInstance) {
|
|
1280
|
+
obj.$jspbMessageInstance = msg;
|
|
1281
|
+
}
|
|
1282
|
+
return obj;
|
|
1283
|
+
};
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
/**
|
|
1288
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1289
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1290
|
+
* @return {!proto.v1.signaling.api.RtcSession}
|
|
1291
|
+
*/
|
|
1292
|
+
proto.v1.signaling.api.RtcSession.deserializeBinary = function(bytes) {
|
|
1293
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1294
|
+
var msg = new proto.v1.signaling.api.RtcSession;
|
|
1295
|
+
return proto.v1.signaling.api.RtcSession.deserializeBinaryFromReader(msg, reader);
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
|
|
1299
|
+
/**
|
|
1300
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1301
|
+
* given reader into the given message object.
|
|
1302
|
+
* @param {!proto.v1.signaling.api.RtcSession} msg The message object to deserialize into.
|
|
1303
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1304
|
+
* @return {!proto.v1.signaling.api.RtcSession}
|
|
1305
|
+
*/
|
|
1306
|
+
proto.v1.signaling.api.RtcSession.deserializeBinaryFromReader = function(msg, reader) {
|
|
1307
|
+
while (reader.nextField()) {
|
|
1308
|
+
if (reader.isEndGroup()) {
|
|
1309
|
+
break;
|
|
1310
|
+
}
|
|
1311
|
+
var field = reader.getFieldNumber();
|
|
1312
|
+
switch (field) {
|
|
1313
|
+
case 1:
|
|
1314
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1315
|
+
msg.setSessionId(value);
|
|
1316
|
+
break;
|
|
1317
|
+
case 2:
|
|
1318
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1319
|
+
msg.setOfferPeerId(value);
|
|
1320
|
+
break;
|
|
1321
|
+
case 3:
|
|
1322
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1323
|
+
msg.setAnswerPeerId(value);
|
|
1324
|
+
break;
|
|
1325
|
+
case 4:
|
|
1326
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1327
|
+
msg.setOrganizationId(value);
|
|
1328
|
+
break;
|
|
1329
|
+
case 5:
|
|
1330
|
+
var value = /** @type {string} */ (reader.readString());
|
|
1331
|
+
msg.setSessionType(value);
|
|
1332
|
+
break;
|
|
1333
|
+
default:
|
|
1334
|
+
reader.skipField();
|
|
1335
|
+
break;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
return msg;
|
|
1339
|
+
};
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
/**
|
|
1343
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1344
|
+
* @return {!Uint8Array}
|
|
1345
|
+
*/
|
|
1346
|
+
proto.v1.signaling.api.RtcSession.prototype.serializeBinary = function() {
|
|
1347
|
+
var writer = new jspb.BinaryWriter();
|
|
1348
|
+
proto.v1.signaling.api.RtcSession.serializeBinaryToWriter(this, writer);
|
|
1349
|
+
return writer.getResultBuffer();
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1355
|
+
* format), writing to the given BinaryWriter.
|
|
1356
|
+
* @param {!proto.v1.signaling.api.RtcSession} message
|
|
1357
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1358
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1359
|
+
*/
|
|
1360
|
+
proto.v1.signaling.api.RtcSession.serializeBinaryToWriter = function(message, writer) {
|
|
1361
|
+
var f = undefined;
|
|
1362
|
+
f = message.getSessionId();
|
|
1363
|
+
if (f.length > 0) {
|
|
1364
|
+
writer.writeString(
|
|
1365
|
+
1,
|
|
1366
|
+
f
|
|
1367
|
+
);
|
|
1368
|
+
}
|
|
1369
|
+
f = message.getOfferPeerId();
|
|
1370
|
+
if (f.length > 0) {
|
|
1371
|
+
writer.writeString(
|
|
1372
|
+
2,
|
|
1373
|
+
f
|
|
1374
|
+
);
|
|
1375
|
+
}
|
|
1376
|
+
f = message.getAnswerPeerId();
|
|
1377
|
+
if (f.length > 0) {
|
|
1378
|
+
writer.writeString(
|
|
1379
|
+
3,
|
|
1380
|
+
f
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
f = message.getOrganizationId();
|
|
1384
|
+
if (f.length > 0) {
|
|
1385
|
+
writer.writeString(
|
|
1386
|
+
4,
|
|
1387
|
+
f
|
|
1388
|
+
);
|
|
1389
|
+
}
|
|
1390
|
+
f = message.getSessionType();
|
|
1391
|
+
if (f.length > 0) {
|
|
1392
|
+
writer.writeString(
|
|
1393
|
+
5,
|
|
1394
|
+
f
|
|
1395
|
+
);
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
|
|
1399
|
+
|
|
1400
|
+
/**
|
|
1401
|
+
* optional string session_id = 1;
|
|
1402
|
+
* @return {string}
|
|
1403
|
+
*/
|
|
1404
|
+
proto.v1.signaling.api.RtcSession.prototype.getSessionId = function() {
|
|
1405
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
1406
|
+
};
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
/**
|
|
1410
|
+
* @param {string} value
|
|
1411
|
+
* @return {!proto.v1.signaling.api.RtcSession} returns this
|
|
1412
|
+
*/
|
|
1413
|
+
proto.v1.signaling.api.RtcSession.prototype.setSessionId = function(value) {
|
|
1414
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
/**
|
|
1419
|
+
* optional string offer_peer_id = 2;
|
|
1420
|
+
* @return {string}
|
|
1421
|
+
*/
|
|
1422
|
+
proto.v1.signaling.api.RtcSession.prototype.getOfferPeerId = function() {
|
|
1423
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
1424
|
+
};
|
|
1425
|
+
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* @param {string} value
|
|
1429
|
+
* @return {!proto.v1.signaling.api.RtcSession} returns this
|
|
1430
|
+
*/
|
|
1431
|
+
proto.v1.signaling.api.RtcSession.prototype.setOfferPeerId = function(value) {
|
|
1432
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* optional string answer_peer_id = 3;
|
|
1438
|
+
* @return {string}
|
|
1439
|
+
*/
|
|
1440
|
+
proto.v1.signaling.api.RtcSession.prototype.getAnswerPeerId = function() {
|
|
1441
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
1442
|
+
};
|
|
1443
|
+
|
|
1444
|
+
|
|
1445
|
+
/**
|
|
1446
|
+
* @param {string} value
|
|
1447
|
+
* @return {!proto.v1.signaling.api.RtcSession} returns this
|
|
1448
|
+
*/
|
|
1449
|
+
proto.v1.signaling.api.RtcSession.prototype.setAnswerPeerId = function(value) {
|
|
1450
|
+
return jspb.Message.setProto3StringField(this, 3, value);
|
|
1451
|
+
};
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* optional string organization_id = 4;
|
|
1456
|
+
* @return {string}
|
|
1457
|
+
*/
|
|
1458
|
+
proto.v1.signaling.api.RtcSession.prototype.getOrganizationId = function() {
|
|
1459
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
|
1460
|
+
};
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* @param {string} value
|
|
1465
|
+
* @return {!proto.v1.signaling.api.RtcSession} returns this
|
|
1466
|
+
*/
|
|
1467
|
+
proto.v1.signaling.api.RtcSession.prototype.setOrganizationId = function(value) {
|
|
1468
|
+
return jspb.Message.setProto3StringField(this, 4, value);
|
|
1469
|
+
};
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
/**
|
|
1473
|
+
* optional string session_type = 5;
|
|
1474
|
+
* @return {string}
|
|
1475
|
+
*/
|
|
1476
|
+
proto.v1.signaling.api.RtcSession.prototype.getSessionType = function() {
|
|
1477
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
|
1478
|
+
};
|
|
1479
|
+
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* @param {string} value
|
|
1483
|
+
* @return {!proto.v1.signaling.api.RtcSession} returns this
|
|
1484
|
+
*/
|
|
1485
|
+
proto.v1.signaling.api.RtcSession.prototype.setSessionType = function(value) {
|
|
1486
|
+
return jspb.Message.setProto3StringField(this, 5, value);
|
|
1487
|
+
};
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1494
|
+
/**
|
|
1495
|
+
* Creates an object representation of this proto.
|
|
1496
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1497
|
+
* Optional fields that are not set will be set to undefined.
|
|
1498
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1499
|
+
* For the list of reserved names please see:
|
|
1500
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1501
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1502
|
+
* JSPB instance for transitional soy proto support:
|
|
1503
|
+
* http://goto/soy-param-migration
|
|
1504
|
+
* @return {!Object}
|
|
1505
|
+
*/
|
|
1506
|
+
proto.v1.signaling.api.GetSessionsRequest.prototype.toObject = function(opt_includeInstance) {
|
|
1507
|
+
return proto.v1.signaling.api.GetSessionsRequest.toObject(opt_includeInstance, this);
|
|
1508
|
+
};
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
/**
|
|
1512
|
+
* Static version of the {@see toObject} method.
|
|
1513
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1514
|
+
* the JSPB instance for transitional soy proto support:
|
|
1515
|
+
* http://goto/soy-param-migration
|
|
1516
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} msg The msg instance to transform.
|
|
1517
|
+
* @return {!Object}
|
|
1518
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1519
|
+
*/
|
|
1520
|
+
proto.v1.signaling.api.GetSessionsRequest.toObject = function(includeInstance, msg) {
|
|
1521
|
+
var f, obj = {
|
|
1522
|
+
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
if (includeInstance) {
|
|
1526
|
+
obj.$jspbMessageInstance = msg;
|
|
1527
|
+
}
|
|
1528
|
+
return obj;
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1535
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1536
|
+
* @return {!proto.v1.signaling.api.GetSessionsRequest}
|
|
1537
|
+
*/
|
|
1538
|
+
proto.v1.signaling.api.GetSessionsRequest.deserializeBinary = function(bytes) {
|
|
1539
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1540
|
+
var msg = new proto.v1.signaling.api.GetSessionsRequest;
|
|
1541
|
+
return proto.v1.signaling.api.GetSessionsRequest.deserializeBinaryFromReader(msg, reader);
|
|
1542
|
+
};
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
/**
|
|
1546
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1547
|
+
* given reader into the given message object.
|
|
1548
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} msg The message object to deserialize into.
|
|
1549
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1550
|
+
* @return {!proto.v1.signaling.api.GetSessionsRequest}
|
|
1551
|
+
*/
|
|
1552
|
+
proto.v1.signaling.api.GetSessionsRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
1553
|
+
while (reader.nextField()) {
|
|
1554
|
+
if (reader.isEndGroup()) {
|
|
1555
|
+
break;
|
|
1556
|
+
}
|
|
1557
|
+
var field = reader.getFieldNumber();
|
|
1558
|
+
switch (field) {
|
|
1559
|
+
default:
|
|
1560
|
+
reader.skipField();
|
|
1561
|
+
break;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
return msg;
|
|
1565
|
+
};
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
/**
|
|
1569
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1570
|
+
* @return {!Uint8Array}
|
|
1571
|
+
*/
|
|
1572
|
+
proto.v1.signaling.api.GetSessionsRequest.prototype.serializeBinary = function() {
|
|
1573
|
+
var writer = new jspb.BinaryWriter();
|
|
1574
|
+
proto.v1.signaling.api.GetSessionsRequest.serializeBinaryToWriter(this, writer);
|
|
1575
|
+
return writer.getResultBuffer();
|
|
1576
|
+
};
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
/**
|
|
1580
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1581
|
+
* format), writing to the given BinaryWriter.
|
|
1582
|
+
* @param {!proto.v1.signaling.api.GetSessionsRequest} message
|
|
1583
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1584
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1585
|
+
*/
|
|
1586
|
+
proto.v1.signaling.api.GetSessionsRequest.serializeBinaryToWriter = function(message, writer) {
|
|
1587
|
+
var f = undefined;
|
|
1588
|
+
};
|
|
1589
|
+
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
/**
|
|
1593
|
+
* List of repeated fields within this message type.
|
|
1594
|
+
* @private {!Array<number>}
|
|
1595
|
+
* @const
|
|
1596
|
+
*/
|
|
1597
|
+
proto.v1.signaling.api.GetSessionsResponse.repeatedFields_ = [1];
|
|
1598
|
+
|
|
1599
|
+
|
|
1600
|
+
|
|
1601
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1602
|
+
/**
|
|
1603
|
+
* Creates an object representation of this proto.
|
|
1604
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
1605
|
+
* Optional fields that are not set will be set to undefined.
|
|
1606
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
1607
|
+
* For the list of reserved names please see:
|
|
1608
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
1609
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
1610
|
+
* JSPB instance for transitional soy proto support:
|
|
1611
|
+
* http://goto/soy-param-migration
|
|
1612
|
+
* @return {!Object}
|
|
1613
|
+
*/
|
|
1614
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.toObject = function(opt_includeInstance) {
|
|
1615
|
+
return proto.v1.signaling.api.GetSessionsResponse.toObject(opt_includeInstance, this);
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
|
|
1619
|
+
/**
|
|
1620
|
+
* Static version of the {@see toObject} method.
|
|
1621
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
1622
|
+
* the JSPB instance for transitional soy proto support:
|
|
1623
|
+
* http://goto/soy-param-migration
|
|
1624
|
+
* @param {!proto.v1.signaling.api.GetSessionsResponse} msg The msg instance to transform.
|
|
1625
|
+
* @return {!Object}
|
|
1626
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1627
|
+
*/
|
|
1628
|
+
proto.v1.signaling.api.GetSessionsResponse.toObject = function(includeInstance, msg) {
|
|
1629
|
+
var f, obj = {
|
|
1630
|
+
sessionsList: jspb.Message.toObjectList(msg.getSessionsList(),
|
|
1631
|
+
proto.v1.signaling.api.RtcSession.toObject, includeInstance)
|
|
1632
|
+
};
|
|
1633
|
+
|
|
1634
|
+
if (includeInstance) {
|
|
1635
|
+
obj.$jspbMessageInstance = msg;
|
|
1636
|
+
}
|
|
1637
|
+
return obj;
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
/**
|
|
1643
|
+
* Deserializes binary data (in protobuf wire format).
|
|
1644
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
1645
|
+
* @return {!proto.v1.signaling.api.GetSessionsResponse}
|
|
1646
|
+
*/
|
|
1647
|
+
proto.v1.signaling.api.GetSessionsResponse.deserializeBinary = function(bytes) {
|
|
1648
|
+
var reader = new jspb.BinaryReader(bytes);
|
|
1649
|
+
var msg = new proto.v1.signaling.api.GetSessionsResponse;
|
|
1650
|
+
return proto.v1.signaling.api.GetSessionsResponse.deserializeBinaryFromReader(msg, reader);
|
|
1651
|
+
};
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
/**
|
|
1655
|
+
* Deserializes binary data (in protobuf wire format) from the
|
|
1656
|
+
* given reader into the given message object.
|
|
1657
|
+
* @param {!proto.v1.signaling.api.GetSessionsResponse} msg The message object to deserialize into.
|
|
1658
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
1659
|
+
* @return {!proto.v1.signaling.api.GetSessionsResponse}
|
|
1660
|
+
*/
|
|
1661
|
+
proto.v1.signaling.api.GetSessionsResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
1662
|
+
while (reader.nextField()) {
|
|
1663
|
+
if (reader.isEndGroup()) {
|
|
1664
|
+
break;
|
|
1665
|
+
}
|
|
1666
|
+
var field = reader.getFieldNumber();
|
|
1667
|
+
switch (field) {
|
|
1668
|
+
case 1:
|
|
1669
|
+
var value = new proto.v1.signaling.api.RtcSession;
|
|
1670
|
+
reader.readMessage(value,proto.v1.signaling.api.RtcSession.deserializeBinaryFromReader);
|
|
1671
|
+
msg.addSessions(value);
|
|
1672
|
+
break;
|
|
1673
|
+
default:
|
|
1674
|
+
reader.skipField();
|
|
1675
|
+
break;
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
return msg;
|
|
1679
|
+
};
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
/**
|
|
1683
|
+
* Serializes the message to binary data (in protobuf wire format).
|
|
1684
|
+
* @return {!Uint8Array}
|
|
1685
|
+
*/
|
|
1686
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.serializeBinary = function() {
|
|
1687
|
+
var writer = new jspb.BinaryWriter();
|
|
1688
|
+
proto.v1.signaling.api.GetSessionsResponse.serializeBinaryToWriter(this, writer);
|
|
1689
|
+
return writer.getResultBuffer();
|
|
1690
|
+
};
|
|
1691
|
+
|
|
1692
|
+
|
|
1693
|
+
/**
|
|
1694
|
+
* Serializes the given message to binary data (in protobuf wire
|
|
1695
|
+
* format), writing to the given BinaryWriter.
|
|
1696
|
+
* @param {!proto.v1.signaling.api.GetSessionsResponse} message
|
|
1697
|
+
* @param {!jspb.BinaryWriter} writer
|
|
1698
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
1699
|
+
*/
|
|
1700
|
+
proto.v1.signaling.api.GetSessionsResponse.serializeBinaryToWriter = function(message, writer) {
|
|
1701
|
+
var f = undefined;
|
|
1702
|
+
f = message.getSessionsList();
|
|
1703
|
+
if (f.length > 0) {
|
|
1704
|
+
writer.writeRepeatedMessage(
|
|
1705
|
+
1,
|
|
1706
|
+
f,
|
|
1707
|
+
proto.v1.signaling.api.RtcSession.serializeBinaryToWriter
|
|
1708
|
+
);
|
|
1709
|
+
}
|
|
1710
|
+
};
|
|
1711
|
+
|
|
1712
|
+
|
|
1713
|
+
/**
|
|
1714
|
+
* repeated RtcSession sessions = 1;
|
|
1715
|
+
* @return {!Array<!proto.v1.signaling.api.RtcSession>}
|
|
1716
|
+
*/
|
|
1717
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.getSessionsList = function() {
|
|
1718
|
+
return /** @type{!Array<!proto.v1.signaling.api.RtcSession>} */ (
|
|
1719
|
+
jspb.Message.getRepeatedWrapperField(this, proto.v1.signaling.api.RtcSession, 1));
|
|
1720
|
+
};
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
/**
|
|
1724
|
+
* @param {!Array<!proto.v1.signaling.api.RtcSession>} value
|
|
1725
|
+
* @return {!proto.v1.signaling.api.GetSessionsResponse} returns this
|
|
1726
|
+
*/
|
|
1727
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.setSessionsList = function(value) {
|
|
1728
|
+
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
|
1729
|
+
};
|
|
1730
|
+
|
|
1731
|
+
|
|
1732
|
+
/**
|
|
1733
|
+
* @param {!proto.v1.signaling.api.RtcSession=} opt_value
|
|
1734
|
+
* @param {number=} opt_index
|
|
1735
|
+
* @return {!proto.v1.signaling.api.RtcSession}
|
|
1736
|
+
*/
|
|
1737
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.addSessions = function(opt_value, opt_index) {
|
|
1738
|
+
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.v1.signaling.api.RtcSession, opt_index);
|
|
1739
|
+
};
|
|
1740
|
+
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Clears the list making it empty but non-null.
|
|
1744
|
+
* @return {!proto.v1.signaling.api.GetSessionsResponse} returns this
|
|
1745
|
+
*/
|
|
1746
|
+
proto.v1.signaling.api.GetSessionsResponse.prototype.clearSessionsList = function() {
|
|
1747
|
+
return this.setSessionsList([]);
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
|
|
1177
1754
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
1178
1755
|
/**
|
|
1179
1756
|
* Creates an object representation of this proto.
|
|
@@ -3270,7 +3847,8 @@ proto.v1.signaling.api.SessionType = {
|
|
|
3270
3847
|
UNKNOWN: 0,
|
|
3271
3848
|
TELEOP: 1,
|
|
3272
3849
|
PORT_FORWARD: 2,
|
|
3273
|
-
OBSERVE: 3
|
|
3850
|
+
OBSERVE: 3,
|
|
3851
|
+
HEADLESS: 4
|
|
3274
3852
|
};
|
|
3275
3853
|
|
|
3276
3854
|
goog.object.extend(exports, proto.v1.signaling.api);
|
|
@@ -6,6 +6,8 @@ export { RtcClient } from "../../rtc-client/RtcClient";
|
|
|
6
6
|
export { RtcClientV1 } from "../../rtc-client/RtcClientV1";
|
|
7
7
|
export { createRtcStreamMessage } from "../../rtc-client/utils/createRtcStreamMessage";
|
|
8
8
|
export type { IRtcStream } from "../../model/IRtcStream";
|
|
9
|
+
export type { IRtcPeer } from "../../model/IRtcPeer";
|
|
10
|
+
export type { RtcStreamType } from "../../model/RtcStreamType";
|
|
9
11
|
export type { IRtcClientConfigurationV1 } from "../../rtc-client/models-v1/IRtcClientConfigurationV1";
|
|
10
12
|
export type { IRtcClientConfiguration } from "../../rtc-client/models/IRtcClientConfiguration";
|
|
11
13
|
export type { IRtcConnectionStatsInfo } from "../../rtc-client/models/IRtcConnectionStatsInfo";
|
|
@@ -55,7 +55,7 @@ export declare class RtcConnectionV1 implements IHasPeerConnection {
|
|
|
55
55
|
getPing(): number | undefined;
|
|
56
56
|
getLastMessageTimestamp(): number | undefined;
|
|
57
57
|
getSessionId(): string;
|
|
58
|
-
getRemotePeer(): import("
|
|
58
|
+
getRemotePeer(): import("src").IRtcPeer;
|
|
59
59
|
private initializeChannels;
|
|
60
60
|
private sendOffer;
|
|
61
61
|
private getChannelFromLabel;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { IRtcStream } from "../../model/IRtcStream";
|
|
2
|
-
export declare function encodeStreamId({ entityId, streamName, streamType }: IRtcStream): string;
|
|
2
|
+
export declare function encodeStreamId({ entityId, streamName, streamType, }: IRtcStream): string;
|
|
3
3
|
export declare function decodeStreamId(streamId: string): IRtcStream;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formant/realtime-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/realtime-sdk/src/index.d.ts",
|
|
@@ -10,14 +10,13 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"clean": "rm -rf dist",
|
|
12
12
|
"compile": "tsc",
|
|
13
|
-
"build": "yarn make-protos && env $(grep -v '^#' src/config/production.env) webpack",
|
|
13
|
+
"build": "yarn maybe-make-protos && env $(grep -v '^#' src/config/production.env) webpack",
|
|
14
14
|
"postbuild": "tsc --emitDeclarationOnly --declaration --declarationDir ./dist --skipLibCheck && tsc-alias",
|
|
15
|
-
"make-protos": "cd ../../../ && make protos && cd
|
|
15
|
+
"maybe-make-protos": "if [ -z ${LERNA_PACKAGE_NAME} ]; then cd ../../../ && make protos && cd -; fi"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"env-var": "^7.3.1",
|
|
19
|
-
"@types/google-protobuf": "~3.7.0"
|
|
20
|
-
"grpc-web": "^1.2.1"
|
|
19
|
+
"@types/google-protobuf": "~3.7.0"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@formant/client": "*",
|