livekit-client 1.9.6 → 1.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/livekit-client.esm.mjs +1318 -885
  2. package/dist/livekit-client.esm.mjs.map +1 -1
  3. package/dist/livekit-client.umd.js +1 -1
  4. package/dist/livekit-client.umd.js.map +1 -1
  5. package/dist/src/api/SignalClient.d.ts +2 -1
  6. package/dist/src/api/SignalClient.d.ts.map +1 -1
  7. package/dist/src/index.d.ts +1 -0
  8. package/dist/src/index.d.ts.map +1 -1
  9. package/dist/src/proto/livekit_models.d.ts +108 -10
  10. package/dist/src/proto/livekit_models.d.ts.map +1 -1
  11. package/dist/src/proto/livekit_rtc.d.ts +513 -194
  12. package/dist/src/proto/livekit_rtc.d.ts.map +1 -1
  13. package/dist/src/room/Room.d.ts +3 -2
  14. package/dist/src/room/Room.d.ts.map +1 -1
  15. package/dist/src/room/events.d.ts +5 -1
  16. package/dist/src/room/events.d.ts.map +1 -1
  17. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  18. package/dist/src/room/participant/Participant.d.ts +2 -2
  19. package/dist/src/room/participant/Participant.d.ts.map +1 -1
  20. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  21. package/dist/src/room/participant/publishUtils.d.ts +8 -0
  22. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  23. package/dist/src/room/track/LocalTrack.d.ts +32 -0
  24. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  25. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  26. package/dist/src/room/track/RemoteTrackPublication.d.ts +4 -1
  27. package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
  28. package/dist/src/room/track/TrackPublication.d.ts +2 -1
  29. package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
  30. package/dist/src/room/track/options.d.ts +1 -1
  31. package/dist/src/room/track/options.d.ts.map +1 -1
  32. package/dist/src/room/track/processor/types.d.ts +19 -0
  33. package/dist/src/room/track/processor/types.d.ts.map +1 -0
  34. package/dist/src/utils/browserParser.d.ts.map +1 -1
  35. package/dist/ts4.2/src/api/SignalClient.d.ts +2 -1
  36. package/dist/ts4.2/src/index.d.ts +1 -0
  37. package/dist/ts4.2/src/proto/livekit_models.d.ts +126 -12
  38. package/dist/ts4.2/src/proto/livekit_rtc.d.ts +617 -254
  39. package/dist/ts4.2/src/room/Room.d.ts +3 -2
  40. package/dist/ts4.2/src/room/events.d.ts +5 -1
  41. package/dist/ts4.2/src/room/participant/Participant.d.ts +2 -2
  42. package/dist/ts4.2/src/room/participant/publishUtils.d.ts +8 -0
  43. package/dist/ts4.2/src/room/track/LocalTrack.d.ts +32 -0
  44. package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +4 -1
  45. package/dist/ts4.2/src/room/track/TrackPublication.d.ts +2 -1
  46. package/dist/ts4.2/src/room/track/options.d.ts +1 -1
  47. package/dist/ts4.2/src/room/track/processor/types.d.ts +19 -0
  48. package/package.json +14 -13
  49. package/src/api/SignalClient.ts +8 -1
  50. package/src/index.ts +1 -0
  51. package/src/proto/google/protobuf/timestamp.ts +3 -3
  52. package/src/proto/livekit_models.ts +254 -161
  53. package/src/proto/livekit_rtc.ts +334 -180
  54. package/src/room/Room.ts +26 -1
  55. package/src/room/events.ts +4 -0
  56. package/src/room/participant/LocalParticipant.ts +23 -3
  57. package/src/room/participant/Participant.ts +2 -1
  58. package/src/room/participant/RemoteParticipant.ts +4 -1
  59. package/src/room/participant/publishUtils.ts +68 -12
  60. package/src/room/track/LocalTrack.ts +120 -16
  61. package/src/room/track/LocalVideoTrack.ts +96 -33
  62. package/src/room/track/RemoteTrackPublication.ts +8 -1
  63. package/src/room/track/Track.ts +3 -3
  64. package/src/room/track/TrackPublication.ts +2 -1
  65. package/src/room/track/options.ts +1 -1
  66. package/src/room/track/processor/types.ts +20 -0
  67. package/src/utils/browserParser.ts +1 -4
@@ -428,6 +428,45 @@ export function reconnectReasonToJSON(object: ReconnectReason): string {
428
428
  }
429
429
  }
430
430
 
431
+ export enum SubscriptionError {
432
+ SE_UNKOWN = 0,
433
+ SE_CODEC_UNSUPPORTED = 1,
434
+ SE_TRACK_NOTFOUND = 2,
435
+ UNRECOGNIZED = -1,
436
+ }
437
+
438
+ export function subscriptionErrorFromJSON(object: any): SubscriptionError {
439
+ switch (object) {
440
+ case 0:
441
+ case "SE_UNKOWN":
442
+ return SubscriptionError.SE_UNKOWN;
443
+ case 1:
444
+ case "SE_CODEC_UNSUPPORTED":
445
+ return SubscriptionError.SE_CODEC_UNSUPPORTED;
446
+ case 2:
447
+ case "SE_TRACK_NOTFOUND":
448
+ return SubscriptionError.SE_TRACK_NOTFOUND;
449
+ case -1:
450
+ case "UNRECOGNIZED":
451
+ default:
452
+ return SubscriptionError.UNRECOGNIZED;
453
+ }
454
+ }
455
+
456
+ export function subscriptionErrorToJSON(object: SubscriptionError): string {
457
+ switch (object) {
458
+ case SubscriptionError.SE_UNKOWN:
459
+ return "SE_UNKOWN";
460
+ case SubscriptionError.SE_CODEC_UNSUPPORTED:
461
+ return "SE_CODEC_UNSUPPORTED";
462
+ case SubscriptionError.SE_TRACK_NOTFOUND:
463
+ return "SE_TRACK_NOTFOUND";
464
+ case SubscriptionError.UNRECOGNIZED:
465
+ default:
466
+ return "UNRECOGNIZED";
467
+ }
468
+ }
469
+
431
470
  export interface Room {
432
471
  sid: string;
433
472
  name: string;
@@ -837,7 +876,10 @@ export interface VideoConfiguration {
837
876
  }
838
877
 
839
878
  export interface DisabledCodecs {
879
+ /** disabled for both publish and subscribe */
840
880
  codecs: Codec[];
881
+ /** only disable for publish */
882
+ publish: Codec[];
841
883
  }
842
884
 
843
885
  export interface RTPStats {
@@ -882,6 +924,9 @@ export interface RTPStats {
882
924
  lastKeyFrame?: Date;
883
925
  layerLockPlis: number;
884
926
  lastLayerLockPli?: Date;
927
+ sampleRate: number;
928
+ /** NEXT_ID: 44 */
929
+ driftMs: number;
885
930
  }
886
931
 
887
932
  export interface RTPStats_GapHistogramEntry {
@@ -956,84 +1001,84 @@ export const Room = {
956
1001
  const tag = reader.uint32();
957
1002
  switch (tag >>> 3) {
958
1003
  case 1:
959
- if (tag != 10) {
1004
+ if (tag !== 10) {
960
1005
  break;
961
1006
  }
962
1007
 
963
1008
  message.sid = reader.string();
964
1009
  continue;
965
1010
  case 2:
966
- if (tag != 18) {
1011
+ if (tag !== 18) {
967
1012
  break;
968
1013
  }
969
1014
 
970
1015
  message.name = reader.string();
971
1016
  continue;
972
1017
  case 3:
973
- if (tag != 24) {
1018
+ if (tag !== 24) {
974
1019
  break;
975
1020
  }
976
1021
 
977
1022
  message.emptyTimeout = reader.uint32();
978
1023
  continue;
979
1024
  case 4:
980
- if (tag != 32) {
1025
+ if (tag !== 32) {
981
1026
  break;
982
1027
  }
983
1028
 
984
1029
  message.maxParticipants = reader.uint32();
985
1030
  continue;
986
1031
  case 5:
987
- if (tag != 40) {
1032
+ if (tag !== 40) {
988
1033
  break;
989
1034
  }
990
1035
 
991
1036
  message.creationTime = longToNumber(reader.int64() as Long);
992
1037
  continue;
993
1038
  case 6:
994
- if (tag != 50) {
1039
+ if (tag !== 50) {
995
1040
  break;
996
1041
  }
997
1042
 
998
1043
  message.turnPassword = reader.string();
999
1044
  continue;
1000
1045
  case 7:
1001
- if (tag != 58) {
1046
+ if (tag !== 58) {
1002
1047
  break;
1003
1048
  }
1004
1049
 
1005
1050
  message.enabledCodecs.push(Codec.decode(reader, reader.uint32()));
1006
1051
  continue;
1007
1052
  case 8:
1008
- if (tag != 66) {
1053
+ if (tag !== 66) {
1009
1054
  break;
1010
1055
  }
1011
1056
 
1012
1057
  message.metadata = reader.string();
1013
1058
  continue;
1014
1059
  case 9:
1015
- if (tag != 72) {
1060
+ if (tag !== 72) {
1016
1061
  break;
1017
1062
  }
1018
1063
 
1019
1064
  message.numParticipants = reader.uint32();
1020
1065
  continue;
1021
1066
  case 11:
1022
- if (tag != 88) {
1067
+ if (tag !== 88) {
1023
1068
  break;
1024
1069
  }
1025
1070
 
1026
1071
  message.numPublishers = reader.uint32();
1027
1072
  continue;
1028
1073
  case 10:
1029
- if (tag != 80) {
1074
+ if (tag !== 80) {
1030
1075
  break;
1031
1076
  }
1032
1077
 
1033
1078
  message.activeRecording = reader.bool();
1034
1079
  continue;
1035
1080
  }
1036
- if ((tag & 7) == 4 || tag == 0) {
1081
+ if ((tag & 7) === 4 || tag === 0) {
1037
1082
  break;
1038
1083
  }
1039
1084
  reader.skipType(tag & 7);
@@ -1123,21 +1168,21 @@ export const Codec = {
1123
1168
  const tag = reader.uint32();
1124
1169
  switch (tag >>> 3) {
1125
1170
  case 1:
1126
- if (tag != 10) {
1171
+ if (tag !== 10) {
1127
1172
  break;
1128
1173
  }
1129
1174
 
1130
1175
  message.mime = reader.string();
1131
1176
  continue;
1132
1177
  case 2:
1133
- if (tag != 18) {
1178
+ if (tag !== 18) {
1134
1179
  break;
1135
1180
  }
1136
1181
 
1137
1182
  message.fmtpLine = reader.string();
1138
1183
  continue;
1139
1184
  }
1140
- if ((tag & 7) == 4 || tag == 0) {
1185
+ if ((tag & 7) === 4 || tag === 0) {
1141
1186
  break;
1142
1187
  }
1143
1188
  reader.skipType(tag & 7);
@@ -1219,33 +1264,34 @@ export const ParticipantPermission = {
1219
1264
  const tag = reader.uint32();
1220
1265
  switch (tag >>> 3) {
1221
1266
  case 1:
1222
- if (tag != 8) {
1267
+ if (tag !== 8) {
1223
1268
  break;
1224
1269
  }
1225
1270
 
1226
1271
  message.canSubscribe = reader.bool();
1227
1272
  continue;
1228
1273
  case 2:
1229
- if (tag != 16) {
1274
+ if (tag !== 16) {
1230
1275
  break;
1231
1276
  }
1232
1277
 
1233
1278
  message.canPublish = reader.bool();
1234
1279
  continue;
1235
1280
  case 3:
1236
- if (tag != 24) {
1281
+ if (tag !== 24) {
1237
1282
  break;
1238
1283
  }
1239
1284
 
1240
1285
  message.canPublishData = reader.bool();
1241
1286
  continue;
1242
1287
  case 9:
1243
- if (tag == 72) {
1288
+ if (tag === 72) {
1244
1289
  message.canPublishSources.push(reader.int32() as any);
1290
+
1245
1291
  continue;
1246
1292
  }
1247
1293
 
1248
- if (tag == 74) {
1294
+ if (tag === 74) {
1249
1295
  const end2 = reader.uint32() + reader.pos;
1250
1296
  while (reader.pos < end2) {
1251
1297
  message.canPublishSources.push(reader.int32() as any);
@@ -1256,28 +1302,28 @@ export const ParticipantPermission = {
1256
1302
 
1257
1303
  break;
1258
1304
  case 7:
1259
- if (tag != 56) {
1305
+ if (tag !== 56) {
1260
1306
  break;
1261
1307
  }
1262
1308
 
1263
1309
  message.hidden = reader.bool();
1264
1310
  continue;
1265
1311
  case 8:
1266
- if (tag != 64) {
1312
+ if (tag !== 64) {
1267
1313
  break;
1268
1314
  }
1269
1315
 
1270
1316
  message.recorder = reader.bool();
1271
1317
  continue;
1272
1318
  case 10:
1273
- if (tag != 80) {
1319
+ if (tag !== 80) {
1274
1320
  break;
1275
1321
  }
1276
1322
 
1277
1323
  message.canUpdateMetadata = reader.bool();
1278
1324
  continue;
1279
1325
  }
1280
- if ((tag & 7) == 4 || tag == 0) {
1326
+ if ((tag & 7) === 4 || tag === 0) {
1281
1327
  break;
1282
1328
  }
1283
1329
  reader.skipType(tag & 7);
@@ -1394,84 +1440,84 @@ export const ParticipantInfo = {
1394
1440
  const tag = reader.uint32();
1395
1441
  switch (tag >>> 3) {
1396
1442
  case 1:
1397
- if (tag != 10) {
1443
+ if (tag !== 10) {
1398
1444
  break;
1399
1445
  }
1400
1446
 
1401
1447
  message.sid = reader.string();
1402
1448
  continue;
1403
1449
  case 2:
1404
- if (tag != 18) {
1450
+ if (tag !== 18) {
1405
1451
  break;
1406
1452
  }
1407
1453
 
1408
1454
  message.identity = reader.string();
1409
1455
  continue;
1410
1456
  case 3:
1411
- if (tag != 24) {
1457
+ if (tag !== 24) {
1412
1458
  break;
1413
1459
  }
1414
1460
 
1415
1461
  message.state = reader.int32() as any;
1416
1462
  continue;
1417
1463
  case 4:
1418
- if (tag != 34) {
1464
+ if (tag !== 34) {
1419
1465
  break;
1420
1466
  }
1421
1467
 
1422
1468
  message.tracks.push(TrackInfo.decode(reader, reader.uint32()));
1423
1469
  continue;
1424
1470
  case 5:
1425
- if (tag != 42) {
1471
+ if (tag !== 42) {
1426
1472
  break;
1427
1473
  }
1428
1474
 
1429
1475
  message.metadata = reader.string();
1430
1476
  continue;
1431
1477
  case 6:
1432
- if (tag != 48) {
1478
+ if (tag !== 48) {
1433
1479
  break;
1434
1480
  }
1435
1481
 
1436
1482
  message.joinedAt = longToNumber(reader.int64() as Long);
1437
1483
  continue;
1438
1484
  case 9:
1439
- if (tag != 74) {
1485
+ if (tag !== 74) {
1440
1486
  break;
1441
1487
  }
1442
1488
 
1443
1489
  message.name = reader.string();
1444
1490
  continue;
1445
1491
  case 10:
1446
- if (tag != 80) {
1492
+ if (tag !== 80) {
1447
1493
  break;
1448
1494
  }
1449
1495
 
1450
1496
  message.version = reader.uint32();
1451
1497
  continue;
1452
1498
  case 11:
1453
- if (tag != 90) {
1499
+ if (tag !== 90) {
1454
1500
  break;
1455
1501
  }
1456
1502
 
1457
1503
  message.permission = ParticipantPermission.decode(reader, reader.uint32());
1458
1504
  continue;
1459
1505
  case 12:
1460
- if (tag != 98) {
1506
+ if (tag !== 98) {
1461
1507
  break;
1462
1508
  }
1463
1509
 
1464
1510
  message.region = reader.string();
1465
1511
  continue;
1466
1512
  case 13:
1467
- if (tag != 104) {
1513
+ if (tag !== 104) {
1468
1514
  break;
1469
1515
  }
1470
1516
 
1471
1517
  message.isPublisher = reader.bool();
1472
1518
  continue;
1473
1519
  }
1474
- if ((tag & 7) == 4 || tag == 0) {
1520
+ if ((tag & 7) === 4 || tag === 0) {
1475
1521
  break;
1476
1522
  }
1477
1523
  reader.skipType(tag & 7);
@@ -1556,7 +1602,7 @@ export const Encryption = {
1556
1602
  const tag = reader.uint32();
1557
1603
  switch (tag >>> 3) {
1558
1604
  }
1559
- if ((tag & 7) == 4 || tag == 0) {
1605
+ if ((tag & 7) === 4 || tag === 0) {
1560
1606
  break;
1561
1607
  }
1562
1608
  reader.skipType(tag & 7);
@@ -1612,35 +1658,35 @@ export const SimulcastCodecInfo = {
1612
1658
  const tag = reader.uint32();
1613
1659
  switch (tag >>> 3) {
1614
1660
  case 1:
1615
- if (tag != 10) {
1661
+ if (tag !== 10) {
1616
1662
  break;
1617
1663
  }
1618
1664
 
1619
1665
  message.mimeType = reader.string();
1620
1666
  continue;
1621
1667
  case 2:
1622
- if (tag != 18) {
1668
+ if (tag !== 18) {
1623
1669
  break;
1624
1670
  }
1625
1671
 
1626
1672
  message.mid = reader.string();
1627
1673
  continue;
1628
1674
  case 3:
1629
- if (tag != 26) {
1675
+ if (tag !== 26) {
1630
1676
  break;
1631
1677
  }
1632
1678
 
1633
1679
  message.cid = reader.string();
1634
1680
  continue;
1635
1681
  case 4:
1636
- if (tag != 34) {
1682
+ if (tag !== 34) {
1637
1683
  break;
1638
1684
  }
1639
1685
 
1640
1686
  message.layers.push(VideoLayer.decode(reader, reader.uint32()));
1641
1687
  continue;
1642
1688
  }
1643
- if ((tag & 7) == 4 || tag == 0) {
1689
+ if ((tag & 7) === 4 || tag === 0) {
1644
1690
  break;
1645
1691
  }
1646
1692
  reader.skipType(tag & 7);
@@ -1766,119 +1812,119 @@ export const TrackInfo = {
1766
1812
  const tag = reader.uint32();
1767
1813
  switch (tag >>> 3) {
1768
1814
  case 1:
1769
- if (tag != 10) {
1815
+ if (tag !== 10) {
1770
1816
  break;
1771
1817
  }
1772
1818
 
1773
1819
  message.sid = reader.string();
1774
1820
  continue;
1775
1821
  case 2:
1776
- if (tag != 16) {
1822
+ if (tag !== 16) {
1777
1823
  break;
1778
1824
  }
1779
1825
 
1780
1826
  message.type = reader.int32() as any;
1781
1827
  continue;
1782
1828
  case 3:
1783
- if (tag != 26) {
1829
+ if (tag !== 26) {
1784
1830
  break;
1785
1831
  }
1786
1832
 
1787
1833
  message.name = reader.string();
1788
1834
  continue;
1789
1835
  case 4:
1790
- if (tag != 32) {
1836
+ if (tag !== 32) {
1791
1837
  break;
1792
1838
  }
1793
1839
 
1794
1840
  message.muted = reader.bool();
1795
1841
  continue;
1796
1842
  case 5:
1797
- if (tag != 40) {
1843
+ if (tag !== 40) {
1798
1844
  break;
1799
1845
  }
1800
1846
 
1801
1847
  message.width = reader.uint32();
1802
1848
  continue;
1803
1849
  case 6:
1804
- if (tag != 48) {
1850
+ if (tag !== 48) {
1805
1851
  break;
1806
1852
  }
1807
1853
 
1808
1854
  message.height = reader.uint32();
1809
1855
  continue;
1810
1856
  case 7:
1811
- if (tag != 56) {
1857
+ if (tag !== 56) {
1812
1858
  break;
1813
1859
  }
1814
1860
 
1815
1861
  message.simulcast = reader.bool();
1816
1862
  continue;
1817
1863
  case 8:
1818
- if (tag != 64) {
1864
+ if (tag !== 64) {
1819
1865
  break;
1820
1866
  }
1821
1867
 
1822
1868
  message.disableDtx = reader.bool();
1823
1869
  continue;
1824
1870
  case 9:
1825
- if (tag != 72) {
1871
+ if (tag !== 72) {
1826
1872
  break;
1827
1873
  }
1828
1874
 
1829
1875
  message.source = reader.int32() as any;
1830
1876
  continue;
1831
1877
  case 10:
1832
- if (tag != 82) {
1878
+ if (tag !== 82) {
1833
1879
  break;
1834
1880
  }
1835
1881
 
1836
1882
  message.layers.push(VideoLayer.decode(reader, reader.uint32()));
1837
1883
  continue;
1838
1884
  case 11:
1839
- if (tag != 90) {
1885
+ if (tag !== 90) {
1840
1886
  break;
1841
1887
  }
1842
1888
 
1843
1889
  message.mimeType = reader.string();
1844
1890
  continue;
1845
1891
  case 12:
1846
- if (tag != 98) {
1892
+ if (tag !== 98) {
1847
1893
  break;
1848
1894
  }
1849
1895
 
1850
1896
  message.mid = reader.string();
1851
1897
  continue;
1852
1898
  case 13:
1853
- if (tag != 106) {
1899
+ if (tag !== 106) {
1854
1900
  break;
1855
1901
  }
1856
1902
 
1857
1903
  message.codecs.push(SimulcastCodecInfo.decode(reader, reader.uint32()));
1858
1904
  continue;
1859
1905
  case 14:
1860
- if (tag != 112) {
1906
+ if (tag !== 112) {
1861
1907
  break;
1862
1908
  }
1863
1909
 
1864
1910
  message.stereo = reader.bool();
1865
1911
  continue;
1866
1912
  case 15:
1867
- if (tag != 120) {
1913
+ if (tag !== 120) {
1868
1914
  break;
1869
1915
  }
1870
1916
 
1871
1917
  message.disableRed = reader.bool();
1872
1918
  continue;
1873
1919
  case 16:
1874
- if (tag != 128) {
1920
+ if (tag !== 128) {
1875
1921
  break;
1876
1922
  }
1877
1923
 
1878
1924
  message.encryption = reader.int32() as any;
1879
1925
  continue;
1880
1926
  }
1881
- if ((tag & 7) == 4 || tag == 0) {
1927
+ if ((tag & 7) === 4 || tag === 0) {
1882
1928
  break;
1883
1929
  }
1884
1930
  reader.skipType(tag & 7);
@@ -1994,42 +2040,42 @@ export const VideoLayer = {
1994
2040
  const tag = reader.uint32();
1995
2041
  switch (tag >>> 3) {
1996
2042
  case 1:
1997
- if (tag != 8) {
2043
+ if (tag !== 8) {
1998
2044
  break;
1999
2045
  }
2000
2046
 
2001
2047
  message.quality = reader.int32() as any;
2002
2048
  continue;
2003
2049
  case 2:
2004
- if (tag != 16) {
2050
+ if (tag !== 16) {
2005
2051
  break;
2006
2052
  }
2007
2053
 
2008
2054
  message.width = reader.uint32();
2009
2055
  continue;
2010
2056
  case 3:
2011
- if (tag != 24) {
2057
+ if (tag !== 24) {
2012
2058
  break;
2013
2059
  }
2014
2060
 
2015
2061
  message.height = reader.uint32();
2016
2062
  continue;
2017
2063
  case 4:
2018
- if (tag != 32) {
2064
+ if (tag !== 32) {
2019
2065
  break;
2020
2066
  }
2021
2067
 
2022
2068
  message.bitrate = reader.uint32();
2023
2069
  continue;
2024
2070
  case 5:
2025
- if (tag != 40) {
2071
+ if (tag !== 40) {
2026
2072
  break;
2027
2073
  }
2028
2074
 
2029
2075
  message.ssrc = reader.uint32();
2030
2076
  continue;
2031
2077
  }
2032
- if ((tag & 7) == 4 || tag == 0) {
2078
+ if ((tag & 7) === 4 || tag === 0) {
2033
2079
  break;
2034
2080
  }
2035
2081
  reader.skipType(tag & 7);
@@ -2100,28 +2146,28 @@ export const DataPacket = {
2100
2146
  const tag = reader.uint32();
2101
2147
  switch (tag >>> 3) {
2102
2148
  case 1:
2103
- if (tag != 8) {
2149
+ if (tag !== 8) {
2104
2150
  break;
2105
2151
  }
2106
2152
 
2107
2153
  message.kind = reader.int32() as any;
2108
2154
  continue;
2109
2155
  case 2:
2110
- if (tag != 18) {
2156
+ if (tag !== 18) {
2111
2157
  break;
2112
2158
  }
2113
2159
 
2114
2160
  message.value = { $case: "user", user: UserPacket.decode(reader, reader.uint32()) };
2115
2161
  continue;
2116
2162
  case 3:
2117
- if (tag != 26) {
2163
+ if (tag !== 26) {
2118
2164
  break;
2119
2165
  }
2120
2166
 
2121
2167
  message.value = { $case: "speaker", speaker: ActiveSpeakerUpdate.decode(reader, reader.uint32()) };
2122
2168
  continue;
2123
2169
  }
2124
- if ((tag & 7) == 4 || tag == 0) {
2170
+ if ((tag & 7) === 4 || tag === 0) {
2125
2171
  break;
2126
2172
  }
2127
2173
  reader.skipType(tag & 7);
@@ -2187,14 +2233,14 @@ export const ActiveSpeakerUpdate = {
2187
2233
  const tag = reader.uint32();
2188
2234
  switch (tag >>> 3) {
2189
2235
  case 1:
2190
- if (tag != 10) {
2236
+ if (tag !== 10) {
2191
2237
  break;
2192
2238
  }
2193
2239
 
2194
2240
  message.speakers.push(SpeakerInfo.decode(reader, reader.uint32()));
2195
2241
  continue;
2196
2242
  }
2197
- if ((tag & 7) == 4 || tag == 0) {
2243
+ if ((tag & 7) === 4 || tag === 0) {
2198
2244
  break;
2199
2245
  }
2200
2246
  reader.skipType(tag & 7);
@@ -2255,28 +2301,28 @@ export const SpeakerInfo = {
2255
2301
  const tag = reader.uint32();
2256
2302
  switch (tag >>> 3) {
2257
2303
  case 1:
2258
- if (tag != 10) {
2304
+ if (tag !== 10) {
2259
2305
  break;
2260
2306
  }
2261
2307
 
2262
2308
  message.sid = reader.string();
2263
2309
  continue;
2264
2310
  case 2:
2265
- if (tag != 21) {
2311
+ if (tag !== 21) {
2266
2312
  break;
2267
2313
  }
2268
2314
 
2269
2315
  message.level = reader.float();
2270
2316
  continue;
2271
2317
  case 3:
2272
- if (tag != 24) {
2318
+ if (tag !== 24) {
2273
2319
  break;
2274
2320
  }
2275
2321
 
2276
2322
  message.active = reader.bool();
2277
2323
  continue;
2278
2324
  }
2279
- if ((tag & 7) == 4 || tag == 0) {
2325
+ if ((tag & 7) === 4 || tag === 0) {
2280
2326
  break;
2281
2327
  }
2282
2328
  reader.skipType(tag & 7);
@@ -2342,35 +2388,35 @@ export const UserPacket = {
2342
2388
  const tag = reader.uint32();
2343
2389
  switch (tag >>> 3) {
2344
2390
  case 1:
2345
- if (tag != 10) {
2391
+ if (tag !== 10) {
2346
2392
  break;
2347
2393
  }
2348
2394
 
2349
2395
  message.participantSid = reader.string();
2350
2396
  continue;
2351
2397
  case 2:
2352
- if (tag != 18) {
2398
+ if (tag !== 18) {
2353
2399
  break;
2354
2400
  }
2355
2401
 
2356
2402
  message.payload = reader.bytes();
2357
2403
  continue;
2358
2404
  case 3:
2359
- if (tag != 26) {
2405
+ if (tag !== 26) {
2360
2406
  break;
2361
2407
  }
2362
2408
 
2363
2409
  message.destinationSids.push(reader.string());
2364
2410
  continue;
2365
2411
  case 4:
2366
- if (tag != 34) {
2412
+ if (tag !== 34) {
2367
2413
  break;
2368
2414
  }
2369
2415
 
2370
2416
  message.topic = reader.string();
2371
2417
  continue;
2372
2418
  }
2373
- if ((tag & 7) == 4 || tag == 0) {
2419
+ if ((tag & 7) === 4 || tag === 0) {
2374
2420
  break;
2375
2421
  }
2376
2422
  reader.skipType(tag & 7);
@@ -2438,21 +2484,21 @@ export const ParticipantTracks = {
2438
2484
  const tag = reader.uint32();
2439
2485
  switch (tag >>> 3) {
2440
2486
  case 1:
2441
- if (tag != 10) {
2487
+ if (tag !== 10) {
2442
2488
  break;
2443
2489
  }
2444
2490
 
2445
2491
  message.participantSid = reader.string();
2446
2492
  continue;
2447
2493
  case 2:
2448
- if (tag != 18) {
2494
+ if (tag !== 18) {
2449
2495
  break;
2450
2496
  }
2451
2497
 
2452
2498
  message.trackSids.push(reader.string());
2453
2499
  continue;
2454
2500
  }
2455
- if ((tag & 7) == 4 || tag == 0) {
2501
+ if ((tag & 7) === 4 || tag === 0) {
2456
2502
  break;
2457
2503
  }
2458
2504
  reader.skipType(tag & 7);
@@ -2525,49 +2571,49 @@ export const ServerInfo = {
2525
2571
  const tag = reader.uint32();
2526
2572
  switch (tag >>> 3) {
2527
2573
  case 1:
2528
- if (tag != 8) {
2574
+ if (tag !== 8) {
2529
2575
  break;
2530
2576
  }
2531
2577
 
2532
2578
  message.edition = reader.int32() as any;
2533
2579
  continue;
2534
2580
  case 2:
2535
- if (tag != 18) {
2581
+ if (tag !== 18) {
2536
2582
  break;
2537
2583
  }
2538
2584
 
2539
2585
  message.version = reader.string();
2540
2586
  continue;
2541
2587
  case 3:
2542
- if (tag != 24) {
2588
+ if (tag !== 24) {
2543
2589
  break;
2544
2590
  }
2545
2591
 
2546
2592
  message.protocol = reader.int32();
2547
2593
  continue;
2548
2594
  case 4:
2549
- if (tag != 34) {
2595
+ if (tag !== 34) {
2550
2596
  break;
2551
2597
  }
2552
2598
 
2553
2599
  message.region = reader.string();
2554
2600
  continue;
2555
2601
  case 5:
2556
- if (tag != 42) {
2602
+ if (tag !== 42) {
2557
2603
  break;
2558
2604
  }
2559
2605
 
2560
2606
  message.nodeId = reader.string();
2561
2607
  continue;
2562
2608
  case 6:
2563
- if (tag != 50) {
2609
+ if (tag !== 50) {
2564
2610
  break;
2565
2611
  }
2566
2612
 
2567
2613
  message.debugInfo = reader.string();
2568
2614
  continue;
2569
2615
  }
2570
- if ((tag & 7) == 4 || tag == 0) {
2616
+ if ((tag & 7) === 4 || tag === 0) {
2571
2617
  break;
2572
2618
  }
2573
2619
  reader.skipType(tag & 7);
@@ -2671,77 +2717,77 @@ export const ClientInfo = {
2671
2717
  const tag = reader.uint32();
2672
2718
  switch (tag >>> 3) {
2673
2719
  case 1:
2674
- if (tag != 8) {
2720
+ if (tag !== 8) {
2675
2721
  break;
2676
2722
  }
2677
2723
 
2678
2724
  message.sdk = reader.int32() as any;
2679
2725
  continue;
2680
2726
  case 2:
2681
- if (tag != 18) {
2727
+ if (tag !== 18) {
2682
2728
  break;
2683
2729
  }
2684
2730
 
2685
2731
  message.version = reader.string();
2686
2732
  continue;
2687
2733
  case 3:
2688
- if (tag != 24) {
2734
+ if (tag !== 24) {
2689
2735
  break;
2690
2736
  }
2691
2737
 
2692
2738
  message.protocol = reader.int32();
2693
2739
  continue;
2694
2740
  case 4:
2695
- if (tag != 34) {
2741
+ if (tag !== 34) {
2696
2742
  break;
2697
2743
  }
2698
2744
 
2699
2745
  message.os = reader.string();
2700
2746
  continue;
2701
2747
  case 5:
2702
- if (tag != 42) {
2748
+ if (tag !== 42) {
2703
2749
  break;
2704
2750
  }
2705
2751
 
2706
2752
  message.osVersion = reader.string();
2707
2753
  continue;
2708
2754
  case 6:
2709
- if (tag != 50) {
2755
+ if (tag !== 50) {
2710
2756
  break;
2711
2757
  }
2712
2758
 
2713
2759
  message.deviceModel = reader.string();
2714
2760
  continue;
2715
2761
  case 7:
2716
- if (tag != 58) {
2762
+ if (tag !== 58) {
2717
2763
  break;
2718
2764
  }
2719
2765
 
2720
2766
  message.browser = reader.string();
2721
2767
  continue;
2722
2768
  case 8:
2723
- if (tag != 66) {
2769
+ if (tag !== 66) {
2724
2770
  break;
2725
2771
  }
2726
2772
 
2727
2773
  message.browserVersion = reader.string();
2728
2774
  continue;
2729
2775
  case 9:
2730
- if (tag != 74) {
2776
+ if (tag !== 74) {
2731
2777
  break;
2732
2778
  }
2733
2779
 
2734
2780
  message.address = reader.string();
2735
2781
  continue;
2736
2782
  case 10:
2737
- if (tag != 82) {
2783
+ if (tag !== 82) {
2738
2784
  break;
2739
2785
  }
2740
2786
 
2741
2787
  message.network = reader.string();
2742
2788
  continue;
2743
2789
  }
2744
- if ((tag & 7) == 4 || tag == 0) {
2790
+ if ((tag & 7) === 4 || tag === 0) {
2745
2791
  break;
2746
2792
  }
2747
2793
  reader.skipType(tag & 7);
@@ -2831,42 +2877,42 @@ export const ClientConfiguration = {
2831
2877
  const tag = reader.uint32();
2832
2878
  switch (tag >>> 3) {
2833
2879
  case 1:
2834
- if (tag != 10) {
2880
+ if (tag !== 10) {
2835
2881
  break;
2836
2882
  }
2837
2883
 
2838
2884
  message.video = VideoConfiguration.decode(reader, reader.uint32());
2839
2885
  continue;
2840
2886
  case 2:
2841
- if (tag != 18) {
2887
+ if (tag !== 18) {
2842
2888
  break;
2843
2889
  }
2844
2890
 
2845
2891
  message.screen = VideoConfiguration.decode(reader, reader.uint32());
2846
2892
  continue;
2847
2893
  case 3:
2848
- if (tag != 24) {
2894
+ if (tag !== 24) {
2849
2895
  break;
2850
2896
  }
2851
2897
 
2852
2898
  message.resumeConnection = reader.int32() as any;
2853
2899
  continue;
2854
2900
  case 4:
2855
- if (tag != 34) {
2901
+ if (tag !== 34) {
2856
2902
  break;
2857
2903
  }
2858
2904
 
2859
2905
  message.disabledCodecs = DisabledCodecs.decode(reader, reader.uint32());
2860
2906
  continue;
2861
2907
  case 5:
2862
- if (tag != 40) {
2908
+ if (tag !== 40) {
2863
2909
  break;
2864
2910
  }
2865
2911
 
2866
2912
  message.forceRelay = reader.int32() as any;
2867
2913
  continue;
2868
2914
  }
2869
- if ((tag & 7) == 4 || tag == 0) {
2915
+ if ((tag & 7) === 4 || tag === 0) {
2870
2916
  break;
2871
2917
  }
2872
2918
  reader.skipType(tag & 7);
@@ -2938,14 +2984,14 @@ export const VideoConfiguration = {
2938
2984
  const tag = reader.uint32();
2939
2985
  switch (tag >>> 3) {
2940
2986
  case 1:
2941
- if (tag != 8) {
2987
+ if (tag !== 8) {
2942
2988
  break;
2943
2989
  }
2944
2990
 
2945
2991
  message.hardwareEncoder = reader.int32() as any;
2946
2992
  continue;
2947
2993
  }
2948
- if ((tag & 7) == 4 || tag == 0) {
2994
+ if ((tag & 7) === 4 || tag === 0) {
2949
2995
  break;
2950
2996
  }
2951
2997
  reader.skipType(tag & 7);
@@ -2975,7 +3021,7 @@ export const VideoConfiguration = {
2975
3021
  };
2976
3022
 
2977
3023
  function createBaseDisabledCodecs(): DisabledCodecs {
2978
- return { codecs: [] };
3024
+ return { codecs: [], publish: [] };
2979
3025
  }
2980
3026
 
2981
3027
  export const DisabledCodecs = {
@@ -2983,6 +3029,9 @@ export const DisabledCodecs = {
2983
3029
  for (const v of message.codecs) {
2984
3030
  Codec.encode(v!, writer.uint32(10).fork()).ldelim();
2985
3031
  }
3032
+ for (const v of message.publish) {
3033
+ Codec.encode(v!, writer.uint32(18).fork()).ldelim();
3034
+ }
2986
3035
  return writer;
2987
3036
  },
2988
3037
 
@@ -2994,14 +3043,21 @@ export const DisabledCodecs = {
2994
3043
  const tag = reader.uint32();
2995
3044
  switch (tag >>> 3) {
2996
3045
  case 1:
2997
- if (tag != 10) {
3046
+ if (tag !== 10) {
2998
3047
  break;
2999
3048
  }
3000
3049
 
3001
3050
  message.codecs.push(Codec.decode(reader, reader.uint32()));
3002
3051
  continue;
3052
+ case 2:
3053
+ if (tag !== 18) {
3054
+ break;
3055
+ }
3056
+
3057
+ message.publish.push(Codec.decode(reader, reader.uint32()));
3058
+ continue;
3003
3059
  }
3004
- if ((tag & 7) == 4 || tag == 0) {
3060
+ if ((tag & 7) === 4 || tag === 0) {
3005
3061
  break;
3006
3062
  }
3007
3063
  reader.skipType(tag & 7);
@@ -3010,7 +3066,10 @@ export const DisabledCodecs = {
3010
3066
  },
3011
3067
 
3012
3068
  fromJSON(object: any): DisabledCodecs {
3013
- return { codecs: Array.isArray(object?.codecs) ? object.codecs.map((e: any) => Codec.fromJSON(e)) : [] };
3069
+ return {
3070
+ codecs: Array.isArray(object?.codecs) ? object.codecs.map((e: any) => Codec.fromJSON(e)) : [],
3071
+ publish: Array.isArray(object?.publish) ? object.publish.map((e: any) => Codec.fromJSON(e)) : [],
3072
+ };
3014
3073
  },
3015
3074
 
3016
3075
  toJSON(message: DisabledCodecs): unknown {
@@ -3020,6 +3079,11 @@ export const DisabledCodecs = {
3020
3079
  } else {
3021
3080
  obj.codecs = [];
3022
3081
  }
3082
+ if (message.publish) {
3083
+ obj.publish = message.publish.map((e) => e ? Codec.toJSON(e) : undefined);
3084
+ } else {
3085
+ obj.publish = [];
3086
+ }
3023
3087
  return obj;
3024
3088
  },
3025
3089
 
@@ -3030,6 +3094,7 @@ export const DisabledCodecs = {
3030
3094
  fromPartial<I extends Exact<DeepPartial<DisabledCodecs>, I>>(object: I): DisabledCodecs {
3031
3095
  const message = createBaseDisabledCodecs();
3032
3096
  message.codecs = object.codecs?.map((e) => Codec.fromPartial(e)) || [];
3097
+ message.publish = object.publish?.map((e) => Codec.fromPartial(e)) || [];
3033
3098
  return message;
3034
3099
  },
3035
3100
  };
@@ -3077,6 +3142,8 @@ function createBaseRTPStats(): RTPStats {
3077
3142
  lastKeyFrame: undefined,
3078
3143
  layerLockPlis: 0,
3079
3144
  lastLayerLockPli: undefined,
3145
+ sampleRate: 0,
3146
+ driftMs: 0,
3080
3147
  };
3081
3148
  }
3082
3149
 
@@ -3205,6 +3272,12 @@ export const RTPStats = {
3205
3272
  if (message.lastLayerLockPli !== undefined) {
3206
3273
  Timestamp.encode(toTimestamp(message.lastLayerLockPli), writer.uint32(290).fork()).ldelim();
3207
3274
  }
3275
+ if (message.sampleRate !== 0) {
3276
+ writer.uint32(337).double(message.sampleRate);
3277
+ }
3278
+ if (message.driftMs !== 0) {
3279
+ writer.uint32(345).double(message.driftMs);
3280
+ }
3208
3281
  return writer;
3209
3282
  },
3210
3283
 
@@ -3216,189 +3289,189 @@ export const RTPStats = {
3216
3289
  const tag = reader.uint32();
3217
3290
  switch (tag >>> 3) {
3218
3291
  case 1:
3219
- if (tag != 10) {
3292
+ if (tag !== 10) {
3220
3293
  break;
3221
3294
  }
3222
3295
 
3223
3296
  message.startTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3224
3297
  continue;
3225
3298
  case 2:
3226
- if (tag != 18) {
3299
+ if (tag !== 18) {
3227
3300
  break;
3228
3301
  }
3229
3302
 
3230
3303
  message.endTime = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3231
3304
  continue;
3232
3305
  case 3:
3233
- if (tag != 25) {
3306
+ if (tag !== 25) {
3234
3307
  break;
3235
3308
  }
3236
3309
 
3237
3310
  message.duration = reader.double();
3238
3311
  continue;
3239
3312
  case 4:
3240
- if (tag != 32) {
3313
+ if (tag !== 32) {
3241
3314
  break;
3242
3315
  }
3243
3316
 
3244
3317
  message.packets = reader.uint32();
3245
3318
  continue;
3246
3319
  case 5:
3247
- if (tag != 41) {
3320
+ if (tag !== 41) {
3248
3321
  break;
3249
3322
  }
3250
3323
 
3251
3324
  message.packetRate = reader.double();
3252
3325
  continue;
3253
3326
  case 6:
3254
- if (tag != 48) {
3327
+ if (tag !== 48) {
3255
3328
  break;
3256
3329
  }
3257
3330
 
3258
3331
  message.bytes = longToNumber(reader.uint64() as Long);
3259
3332
  continue;
3260
3333
  case 39:
3261
- if (tag != 312) {
3334
+ if (tag !== 312) {
3262
3335
  break;
3263
3336
  }
3264
3337
 
3265
3338
  message.headerBytes = longToNumber(reader.uint64() as Long);
3266
3339
  continue;
3267
3340
  case 7:
3268
- if (tag != 57) {
3341
+ if (tag !== 57) {
3269
3342
  break;
3270
3343
  }
3271
3344
 
3272
3345
  message.bitrate = reader.double();
3273
3346
  continue;
3274
3347
  case 8:
3275
- if (tag != 64) {
3348
+ if (tag !== 64) {
3276
3349
  break;
3277
3350
  }
3278
3351
 
3279
3352
  message.packetsLost = reader.uint32();
3280
3353
  continue;
3281
3354
  case 9:
3282
- if (tag != 73) {
3355
+ if (tag !== 73) {
3283
3356
  break;
3284
3357
  }
3285
3358
 
3286
3359
  message.packetLossRate = reader.double();
3287
3360
  continue;
3288
3361
  case 10:
3289
- if (tag != 85) {
3362
+ if (tag !== 85) {
3290
3363
  break;
3291
3364
  }
3292
3365
 
3293
3366
  message.packetLossPercentage = reader.float();
3294
3367
  continue;
3295
3368
  case 11:
3296
- if (tag != 88) {
3369
+ if (tag !== 88) {
3297
3370
  break;
3298
3371
  }
3299
3372
 
3300
3373
  message.packetsDuplicate = reader.uint32();
3301
3374
  continue;
3302
3375
  case 12:
3303
- if (tag != 97) {
3376
+ if (tag !== 97) {
3304
3377
  break;
3305
3378
  }
3306
3379
 
3307
3380
  message.packetDuplicateRate = reader.double();
3308
3381
  continue;
3309
3382
  case 13:
3310
- if (tag != 104) {
3383
+ if (tag !== 104) {
3311
3384
  break;
3312
3385
  }
3313
3386
 
3314
3387
  message.bytesDuplicate = longToNumber(reader.uint64() as Long);
3315
3388
  continue;
3316
3389
  case 40:
3317
- if (tag != 320) {
3390
+ if (tag !== 320) {
3318
3391
  break;
3319
3392
  }
3320
3393
 
3321
3394
  message.headerBytesDuplicate = longToNumber(reader.uint64() as Long);
3322
3395
  continue;
3323
3396
  case 14:
3324
- if (tag != 113) {
3397
+ if (tag !== 113) {
3325
3398
  break;
3326
3399
  }
3327
3400
 
3328
3401
  message.bitrateDuplicate = reader.double();
3329
3402
  continue;
3330
3403
  case 15:
3331
- if (tag != 120) {
3404
+ if (tag !== 120) {
3332
3405
  break;
3333
3406
  }
3334
3407
 
3335
3408
  message.packetsPadding = reader.uint32();
3336
3409
  continue;
3337
3410
  case 16:
3338
- if (tag != 129) {
3411
+ if (tag !== 129) {
3339
3412
  break;
3340
3413
  }
3341
3414
 
3342
3415
  message.packetPaddingRate = reader.double();
3343
3416
  continue;
3344
3417
  case 17:
3345
- if (tag != 136) {
3418
+ if (tag !== 136) {
3346
3419
  break;
3347
3420
  }
3348
3421
 
3349
3422
  message.bytesPadding = longToNumber(reader.uint64() as Long);
3350
3423
  continue;
3351
3424
  case 41:
3352
- if (tag != 328) {
3425
+ if (tag !== 328) {
3353
3426
  break;
3354
3427
  }
3355
3428
 
3356
3429
  message.headerBytesPadding = longToNumber(reader.uint64() as Long);
3357
3430
  continue;
3358
3431
  case 18:
3359
- if (tag != 145) {
3432
+ if (tag !== 145) {
3360
3433
  break;
3361
3434
  }
3362
3435
 
3363
3436
  message.bitratePadding = reader.double();
3364
3437
  continue;
3365
3438
  case 19:
3366
- if (tag != 152) {
3439
+ if (tag !== 152) {
3367
3440
  break;
3368
3441
  }
3369
3442
 
3370
3443
  message.packetsOutOfOrder = reader.uint32();
3371
3444
  continue;
3372
3445
  case 20:
3373
- if (tag != 160) {
3446
+ if (tag !== 160) {
3374
3447
  break;
3375
3448
  }
3376
3449
 
3377
3450
  message.frames = reader.uint32();
3378
3451
  continue;
3379
3452
  case 21:
3380
- if (tag != 169) {
3453
+ if (tag !== 169) {
3381
3454
  break;
3382
3455
  }
3383
3456
 
3384
3457
  message.frameRate = reader.double();
3385
3458
  continue;
3386
3459
  case 22:
3387
- if (tag != 177) {
3460
+ if (tag !== 177) {
3388
3461
  break;
3389
3462
  }
3390
3463
 
3391
3464
  message.jitterCurrent = reader.double();
3392
3465
  continue;
3393
3466
  case 23:
3394
- if (tag != 185) {
3467
+ if (tag !== 185) {
3395
3468
  break;
3396
3469
  }
3397
3470
 
3398
3471
  message.jitterMax = reader.double();
3399
3472
  continue;
3400
3473
  case 24:
3401
- if (tag != 194) {
3474
+ if (tag !== 194) {
3402
3475
  break;
3403
3476
  }
3404
3477
 
@@ -3408,105 +3481,119 @@ export const RTPStats = {
3408
3481
  }
3409
3482
  continue;
3410
3483
  case 25:
3411
- if (tag != 200) {
3484
+ if (tag !== 200) {
3412
3485
  break;
3413
3486
  }
3414
3487
 
3415
3488
  message.nacks = reader.uint32();
3416
3489
  continue;
3417
3490
  case 37:
3418
- if (tag != 296) {
3491
+ if (tag !== 296) {
3419
3492
  break;
3420
3493
  }
3421
3494
 
3422
3495
  message.nackAcks = reader.uint32();
3423
3496
  continue;
3424
3497
  case 26:
3425
- if (tag != 208) {
3498
+ if (tag !== 208) {
3426
3499
  break;
3427
3500
  }
3428
3501
 
3429
3502
  message.nackMisses = reader.uint32();
3430
3503
  continue;
3431
3504
  case 38:
3432
- if (tag != 304) {
3505
+ if (tag !== 304) {
3433
3506
  break;
3434
3507
  }
3435
3508
 
3436
3509
  message.nackRepeated = reader.uint32();
3437
3510
  continue;
3438
3511
  case 27:
3439
- if (tag != 216) {
3512
+ if (tag !== 216) {
3440
3513
  break;
3441
3514
  }
3442
3515
 
3443
3516
  message.plis = reader.uint32();
3444
3517
  continue;
3445
3518
  case 28:
3446
- if (tag != 226) {
3519
+ if (tag !== 226) {
3447
3520
  break;
3448
3521
  }
3449
3522
 
3450
3523
  message.lastPli = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3451
3524
  continue;
3452
3525
  case 29:
3453
- if (tag != 232) {
3526
+ if (tag !== 232) {
3454
3527
  break;
3455
3528
  }
3456
3529
 
3457
3530
  message.firs = reader.uint32();
3458
3531
  continue;
3459
3532
  case 30:
3460
- if (tag != 242) {
3533
+ if (tag !== 242) {
3461
3534
  break;
3462
3535
  }
3463
3536
 
3464
3537
  message.lastFir = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3465
3538
  continue;
3466
3539
  case 31:
3467
- if (tag != 248) {
3540
+ if (tag !== 248) {
3468
3541
  break;
3469
3542
  }
3470
3543
 
3471
3544
  message.rttCurrent = reader.uint32();
3472
3545
  continue;
3473
3546
  case 32:
3474
- if (tag != 256) {
3547
+ if (tag !== 256) {
3475
3548
  break;
3476
3549
  }
3477
3550
 
3478
3551
  message.rttMax = reader.uint32();
3479
3552
  continue;
3480
3553
  case 33:
3481
- if (tag != 264) {
3554
+ if (tag !== 264) {
3482
3555
  break;
3483
3556
  }
3484
3557
 
3485
3558
  message.keyFrames = reader.uint32();
3486
3559
  continue;
3487
3560
  case 34:
3488
- if (tag != 274) {
3561
+ if (tag !== 274) {
3489
3562
  break;
3490
3563
  }
3491
3564
 
3492
3565
  message.lastKeyFrame = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3493
3566
  continue;
3494
3567
  case 35:
3495
- if (tag != 280) {
3568
+ if (tag !== 280) {
3496
3569
  break;
3497
3570
  }
3498
3571
 
3499
3572
  message.layerLockPlis = reader.uint32();
3500
3573
  continue;
3501
3574
  case 36:
3502
- if (tag != 290) {
3575
+ if (tag !== 290) {
3503
3576
  break;
3504
3577
  }
3505
3578
 
3506
3579
  message.lastLayerLockPli = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3507
3580
  continue;
3581
+ case 42:
3582
+ if (tag !== 337) {
3583
+ break;
3584
+ }
3585
+
3586
+ message.sampleRate = reader.double();
3587
+ continue;
3588
+ case 43:
3589
+ if (tag !== 345) {
3590
+ break;
3591
+ }
3592
+
3593
+ message.driftMs = reader.double();
3594
+ continue;
3508
3595
  }
3509
- if ((tag & 7) == 4 || tag == 0) {
3596
+ if ((tag & 7) === 4 || tag === 0) {
3510
3597
  break;
3511
3598
  }
3512
3599
  reader.skipType(tag & 7);
@@ -3562,6 +3649,8 @@ export const RTPStats = {
3562
3649
  lastKeyFrame: isSet(object.lastKeyFrame) ? fromJsonTimestamp(object.lastKeyFrame) : undefined,
3563
3650
  layerLockPlis: isSet(object.layerLockPlis) ? Number(object.layerLockPlis) : 0,
3564
3651
  lastLayerLockPli: isSet(object.lastLayerLockPli) ? fromJsonTimestamp(object.lastLayerLockPli) : undefined,
3652
+ sampleRate: isSet(object.sampleRate) ? Number(object.sampleRate) : 0,
3653
+ driftMs: isSet(object.driftMs) ? Number(object.driftMs) : 0,
3565
3654
  };
3566
3655
  },
3567
3656
 
@@ -3613,6 +3702,8 @@ export const RTPStats = {
3613
3702
  message.lastKeyFrame !== undefined && (obj.lastKeyFrame = message.lastKeyFrame.toISOString());
3614
3703
  message.layerLockPlis !== undefined && (obj.layerLockPlis = Math.round(message.layerLockPlis));
3615
3704
  message.lastLayerLockPli !== undefined && (obj.lastLayerLockPli = message.lastLayerLockPli.toISOString());
3705
+ message.sampleRate !== undefined && (obj.sampleRate = message.sampleRate);
3706
+ message.driftMs !== undefined && (obj.driftMs = message.driftMs);
3616
3707
  return obj;
3617
3708
  },
3618
3709
 
@@ -3671,6 +3762,8 @@ export const RTPStats = {
3671
3762
  message.lastKeyFrame = object.lastKeyFrame ?? undefined;
3672
3763
  message.layerLockPlis = object.layerLockPlis ?? 0;
3673
3764
  message.lastLayerLockPli = object.lastLayerLockPli ?? undefined;
3765
+ message.sampleRate = object.sampleRate ?? 0;
3766
+ message.driftMs = object.driftMs ?? 0;
3674
3767
  return message;
3675
3768
  },
3676
3769
  };
@@ -3698,21 +3791,21 @@ export const RTPStats_GapHistogramEntry = {
3698
3791
  const tag = reader.uint32();
3699
3792
  switch (tag >>> 3) {
3700
3793
  case 1:
3701
- if (tag != 8) {
3794
+ if (tag !== 8) {
3702
3795
  break;
3703
3796
  }
3704
3797
 
3705
3798
  message.key = reader.int32();
3706
3799
  continue;
3707
3800
  case 2:
3708
- if (tag != 16) {
3801
+ if (tag !== 16) {
3709
3802
  break;
3710
3803
  }
3711
3804
 
3712
3805
  message.value = reader.uint32();
3713
3806
  continue;
3714
3807
  }
3715
- if ((tag & 7) == 4 || tag == 0) {
3808
+ if ((tag & 7) === 4 || tag === 0) {
3716
3809
  break;
3717
3810
  }
3718
3811
  reader.skipType(tag & 7);
@@ -3766,21 +3859,21 @@ export const TimedVersion = {
3766
3859
  const tag = reader.uint32();
3767
3860
  switch (tag >>> 3) {
3768
3861
  case 1:
3769
- if (tag != 8) {
3862
+ if (tag !== 8) {
3770
3863
  break;
3771
3864
  }
3772
3865
 
3773
3866
  message.unixMicro = longToNumber(reader.int64() as Long);
3774
3867
  continue;
3775
3868
  case 2:
3776
- if (tag != 16) {
3869
+ if (tag !== 16) {
3777
3870
  break;
3778
3871
  }
3779
3872
 
3780
3873
  message.ticks = reader.int32();
3781
3874
  continue;
3782
3875
  }
3783
- if ((tag & 7) == 4 || tag == 0) {
3876
+ if ((tag & 7) === 4 || tag === 0) {
3784
3877
  break;
3785
3878
  }
3786
3879
  reader.skipType(tag & 7);