@stinkycomputing/sesame-api-client 1.4.1-beta.1 → 1.4.1-beta.2

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/dist/index.mjs CHANGED
@@ -13304,15 +13304,22 @@ var sesame = $root.sesame = (() => {
13304
13304
  }
13305
13305
  TransportEvent.prototype.sourceId = "";
13306
13306
  TransportEvent.prototype.userId = "";
13307
+ TransportEvent.prototype.uri = "";
13307
13308
  TransportEvent.prototype.state = 0;
13308
13309
  TransportEvent.prototype.durationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13309
13310
  TransportEvent.prototype.positionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13310
13311
  TransportEvent.prototype.materialPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13312
+ TransportEvent.prototype.userTimeMs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13313
+ TransportEvent.prototype.speed = 0;
13311
13314
  TransportEvent.prototype.userPlaylistId = "";
13312
13315
  TransportEvent.prototype.playlistIndex = 0;
13313
13316
  TransportEvent.prototype.playlistLength = 0;
13314
13317
  TransportEvent.prototype.clipId = $util.Long ? $util.Long.fromBits(0, 0, true) : 0;
13315
13318
  TransportEvent.prototype.clipPositionUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13319
+ TransportEvent.prototype.clipDurationUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
13320
+ TransportEvent.prototype.preroll = 0;
13321
+ TransportEvent.prototype.postroll = 0;
13322
+ TransportEvent.prototype.metadata = "";
13316
13323
  TransportEvent.create = function create(properties) {
13317
13324
  return new TransportEvent(properties);
13318
13325
  };
@@ -13329,51 +13336,86 @@ var sesame = $root.sesame = (() => {
13329
13336
  /* id 2, wireType 2 =*/
13330
13337
  18
13331
13338
  ).string(message.userId);
13339
+ if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
13340
+ writer.uint32(
13341
+ /* id 3, wireType 2 =*/
13342
+ 26
13343
+ ).string(message.uri);
13332
13344
  if (message.state != null && Object.hasOwnProperty.call(message, "state"))
13333
13345
  writer.uint32(
13334
- /* id 3, wireType 0 =*/
13335
- 24
13346
+ /* id 4, wireType 0 =*/
13347
+ 32
13336
13348
  ).int32(message.state);
13337
13349
  if (message.durationUs != null && Object.hasOwnProperty.call(message, "durationUs"))
13338
13350
  writer.uint32(
13339
- /* id 4, wireType 0 =*/
13340
- 32
13351
+ /* id 5, wireType 0 =*/
13352
+ 40
13341
13353
  ).int64(message.durationUs);
13342
13354
  if (message.positionUs != null && Object.hasOwnProperty.call(message, "positionUs"))
13343
13355
  writer.uint32(
13344
- /* id 5, wireType 0 =*/
13345
- 40
13356
+ /* id 6, wireType 0 =*/
13357
+ 48
13346
13358
  ).int64(message.positionUs);
13347
13359
  if (message.materialPositionUs != null && Object.hasOwnProperty.call(message, "materialPositionUs"))
13348
13360
  writer.uint32(
13349
- /* id 6, wireType 0 =*/
13350
- 48
13361
+ /* id 7, wireType 0 =*/
13362
+ 56
13351
13363
  ).int64(message.materialPositionUs);
13364
+ if (message.userTimeMs != null && Object.hasOwnProperty.call(message, "userTimeMs"))
13365
+ writer.uint32(
13366
+ /* id 8, wireType 0 =*/
13367
+ 64
13368
+ ).int64(message.userTimeMs);
13369
+ if (message.speed != null && Object.hasOwnProperty.call(message, "speed"))
13370
+ writer.uint32(
13371
+ /* id 9, wireType 5 =*/
13372
+ 77
13373
+ ).float(message.speed);
13352
13374
  if (message.userPlaylistId != null && Object.hasOwnProperty.call(message, "userPlaylistId"))
13353
13375
  writer.uint32(
13354
- /* id 7, wireType 2 =*/
13355
- 58
13376
+ /* id 10, wireType 2 =*/
13377
+ 82
13356
13378
  ).string(message.userPlaylistId);
13357
13379
  if (message.playlistIndex != null && Object.hasOwnProperty.call(message, "playlistIndex"))
13358
13380
  writer.uint32(
13359
- /* id 8, wireType 0 =*/
13360
- 64
13381
+ /* id 11, wireType 0 =*/
13382
+ 88
13361
13383
  ).uint32(message.playlistIndex);
13362
13384
  if (message.playlistLength != null && Object.hasOwnProperty.call(message, "playlistLength"))
13363
13385
  writer.uint32(
13364
- /* id 9, wireType 0 =*/
13365
- 72
13386
+ /* id 12, wireType 0 =*/
13387
+ 96
13366
13388
  ).uint32(message.playlistLength);
13367
13389
  if (message.clipId != null && Object.hasOwnProperty.call(message, "clipId"))
13368
13390
  writer.uint32(
13369
- /* id 10, wireType 0 =*/
13370
- 80
13391
+ /* id 13, wireType 0 =*/
13392
+ 104
13371
13393
  ).uint64(message.clipId);
13372
13394
  if (message.clipPositionUs != null && Object.hasOwnProperty.call(message, "clipPositionUs"))
13373
13395
  writer.uint32(
13374
- /* id 11, wireType 0 =*/
13375
- 88
13396
+ /* id 14, wireType 0 =*/
13397
+ 112
13376
13398
  ).int64(message.clipPositionUs);
13399
+ if (message.clipDurationUs != null && Object.hasOwnProperty.call(message, "clipDurationUs"))
13400
+ writer.uint32(
13401
+ /* id 15, wireType 0 =*/
13402
+ 120
13403
+ ).int64(message.clipDurationUs);
13404
+ if (message.preroll != null && Object.hasOwnProperty.call(message, "preroll"))
13405
+ writer.uint32(
13406
+ /* id 16, wireType 0 =*/
13407
+ 128
13408
+ ).uint32(message.preroll);
13409
+ if (message.postroll != null && Object.hasOwnProperty.call(message, "postroll"))
13410
+ writer.uint32(
13411
+ /* id 17, wireType 0 =*/
13412
+ 136
13413
+ ).uint32(message.postroll);
13414
+ if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
13415
+ writer.uint32(
13416
+ /* id 18, wireType 2 =*/
13417
+ 146
13418
+ ).string(message.metadata);
13377
13419
  return writer;
13378
13420
  };
13379
13421
  TransportEvent.encodeDelimited = function encodeDelimited(message, writer) {
@@ -13397,41 +13439,69 @@ var sesame = $root.sesame = (() => {
13397
13439
  break;
13398
13440
  }
13399
13441
  case 3: {
13400
- message.state = reader.int32();
13442
+ message.uri = reader.string();
13401
13443
  break;
13402
13444
  }
13403
13445
  case 4: {
13404
- message.durationUs = reader.int64();
13446
+ message.state = reader.int32();
13405
13447
  break;
13406
13448
  }
13407
13449
  case 5: {
13408
- message.positionUs = reader.int64();
13450
+ message.durationUs = reader.int64();
13409
13451
  break;
13410
13452
  }
13411
13453
  case 6: {
13412
- message.materialPositionUs = reader.int64();
13454
+ message.positionUs = reader.int64();
13413
13455
  break;
13414
13456
  }
13415
13457
  case 7: {
13416
- message.userPlaylistId = reader.string();
13458
+ message.materialPositionUs = reader.int64();
13417
13459
  break;
13418
13460
  }
13419
13461
  case 8: {
13420
- message.playlistIndex = reader.uint32();
13462
+ message.userTimeMs = reader.int64();
13421
13463
  break;
13422
13464
  }
13423
13465
  case 9: {
13424
- message.playlistLength = reader.uint32();
13466
+ message.speed = reader.float();
13425
13467
  break;
13426
13468
  }
13427
13469
  case 10: {
13428
- message.clipId = reader.uint64();
13470
+ message.userPlaylistId = reader.string();
13429
13471
  break;
13430
13472
  }
13431
13473
  case 11: {
13474
+ message.playlistIndex = reader.uint32();
13475
+ break;
13476
+ }
13477
+ case 12: {
13478
+ message.playlistLength = reader.uint32();
13479
+ break;
13480
+ }
13481
+ case 13: {
13482
+ message.clipId = reader.uint64();
13483
+ break;
13484
+ }
13485
+ case 14: {
13432
13486
  message.clipPositionUs = reader.int64();
13433
13487
  break;
13434
13488
  }
13489
+ case 15: {
13490
+ message.clipDurationUs = reader.int64();
13491
+ break;
13492
+ }
13493
+ case 16: {
13494
+ message.preroll = reader.uint32();
13495
+ break;
13496
+ }
13497
+ case 17: {
13498
+ message.postroll = reader.uint32();
13499
+ break;
13500
+ }
13501
+ case 18: {
13502
+ message.metadata = reader.string();
13503
+ break;
13504
+ }
13435
13505
  default:
13436
13506
  reader.skipType(tag & 7);
13437
13507
  break;
@@ -13455,6 +13525,10 @@ var sesame = $root.sesame = (() => {
13455
13525
  if (!$util.isString(message.userId))
13456
13526
  return "userId: string expected";
13457
13527
  }
13528
+ if (message.uri != null && message.hasOwnProperty("uri")) {
13529
+ if (!$util.isString(message.uri))
13530
+ return "uri: string expected";
13531
+ }
13458
13532
  if (message.state != null && message.hasOwnProperty("state"))
13459
13533
  switch (message.state) {
13460
13534
  default:
@@ -13478,6 +13552,14 @@ var sesame = $root.sesame = (() => {
13478
13552
  if (!$util.isInteger(message.materialPositionUs) && !(message.materialPositionUs && $util.isInteger(message.materialPositionUs.low) && $util.isInteger(message.materialPositionUs.high)))
13479
13553
  return "materialPositionUs: integer|Long expected";
13480
13554
  }
13555
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs")) {
13556
+ if (!$util.isInteger(message.userTimeMs) && !(message.userTimeMs && $util.isInteger(message.userTimeMs.low) && $util.isInteger(message.userTimeMs.high)))
13557
+ return "userTimeMs: integer|Long expected";
13558
+ }
13559
+ if (message.speed != null && message.hasOwnProperty("speed")) {
13560
+ if (typeof message.speed !== "number")
13561
+ return "speed: number expected";
13562
+ }
13481
13563
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId")) {
13482
13564
  if (!$util.isString(message.userPlaylistId))
13483
13565
  return "userPlaylistId: string expected";
@@ -13498,6 +13580,22 @@ var sesame = $root.sesame = (() => {
13498
13580
  if (!$util.isInteger(message.clipPositionUs) && !(message.clipPositionUs && $util.isInteger(message.clipPositionUs.low) && $util.isInteger(message.clipPositionUs.high)))
13499
13581
  return "clipPositionUs: integer|Long expected";
13500
13582
  }
13583
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs")) {
13584
+ if (!$util.isInteger(message.clipDurationUs) && !(message.clipDurationUs && $util.isInteger(message.clipDurationUs.low) && $util.isInteger(message.clipDurationUs.high)))
13585
+ return "clipDurationUs: integer|Long expected";
13586
+ }
13587
+ if (message.preroll != null && message.hasOwnProperty("preroll")) {
13588
+ if (!$util.isInteger(message.preroll))
13589
+ return "preroll: integer expected";
13590
+ }
13591
+ if (message.postroll != null && message.hasOwnProperty("postroll")) {
13592
+ if (!$util.isInteger(message.postroll))
13593
+ return "postroll: integer expected";
13594
+ }
13595
+ if (message.metadata != null && message.hasOwnProperty("metadata")) {
13596
+ if (!$util.isString(message.metadata))
13597
+ return "metadata: string expected";
13598
+ }
13501
13599
  return null;
13502
13600
  };
13503
13601
  TransportEvent.fromObject = function fromObject(object) {
@@ -13508,6 +13606,8 @@ var sesame = $root.sesame = (() => {
13508
13606
  message.sourceId = String(object.sourceId);
13509
13607
  if (object.userId != null)
13510
13608
  message.userId = String(object.userId);
13609
+ if (object.uri != null)
13610
+ message.uri = String(object.uri);
13511
13611
  switch (object.state) {
13512
13612
  default:
13513
13613
  if (typeof object.state === "number") {
@@ -13566,6 +13666,18 @@ var sesame = $root.sesame = (() => {
13566
13666
  else if (typeof object.materialPositionUs === "object")
13567
13667
  message.materialPositionUs = new $util.LongBits(object.materialPositionUs.low >>> 0, object.materialPositionUs.high >>> 0).toNumber();
13568
13668
  }
13669
+ if (object.userTimeMs != null) {
13670
+ if ($util.Long)
13671
+ (message.userTimeMs = $util.Long.fromValue(object.userTimeMs)).unsigned = false;
13672
+ else if (typeof object.userTimeMs === "string")
13673
+ message.userTimeMs = parseInt(object.userTimeMs, 10);
13674
+ else if (typeof object.userTimeMs === "number")
13675
+ message.userTimeMs = object.userTimeMs;
13676
+ else if (typeof object.userTimeMs === "object")
13677
+ message.userTimeMs = new $util.LongBits(object.userTimeMs.low >>> 0, object.userTimeMs.high >>> 0).toNumber();
13678
+ }
13679
+ if (object.speed != null)
13680
+ message.speed = Number(object.speed);
13569
13681
  if (object.userPlaylistId != null)
13570
13682
  message.userPlaylistId = String(object.userPlaylistId);
13571
13683
  if (object.playlistIndex != null)
@@ -13592,6 +13704,22 @@ var sesame = $root.sesame = (() => {
13592
13704
  else if (typeof object.clipPositionUs === "object")
13593
13705
  message.clipPositionUs = new $util.LongBits(object.clipPositionUs.low >>> 0, object.clipPositionUs.high >>> 0).toNumber();
13594
13706
  }
13707
+ if (object.clipDurationUs != null) {
13708
+ if ($util.Long)
13709
+ (message.clipDurationUs = $util.Long.fromValue(object.clipDurationUs)).unsigned = false;
13710
+ else if (typeof object.clipDurationUs === "string")
13711
+ message.clipDurationUs = parseInt(object.clipDurationUs, 10);
13712
+ else if (typeof object.clipDurationUs === "number")
13713
+ message.clipDurationUs = object.clipDurationUs;
13714
+ else if (typeof object.clipDurationUs === "object")
13715
+ message.clipDurationUs = new $util.LongBits(object.clipDurationUs.low >>> 0, object.clipDurationUs.high >>> 0).toNumber();
13716
+ }
13717
+ if (object.preroll != null)
13718
+ message.preroll = object.preroll >>> 0;
13719
+ if (object.postroll != null)
13720
+ message.postroll = object.postroll >>> 0;
13721
+ if (object.metadata != null)
13722
+ message.metadata = String(object.metadata);
13595
13723
  return message;
13596
13724
  };
13597
13725
  TransportEvent.toObject = function toObject(message, options) {
@@ -13601,6 +13729,7 @@ var sesame = $root.sesame = (() => {
13601
13729
  if (options.defaults) {
13602
13730
  object.sourceId = "";
13603
13731
  object.userId = "";
13732
+ object.uri = "";
13604
13733
  object.state = options.enums === String ? "SOURCE_TRANSPORT_STATE_STOPPED" : 0;
13605
13734
  if ($util.Long) {
13606
13735
  let long = new $util.Long(0, 0, false);
@@ -13617,6 +13746,12 @@ var sesame = $root.sesame = (() => {
13617
13746
  object.materialPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13618
13747
  } else
13619
13748
  object.materialPositionUs = options.longs === String ? "0" : 0;
13749
+ if ($util.Long) {
13750
+ let long = new $util.Long(0, 0, false);
13751
+ object.userTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13752
+ } else
13753
+ object.userTimeMs = options.longs === String ? "0" : 0;
13754
+ object.speed = 0;
13620
13755
  object.userPlaylistId = "";
13621
13756
  object.playlistIndex = 0;
13622
13757
  object.playlistLength = 0;
@@ -13630,11 +13765,21 @@ var sesame = $root.sesame = (() => {
13630
13765
  object.clipPositionUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13631
13766
  } else
13632
13767
  object.clipPositionUs = options.longs === String ? "0" : 0;
13768
+ if ($util.Long) {
13769
+ let long = new $util.Long(0, 0, false);
13770
+ object.clipDurationUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
13771
+ } else
13772
+ object.clipDurationUs = options.longs === String ? "0" : 0;
13773
+ object.preroll = 0;
13774
+ object.postroll = 0;
13775
+ object.metadata = "";
13633
13776
  }
13634
13777
  if (message.sourceId != null && message.hasOwnProperty("sourceId"))
13635
13778
  object.sourceId = message.sourceId;
13636
13779
  if (message.userId != null && message.hasOwnProperty("userId"))
13637
13780
  object.userId = message.userId;
13781
+ if (message.uri != null && message.hasOwnProperty("uri"))
13782
+ object.uri = message.uri;
13638
13783
  if (message.state != null && message.hasOwnProperty("state"))
13639
13784
  object.state = options.enums === String ? $root.sesame.v1.sources.SourceTransportState[message.state] === void 0 ? message.state : $root.sesame.v1.sources.SourceTransportState[message.state] : message.state;
13640
13785
  if (message.durationUs != null && message.hasOwnProperty("durationUs"))
@@ -13652,6 +13797,13 @@ var sesame = $root.sesame = (() => {
13652
13797
  object.materialPositionUs = options.longs === String ? String(message.materialPositionUs) : message.materialPositionUs;
13653
13798
  else
13654
13799
  object.materialPositionUs = options.longs === String ? $util.Long.prototype.toString.call(message.materialPositionUs) : options.longs === Number ? new $util.LongBits(message.materialPositionUs.low >>> 0, message.materialPositionUs.high >>> 0).toNumber() : message.materialPositionUs;
13800
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs"))
13801
+ if (typeof message.userTimeMs === "number")
13802
+ object.userTimeMs = options.longs === String ? String(message.userTimeMs) : message.userTimeMs;
13803
+ else
13804
+ object.userTimeMs = options.longs === String ? $util.Long.prototype.toString.call(message.userTimeMs) : options.longs === Number ? new $util.LongBits(message.userTimeMs.low >>> 0, message.userTimeMs.high >>> 0).toNumber() : message.userTimeMs;
13805
+ if (message.speed != null && message.hasOwnProperty("speed"))
13806
+ object.speed = options.json && !isFinite(message.speed) ? String(message.speed) : message.speed;
13655
13807
  if (message.userPlaylistId != null && message.hasOwnProperty("userPlaylistId"))
13656
13808
  object.userPlaylistId = message.userPlaylistId;
13657
13809
  if (message.playlistIndex != null && message.hasOwnProperty("playlistIndex"))
@@ -13668,6 +13820,17 @@ var sesame = $root.sesame = (() => {
13668
13820
  object.clipPositionUs = options.longs === String ? String(message.clipPositionUs) : message.clipPositionUs;
13669
13821
  else
13670
13822
  object.clipPositionUs = options.longs === String ? $util.Long.prototype.toString.call(message.clipPositionUs) : options.longs === Number ? new $util.LongBits(message.clipPositionUs.low >>> 0, message.clipPositionUs.high >>> 0).toNumber() : message.clipPositionUs;
13823
+ if (message.clipDurationUs != null && message.hasOwnProperty("clipDurationUs"))
13824
+ if (typeof message.clipDurationUs === "number")
13825
+ object.clipDurationUs = options.longs === String ? String(message.clipDurationUs) : message.clipDurationUs;
13826
+ else
13827
+ object.clipDurationUs = options.longs === String ? $util.Long.prototype.toString.call(message.clipDurationUs) : options.longs === Number ? new $util.LongBits(message.clipDurationUs.low >>> 0, message.clipDurationUs.high >>> 0).toNumber() : message.clipDurationUs;
13828
+ if (message.preroll != null && message.hasOwnProperty("preroll"))
13829
+ object.preroll = message.preroll;
13830
+ if (message.postroll != null && message.hasOwnProperty("postroll"))
13831
+ object.postroll = message.postroll;
13832
+ if (message.metadata != null && message.hasOwnProperty("metadata"))
13833
+ object.metadata = message.metadata;
13671
13834
  return object;
13672
13835
  };
13673
13836
  TransportEvent.prototype.toJSON = function toJSON() {
@@ -21064,6 +21227,7 @@ var sesame = $root.sesame = (() => {
21064
21227
  values[valuesById[3] = "FRAME_TYPE_AUDIO"] = 3;
21065
21228
  values[valuesById[4] = "FRAME_TYPE_MUXED"] = 4;
21066
21229
  values[valuesById[5] = "FRAME_TYPE_DECODER_DATA"] = 5;
21230
+ values[valuesById[6] = "FRAME_TYPE_DATA"] = 6;
21067
21231
  return values;
21068
21232
  }();
21069
21233
  wire.CodecType = function() {
@@ -21505,6 +21669,7 @@ var sesame = $root.sesame = (() => {
21505
21669
  case 3:
21506
21670
  case 4:
21507
21671
  case 5:
21672
+ case 6:
21508
21673
  break;
21509
21674
  }
21510
21675
  if (message.pts != null && message.hasOwnProperty("pts")) {
@@ -21565,6 +21730,10 @@ var sesame = $root.sesame = (() => {
21565
21730
  case 5:
21566
21731
  message.type = 5;
21567
21732
  break;
21733
+ case "FRAME_TYPE_DATA":
21734
+ case 6:
21735
+ message.type = 6;
21736
+ break;
21568
21737
  }
21569
21738
  if (object.pts != null) {
21570
21739
  if ($util.Long)