livekit-client 0.18.4-RC6 → 0.18.4-RC7

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.
@@ -5024,7 +5024,8 @@ function createBaseParticipantInfo() {
5024
5024
  name: '',
5025
5025
  version: 0,
5026
5026
  permission: undefined,
5027
- region: ''
5027
+ region: '',
5028
+ isPublisher: false
5028
5029
  };
5029
5030
  }
5030
5031
 
@@ -5072,6 +5073,10 @@ const ParticipantInfo = {
5072
5073
  writer.uint32(98).string(message.region);
5073
5074
  }
5074
5075
 
5076
+ if (message.isPublisher === true) {
5077
+ writer.uint32(104).bool(message.isPublisher);
5078
+ }
5079
+
5075
5080
  return writer;
5076
5081
  },
5077
5082
 
@@ -5124,6 +5129,10 @@ const ParticipantInfo = {
5124
5129
  message.region = reader.string();
5125
5130
  break;
5126
5131
 
5132
+ case 13:
5133
+ message.isPublisher = reader.bool();
5134
+ break;
5135
+
5127
5136
  default:
5128
5137
  reader.skipType(tag & 7);
5129
5138
  break;
@@ -5144,7 +5153,8 @@ const ParticipantInfo = {
5144
5153
  name: isSet$1(object.name) ? String(object.name) : '',
5145
5154
  version: isSet$1(object.version) ? Number(object.version) : 0,
5146
5155
  permission: isSet$1(object.permission) ? ParticipantPermission.fromJSON(object.permission) : undefined,
5147
- region: isSet$1(object.region) ? String(object.region) : ''
5156
+ region: isSet$1(object.region) ? String(object.region) : '',
5157
+ isPublisher: isSet$1(object.isPublisher) ? Boolean(object.isPublisher) : false
5148
5158
  };
5149
5159
  },
5150
5160
 
@@ -5166,11 +5176,12 @@ const ParticipantInfo = {
5166
5176
  message.version !== undefined && (obj.version = Math.round(message.version));
5167
5177
  message.permission !== undefined && (obj.permission = message.permission ? ParticipantPermission.toJSON(message.permission) : undefined);
5168
5178
  message.region !== undefined && (obj.region = message.region);
5179
+ message.isPublisher !== undefined && (obj.isPublisher = message.isPublisher);
5169
5180
  return obj;
5170
5181
  },
5171
5182
 
5172
5183
  fromPartial(object) {
5173
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
5184
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
5174
5185
 
5175
5186
  const message = createBaseParticipantInfo();
5176
5187
  message.sid = (_a = object.sid) !== null && _a !== void 0 ? _a : '';
@@ -5183,6 +5194,7 @@ const ParticipantInfo = {
5183
5194
  message.version = (_h = object.version) !== null && _h !== void 0 ? _h : 0;
5184
5195
  message.permission = object.permission !== undefined && object.permission !== null ? ParticipantPermission.fromPartial(object.permission) : undefined;
5185
5196
  message.region = (_j = object.region) !== null && _j !== void 0 ? _j : '';
5197
+ message.isPublisher = (_k = object.isPublisher) !== null && _k !== void 0 ? _k : false;
5186
5198
  return message;
5187
5199
  }
5188
5200
 
@@ -6231,11 +6243,9 @@ const btoa = globalThis$1.btoa || (bin => globalThis$1.Buffer.from(bin, 'binary'
6231
6243
 
6232
6244
  function base64FromBytes(arr) {
6233
6245
  const bin = [];
6234
-
6235
- for (const byte of arr) {
6246
+ arr.forEach(byte => {
6236
6247
  bin.push(String.fromCharCode(byte));
6237
- }
6238
-
6248
+ });
6239
6249
  return btoa(bin.join(''));
6240
6250
  }
6241
6251
 
@@ -8585,7 +8595,8 @@ function createBaseTrackPermission() {
8585
8595
  return {
8586
8596
  participantSid: '',
8587
8597
  allTracks: false,
8588
- trackSids: []
8598
+ trackSids: [],
8599
+ participantIdentity: ''
8589
8600
  };
8590
8601
  }
8591
8602
 
@@ -8605,6 +8616,10 @@ const TrackPermission = {
8605
8616
  writer.uint32(26).string(v);
8606
8617
  }
8607
8618
 
8619
+ if (message.participantIdentity !== '') {
8620
+ writer.uint32(34).string(message.participantIdentity);
8621
+ }
8622
+
8608
8623
  return writer;
8609
8624
  },
8610
8625
 
@@ -8629,6 +8644,10 @@ const TrackPermission = {
8629
8644
  message.trackSids.push(reader.string());
8630
8645
  break;
8631
8646
 
8647
+ case 4:
8648
+ message.participantIdentity = reader.string();
8649
+ break;
8650
+
8632
8651
  default:
8633
8652
  reader.skipType(tag & 7);
8634
8653
  break;
@@ -8642,7 +8661,8 @@ const TrackPermission = {
8642
8661
  return {
8643
8662
  participantSid: isSet(object.participantSid) ? String(object.participantSid) : '',
8644
8663
  allTracks: isSet(object.allTracks) ? Boolean(object.allTracks) : false,
8645
- trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids) ? object.trackSids.map(e => String(e)) : []
8664
+ trackSids: Array.isArray(object === null || object === void 0 ? void 0 : object.trackSids) ? object.trackSids.map(e => String(e)) : [],
8665
+ participantIdentity: isSet(object.participantIdentity) ? String(object.participantIdentity) : ''
8646
8666
  };
8647
8667
  },
8648
8668
 
@@ -8657,16 +8677,18 @@ const TrackPermission = {
8657
8677
  obj.trackSids = [];
8658
8678
  }
8659
8679
 
8680
+ message.participantIdentity !== undefined && (obj.participantIdentity = message.participantIdentity);
8660
8681
  return obj;
8661
8682
  },
8662
8683
 
8663
8684
  fromPartial(object) {
8664
- var _a, _b, _c;
8685
+ var _a, _b, _c, _d;
8665
8686
 
8666
8687
  const message = createBaseTrackPermission();
8667
8688
  message.participantSid = (_a = object.participantSid) !== null && _a !== void 0 ? _a : '';
8668
8689
  message.allTracks = (_b = object.allTracks) !== null && _b !== void 0 ? _b : false;
8669
8690
  message.trackSids = ((_c = object.trackSids) === null || _c === void 0 ? void 0 : _c.map(e => e)) || [];
8691
+ message.participantIdentity = (_d = object.participantIdentity) !== null && _d !== void 0 ? _d : '';
8670
8692
  return message;
8671
8693
  }
8672
8694
 
@@ -12313,15 +12335,16 @@ class Participant extends events.exports.EventEmitter {
12313
12335
  }
12314
12336
 
12315
12337
  function trackPermissionToProto(perms) {
12316
- var _a;
12338
+ var _a, _b, _c;
12317
12339
 
12318
- if (!perms.participantSid) {
12319
- throw new Error('Invalid track permission, missing participantSid');
12340
+ if (!perms.participantSid && !perms.participantIdentity) {
12341
+ throw new Error('Invalid track permission, must provide at least one of participantIdentity and participantSid');
12320
12342
  }
12321
12343
 
12322
12344
  return {
12323
- participantSid: perms.participantSid,
12324
- allTracks: (_a = perms.allowAll) !== null && _a !== void 0 ? _a : false,
12345
+ participantIdentity: (_a = perms.participantIdentity) !== null && _a !== void 0 ? _a : '',
12346
+ participantSid: (_b = perms.participantSid) !== null && _b !== void 0 ? _b : '',
12347
+ allTracks: (_c = perms.allowAll) !== null && _c !== void 0 ? _c : false,
12325
12348
  trackSids: perms.allowedTrackSids || []
12326
12349
  };
12327
12350
  }