@stinkycomputing/sesame-api-client 1.4.1-alpha.0 → 1.4.1-alpha.10

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
@@ -1,5 +1,5 @@
1
1
  // src/proto/api.js
2
- import * as $protobuf from "protobufjs/minimal";
2
+ import $protobuf from "protobufjs/minimal.js";
3
3
  var $Reader = $protobuf.Reader;
4
4
  var $Writer = $protobuf.Writer;
5
5
  var $util = $protobuf.util;
@@ -4448,7 +4448,6 @@ var sesame = $root.sesame = (() => {
4448
4448
  SourceCommonConfig.prototype.playState = 0;
4449
4449
  SourceCommonConfig.prototype.mipMap = false;
4450
4450
  SourceCommonConfig.prototype.textureSize = 0;
4451
- SourceCommonConfig.prototype.decoderType = 0;
4452
4451
  SourceCommonConfig.prototype.deinterlace = 0;
4453
4452
  SourceCommonConfig.prototype.videoProcessors = $util.emptyArray;
4454
4453
  SourceCommonConfig.create = function create(properties) {
@@ -4497,11 +4496,6 @@ var sesame = $root.sesame = (() => {
4497
4496
  /* id 8, wireType 0 =*/
4498
4497
  64
4499
4498
  ).int32(message.textureSize);
4500
- if (message.decoderType != null && Object.hasOwnProperty.call(message, "decoderType"))
4501
- writer.uint32(
4502
- /* id 9, wireType 0 =*/
4503
- 72
4504
- ).int32(message.decoderType);
4505
4499
  if (message.deinterlace != null && Object.hasOwnProperty.call(message, "deinterlace"))
4506
4500
  writer.uint32(
4507
4501
  /* id 10, wireType 0 =*/
@@ -4559,10 +4553,6 @@ var sesame = $root.sesame = (() => {
4559
4553
  message.textureSize = reader.int32();
4560
4554
  break;
4561
4555
  }
4562
- case 9: {
4563
- message.decoderType = reader.int32();
4564
- break;
4565
- }
4566
4556
  case 10: {
4567
4557
  message.deinterlace = reader.int32();
4568
4558
  break;
@@ -4632,16 +4622,6 @@ var sesame = $root.sesame = (() => {
4632
4622
  case 2:
4633
4623
  break;
4634
4624
  }
4635
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
4636
- switch (message.decoderType) {
4637
- default:
4638
- return "decoderType: enum value expected";
4639
- case 0:
4640
- case 1:
4641
- case 2:
4642
- case 3:
4643
- break;
4644
- }
4645
4625
  if (message.deinterlace != null && message.hasOwnProperty("deinterlace"))
4646
4626
  switch (message.deinterlace) {
4647
4627
  default:
@@ -4727,30 +4707,6 @@ var sesame = $root.sesame = (() => {
4727
4707
  message.textureSize = 2;
4728
4708
  break;
4729
4709
  }
4730
- switch (object.decoderType) {
4731
- default:
4732
- if (typeof object.decoderType === "number") {
4733
- message.decoderType = object.decoderType;
4734
- break;
4735
- }
4736
- break;
4737
- case "DECODER_TYPE_UNSPECIFIED":
4738
- case 0:
4739
- message.decoderType = 0;
4740
- break;
4741
- case "DECODER_TYPE_H264":
4742
- case 1:
4743
- message.decoderType = 1;
4744
- break;
4745
- case "DECODER_TYPE_HEVC":
4746
- case 2:
4747
- message.decoderType = 2;
4748
- break;
4749
- case "DECODER_TYPE_AV1":
4750
- case 3:
4751
- message.decoderType = 3;
4752
- break;
4753
- }
4754
4710
  switch (object.deinterlace) {
4755
4711
  default:
4756
4712
  if (typeof object.deinterlace === "number") {
@@ -4802,7 +4758,6 @@ var sesame = $root.sesame = (() => {
4802
4758
  object.playState = options.enums === String ? "SOURCE_TRANSPORT_STATE_STOPPED" : 0;
4803
4759
  object.mipMap = false;
4804
4760
  object.textureSize = options.enums === String ? "SOURCE_TEXTURE_SIZE_UNSPECIFIED" : 0;
4805
- object.decoderType = options.enums === String ? "DECODER_TYPE_UNSPECIFIED" : 0;
4806
4761
  object.deinterlace = options.enums === String ? "DEINTERLACE_TYPE_PROGRESSIVE" : 0;
4807
4762
  }
4808
4763
  if (message.userId != null && message.hasOwnProperty("userId"))
@@ -4821,8 +4776,6 @@ var sesame = $root.sesame = (() => {
4821
4776
  object.mipMap = message.mipMap;
4822
4777
  if (message.textureSize != null && message.hasOwnProperty("textureSize"))
4823
4778
  object.textureSize = options.enums === String ? $root.sesame.v1.sources.SourceTextureSize[message.textureSize] === void 0 ? message.textureSize : $root.sesame.v1.sources.SourceTextureSize[message.textureSize] : message.textureSize;
4824
- if (message.decoderType != null && message.hasOwnProperty("decoderType"))
4825
- object.decoderType = options.enums === String ? $root.sesame.v1.sources.DecoderType[message.decoderType] === void 0 ? message.decoderType : $root.sesame.v1.sources.DecoderType[message.decoderType] : message.decoderType;
4826
4779
  if (message.deinterlace != null && message.hasOwnProperty("deinterlace"))
4827
4780
  object.deinterlace = options.enums === String ? $root.sesame.v1.sources.DeinterlaceType[message.deinterlace] === void 0 ? message.deinterlace : $root.sesame.v1.sources.DeinterlaceType[message.deinterlace] : message.deinterlace;
4828
4781
  if (message.videoProcessors && message.videoProcessors.length) {
@@ -4940,6 +4893,7 @@ var sesame = $root.sesame = (() => {
4940
4893
  }
4941
4894
  }
4942
4895
  RecorderSourceConfig.prototype.recorderId = "";
4896
+ RecorderSourceConfig.prototype.decoderType = 0;
4943
4897
  RecorderSourceConfig.create = function create(properties) {
4944
4898
  return new RecorderSourceConfig(properties);
4945
4899
  };
@@ -4951,6 +4905,11 @@ var sesame = $root.sesame = (() => {
4951
4905
  /* id 1, wireType 2 =*/
4952
4906
  10
4953
4907
  ).string(message.recorderId);
4908
+ if (message.decoderType != null && Object.hasOwnProperty.call(message, "decoderType"))
4909
+ writer.uint32(
4910
+ /* id 2, wireType 0 =*/
4911
+ 16
4912
+ ).int32(message.decoderType);
4954
4913
  return writer;
4955
4914
  };
4956
4915
  RecorderSourceConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -4969,6 +4928,10 @@ var sesame = $root.sesame = (() => {
4969
4928
  message.recorderId = reader.string();
4970
4929
  break;
4971
4930
  }
4931
+ case 2: {
4932
+ message.decoderType = reader.int32();
4933
+ break;
4934
+ }
4972
4935
  default:
4973
4936
  reader.skipType(tag & 7);
4974
4937
  break;
@@ -4988,6 +4951,16 @@ var sesame = $root.sesame = (() => {
4988
4951
  if (!$util.isString(message.recorderId))
4989
4952
  return "recorderId: string expected";
4990
4953
  }
4954
+ if (message.decoderType != null && message.hasOwnProperty("decoderType"))
4955
+ switch (message.decoderType) {
4956
+ default:
4957
+ return "decoderType: enum value expected";
4958
+ case 0:
4959
+ case 1:
4960
+ case 2:
4961
+ case 3:
4962
+ break;
4963
+ }
4991
4964
  return null;
4992
4965
  };
4993
4966
  RecorderSourceConfig.fromObject = function fromObject(object) {
@@ -4996,16 +4969,44 @@ var sesame = $root.sesame = (() => {
4996
4969
  let message = new $root.sesame.v1.sources.RecorderSourceConfig();
4997
4970
  if (object.recorderId != null)
4998
4971
  message.recorderId = String(object.recorderId);
4972
+ switch (object.decoderType) {
4973
+ default:
4974
+ if (typeof object.decoderType === "number") {
4975
+ message.decoderType = object.decoderType;
4976
+ break;
4977
+ }
4978
+ break;
4979
+ case "DECODER_TYPE_UNSPECIFIED":
4980
+ case 0:
4981
+ message.decoderType = 0;
4982
+ break;
4983
+ case "DECODER_TYPE_H264":
4984
+ case 1:
4985
+ message.decoderType = 1;
4986
+ break;
4987
+ case "DECODER_TYPE_HEVC":
4988
+ case 2:
4989
+ message.decoderType = 2;
4990
+ break;
4991
+ case "DECODER_TYPE_AV1":
4992
+ case 3:
4993
+ message.decoderType = 3;
4994
+ break;
4995
+ }
4999
4996
  return message;
5000
4997
  };
5001
4998
  RecorderSourceConfig.toObject = function toObject(message, options) {
5002
4999
  if (!options)
5003
5000
  options = {};
5004
5001
  let object = {};
5005
- if (options.defaults)
5002
+ if (options.defaults) {
5006
5003
  object.recorderId = "";
5004
+ object.decoderType = options.enums === String ? "DECODER_TYPE_UNSPECIFIED" : 0;
5005
+ }
5007
5006
  if (message.recorderId != null && message.hasOwnProperty("recorderId"))
5008
5007
  object.recorderId = message.recorderId;
5008
+ if (message.decoderType != null && message.hasOwnProperty("decoderType"))
5009
+ object.decoderType = options.enums === String ? $root.sesame.v1.sources.DecoderType[message.decoderType] === void 0 ? message.decoderType : $root.sesame.v1.sources.DecoderType[message.decoderType] : message.decoderType;
5009
5010
  return object;
5010
5011
  };
5011
5012
  RecorderSourceConfig.prototype.toJSON = function toJSON() {
@@ -8179,7 +8180,7 @@ var sesame = $root.sesame = (() => {
8179
8180
  RecorderClip.prototype.endTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8180
8181
  RecorderClip.prototype.lockedStartUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8181
8182
  RecorderClip.prototype.lockedEndUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8182
- RecorderClip.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8183
+ RecorderClip.prototype.userTimeMs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8183
8184
  RecorderClip.create = function create(properties) {
8184
8185
  return new RecorderClip(properties);
8185
8186
  };
@@ -8226,11 +8227,11 @@ var sesame = $root.sesame = (() => {
8226
8227
  /* id 8, wireType 0 =*/
8227
8228
  64
8228
8229
  ).int64(message.lockedEndUs);
8229
- if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
8230
+ if (message.userTimeMs != null && Object.hasOwnProperty.call(message, "userTimeMs"))
8230
8231
  writer.uint32(
8231
8232
  /* id 9, wireType 0 =*/
8232
8233
  72
8233
- ).int64(message.userTimeUs);
8234
+ ).int64(message.userTimeMs);
8234
8235
  return writer;
8235
8236
  };
8236
8237
  RecorderClip.encodeDelimited = function encodeDelimited(message, writer) {
@@ -8278,7 +8279,7 @@ var sesame = $root.sesame = (() => {
8278
8279
  break;
8279
8280
  }
8280
8281
  case 9: {
8281
- message.userTimeUs = reader.int64();
8282
+ message.userTimeMs = reader.int64();
8282
8283
  break;
8283
8284
  }
8284
8285
  default:
@@ -8328,9 +8329,9 @@ var sesame = $root.sesame = (() => {
8328
8329
  if (!$util.isInteger(message.lockedEndUs) && !(message.lockedEndUs && $util.isInteger(message.lockedEndUs.low) && $util.isInteger(message.lockedEndUs.high)))
8329
8330
  return "lockedEndUs: integer|Long expected";
8330
8331
  }
8331
- if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
8332
- if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
8333
- return "userTimeUs: integer|Long expected";
8332
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs")) {
8333
+ if (!$util.isInteger(message.userTimeMs) && !(message.userTimeMs && $util.isInteger(message.userTimeMs.low) && $util.isInteger(message.userTimeMs.high)))
8334
+ return "userTimeMs: integer|Long expected";
8334
8335
  }
8335
8336
  return null;
8336
8337
  };
@@ -8402,15 +8403,15 @@ var sesame = $root.sesame = (() => {
8402
8403
  else if (typeof object.lockedEndUs === "object")
8403
8404
  message.lockedEndUs = new $util.LongBits(object.lockedEndUs.low >>> 0, object.lockedEndUs.high >>> 0).toNumber();
8404
8405
  }
8405
- if (object.userTimeUs != null) {
8406
+ if (object.userTimeMs != null) {
8406
8407
  if ($util.Long)
8407
- (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
8408
- else if (typeof object.userTimeUs === "string")
8409
- message.userTimeUs = parseInt(object.userTimeUs, 10);
8410
- else if (typeof object.userTimeUs === "number")
8411
- message.userTimeUs = object.userTimeUs;
8412
- else if (typeof object.userTimeUs === "object")
8413
- message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
8408
+ (message.userTimeMs = $util.Long.fromValue(object.userTimeMs)).unsigned = false;
8409
+ else if (typeof object.userTimeMs === "string")
8410
+ message.userTimeMs = parseInt(object.userTimeMs, 10);
8411
+ else if (typeof object.userTimeMs === "number")
8412
+ message.userTimeMs = object.userTimeMs;
8413
+ else if (typeof object.userTimeMs === "object")
8414
+ message.userTimeMs = new $util.LongBits(object.userTimeMs.low >>> 0, object.userTimeMs.high >>> 0).toNumber();
8414
8415
  }
8415
8416
  return message;
8416
8417
  };
@@ -8453,9 +8454,9 @@ var sesame = $root.sesame = (() => {
8453
8454
  object.lockedEndUs = options.longs === String ? "0" : 0;
8454
8455
  if ($util.Long) {
8455
8456
  let long = new $util.Long(0, 0, false);
8456
- object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8457
+ object.userTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8457
8458
  } else
8458
- object.userTimeUs = options.longs === String ? "0" : 0;
8459
+ object.userTimeMs = options.longs === String ? "0" : 0;
8459
8460
  }
8460
8461
  if (message.id != null && message.hasOwnProperty("id"))
8461
8462
  if (typeof message.id === "number")
@@ -8491,11 +8492,11 @@ var sesame = $root.sesame = (() => {
8491
8492
  object.lockedEndUs = options.longs === String ? String(message.lockedEndUs) : message.lockedEndUs;
8492
8493
  else
8493
8494
  object.lockedEndUs = options.longs === String ? $util.Long.prototype.toString.call(message.lockedEndUs) : options.longs === Number ? new $util.LongBits(message.lockedEndUs.low >>> 0, message.lockedEndUs.high >>> 0).toNumber() : message.lockedEndUs;
8494
- if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
8495
- if (typeof message.userTimeUs === "number")
8496
- object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
8495
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs"))
8496
+ if (typeof message.userTimeMs === "number")
8497
+ object.userTimeMs = options.longs === String ? String(message.userTimeMs) : message.userTimeMs;
8497
8498
  else
8498
- object.userTimeUs = options.longs === String ? $util.Long.prototype.toString.call(message.userTimeUs) : options.longs === Number ? new $util.LongBits(message.userTimeUs.low >>> 0, message.userTimeUs.high >>> 0).toNumber() : message.userTimeUs;
8499
+ 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;
8499
8500
  return object;
8500
8501
  };
8501
8502
  RecorderClip.prototype.toJSON = function toJSON() {
@@ -14165,6 +14166,9 @@ var sesame = $root.sesame = (() => {
14165
14166
  EncoderConfig.prototype.preset = 0;
14166
14167
  EncoderConfig.prototype.bitrateKbps = 0;
14167
14168
  EncoderConfig.prototype.keyframeInterval = 0;
14169
+ EncoderConfig.prototype.width = 0;
14170
+ EncoderConfig.prototype.height = 0;
14171
+ EncoderConfig.prototype.fps = 0;
14168
14172
  EncoderConfig.create = function create(properties) {
14169
14173
  return new EncoderConfig(properties);
14170
14174
  };
@@ -14191,6 +14195,21 @@ var sesame = $root.sesame = (() => {
14191
14195
  /* id 4, wireType 0 =*/
14192
14196
  32
14193
14197
  ).uint32(message.keyframeInterval);
14198
+ if (message.width != null && Object.hasOwnProperty.call(message, "width"))
14199
+ writer.uint32(
14200
+ /* id 5, wireType 0 =*/
14201
+ 40
14202
+ ).uint32(message.width);
14203
+ if (message.height != null && Object.hasOwnProperty.call(message, "height"))
14204
+ writer.uint32(
14205
+ /* id 6, wireType 0 =*/
14206
+ 48
14207
+ ).uint32(message.height);
14208
+ if (message.fps != null && Object.hasOwnProperty.call(message, "fps"))
14209
+ writer.uint32(
14210
+ /* id 7, wireType 5 =*/
14211
+ 61
14212
+ ).float(message.fps);
14194
14213
  return writer;
14195
14214
  };
14196
14215
  EncoderConfig.encodeDelimited = function encodeDelimited(message, writer) {
@@ -14221,6 +14240,18 @@ var sesame = $root.sesame = (() => {
14221
14240
  message.keyframeInterval = reader.uint32();
14222
14241
  break;
14223
14242
  }
14243
+ case 5: {
14244
+ message.width = reader.uint32();
14245
+ break;
14246
+ }
14247
+ case 6: {
14248
+ message.height = reader.uint32();
14249
+ break;
14250
+ }
14251
+ case 7: {
14252
+ message.fps = reader.float();
14253
+ break;
14254
+ }
14224
14255
  default:
14225
14256
  reader.skipType(tag & 7);
14226
14257
  break;
@@ -14267,6 +14298,18 @@ var sesame = $root.sesame = (() => {
14267
14298
  if (!$util.isInteger(message.keyframeInterval))
14268
14299
  return "keyframeInterval: integer expected";
14269
14300
  }
14301
+ if (message.width != null && message.hasOwnProperty("width")) {
14302
+ if (!$util.isInteger(message.width))
14303
+ return "width: integer expected";
14304
+ }
14305
+ if (message.height != null && message.hasOwnProperty("height")) {
14306
+ if (!$util.isInteger(message.height))
14307
+ return "height: integer expected";
14308
+ }
14309
+ if (message.fps != null && message.hasOwnProperty("fps")) {
14310
+ if (typeof message.fps !== "number")
14311
+ return "fps: number expected";
14312
+ }
14270
14313
  return null;
14271
14314
  };
14272
14315
  EncoderConfig.fromObject = function fromObject(object) {
@@ -14337,6 +14380,12 @@ var sesame = $root.sesame = (() => {
14337
14380
  message.bitrateKbps = object.bitrateKbps >>> 0;
14338
14381
  if (object.keyframeInterval != null)
14339
14382
  message.keyframeInterval = object.keyframeInterval >>> 0;
14383
+ if (object.width != null)
14384
+ message.width = object.width >>> 0;
14385
+ if (object.height != null)
14386
+ message.height = object.height >>> 0;
14387
+ if (object.fps != null)
14388
+ message.fps = Number(object.fps);
14340
14389
  return message;
14341
14390
  };
14342
14391
  EncoderConfig.toObject = function toObject(message, options) {
@@ -14348,6 +14397,9 @@ var sesame = $root.sesame = (() => {
14348
14397
  object.preset = options.enums === String ? "ENCODER_PRESET_UNSPECIFIED" : 0;
14349
14398
  object.bitrateKbps = 0;
14350
14399
  object.keyframeInterval = 0;
14400
+ object.width = 0;
14401
+ object.height = 0;
14402
+ object.fps = 0;
14351
14403
  }
14352
14404
  if (message.codecId != null && message.hasOwnProperty("codecId"))
14353
14405
  object.codecId = options.enums === String ? $root.sesame.v1.common.CodecId[message.codecId] === void 0 ? message.codecId : $root.sesame.v1.common.CodecId[message.codecId] : message.codecId;
@@ -14357,168 +14409,24 @@ var sesame = $root.sesame = (() => {
14357
14409
  object.bitrateKbps = message.bitrateKbps;
14358
14410
  if (message.keyframeInterval != null && message.hasOwnProperty("keyframeInterval"))
14359
14411
  object.keyframeInterval = message.keyframeInterval;
14360
- return object;
14361
- };
14362
- EncoderConfig.prototype.toJSON = function toJSON() {
14363
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
14364
- };
14365
- EncoderConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14366
- if (typeUrlPrefix === void 0) {
14367
- typeUrlPrefix = "type.googleapis.com";
14368
- }
14369
- return typeUrlPrefix + "/sesame.v1.outputs.EncoderConfig";
14370
- };
14371
- return EncoderConfig;
14372
- }();
14373
- outputs.OutputEncodedConfig = function() {
14374
- function OutputEncodedConfig(properties) {
14375
- if (properties) {
14376
- for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
14377
- if (properties[keys[i]] != null)
14378
- this[keys[i]] = properties[keys[i]];
14379
- }
14380
- }
14381
- OutputEncodedConfig.prototype.width = 0;
14382
- OutputEncodedConfig.prototype.height = 0;
14383
- OutputEncodedConfig.prototype.fps = 0;
14384
- OutputEncodedConfig.prototype.encoderConfig = null;
14385
- OutputEncodedConfig.create = function create(properties) {
14386
- return new OutputEncodedConfig(properties);
14387
- };
14388
- OutputEncodedConfig.encode = function encode(message, writer) {
14389
- if (!writer)
14390
- writer = $Writer.create();
14391
- if (message.width != null && Object.hasOwnProperty.call(message, "width"))
14392
- writer.uint32(
14393
- /* id 1, wireType 0 =*/
14394
- 8
14395
- ).uint32(message.width);
14396
- if (message.height != null && Object.hasOwnProperty.call(message, "height"))
14397
- writer.uint32(
14398
- /* id 2, wireType 0 =*/
14399
- 16
14400
- ).uint32(message.height);
14401
- if (message.fps != null && Object.hasOwnProperty.call(message, "fps"))
14402
- writer.uint32(
14403
- /* id 3, wireType 5 =*/
14404
- 29
14405
- ).float(message.fps);
14406
- if (message.encoderConfig != null && Object.hasOwnProperty.call(message, "encoderConfig"))
14407
- $root.sesame.v1.outputs.EncoderConfig.encode(message.encoderConfig, writer.uint32(
14408
- /* id 4, wireType 2 =*/
14409
- 34
14410
- ).fork()).ldelim();
14411
- return writer;
14412
- };
14413
- OutputEncodedConfig.encodeDelimited = function encodeDelimited(message, writer) {
14414
- return this.encode(message, writer).ldelim();
14415
- };
14416
- OutputEncodedConfig.decode = function decode(reader, length, error) {
14417
- if (!(reader instanceof $Reader))
14418
- reader = $Reader.create(reader);
14419
- let end = length === void 0 ? reader.len : reader.pos + length, message = new $root.sesame.v1.outputs.OutputEncodedConfig();
14420
- while (reader.pos < end) {
14421
- let tag = reader.uint32();
14422
- if (tag === error)
14423
- break;
14424
- switch (tag >>> 3) {
14425
- case 1: {
14426
- message.width = reader.uint32();
14427
- break;
14428
- }
14429
- case 2: {
14430
- message.height = reader.uint32();
14431
- break;
14432
- }
14433
- case 3: {
14434
- message.fps = reader.float();
14435
- break;
14436
- }
14437
- case 4: {
14438
- message.encoderConfig = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
14439
- break;
14440
- }
14441
- default:
14442
- reader.skipType(tag & 7);
14443
- break;
14444
- }
14445
- }
14446
- return message;
14447
- };
14448
- OutputEncodedConfig.decodeDelimited = function decodeDelimited(reader) {
14449
- if (!(reader instanceof $Reader))
14450
- reader = new $Reader(reader);
14451
- return this.decode(reader, reader.uint32());
14452
- };
14453
- OutputEncodedConfig.verify = function verify(message) {
14454
- if (typeof message !== "object" || message === null)
14455
- return "object expected";
14456
- if (message.width != null && message.hasOwnProperty("width")) {
14457
- if (!$util.isInteger(message.width))
14458
- return "width: integer expected";
14459
- }
14460
- if (message.height != null && message.hasOwnProperty("height")) {
14461
- if (!$util.isInteger(message.height))
14462
- return "height: integer expected";
14463
- }
14464
- if (message.fps != null && message.hasOwnProperty("fps")) {
14465
- if (typeof message.fps !== "number")
14466
- return "fps: number expected";
14467
- }
14468
- if (message.encoderConfig != null && message.hasOwnProperty("encoderConfig")) {
14469
- let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoderConfig);
14470
- if (error)
14471
- return "encoderConfig." + error;
14472
- }
14473
- return null;
14474
- };
14475
- OutputEncodedConfig.fromObject = function fromObject(object) {
14476
- if (object instanceof $root.sesame.v1.outputs.OutputEncodedConfig)
14477
- return object;
14478
- let message = new $root.sesame.v1.outputs.OutputEncodedConfig();
14479
- if (object.width != null)
14480
- message.width = object.width >>> 0;
14481
- if (object.height != null)
14482
- message.height = object.height >>> 0;
14483
- if (object.fps != null)
14484
- message.fps = Number(object.fps);
14485
- if (object.encoderConfig != null) {
14486
- if (typeof object.encoderConfig !== "object")
14487
- throw TypeError(".sesame.v1.outputs.OutputEncodedConfig.encoderConfig: object expected");
14488
- message.encoderConfig = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoderConfig);
14489
- }
14490
- return message;
14491
- };
14492
- OutputEncodedConfig.toObject = function toObject(message, options) {
14493
- if (!options)
14494
- options = {};
14495
- let object = {};
14496
- if (options.defaults) {
14497
- object.width = 0;
14498
- object.height = 0;
14499
- object.fps = 0;
14500
- object.encoderConfig = null;
14501
- }
14502
14412
  if (message.width != null && message.hasOwnProperty("width"))
14503
14413
  object.width = message.width;
14504
14414
  if (message.height != null && message.hasOwnProperty("height"))
14505
14415
  object.height = message.height;
14506
14416
  if (message.fps != null && message.hasOwnProperty("fps"))
14507
14417
  object.fps = options.json && !isFinite(message.fps) ? String(message.fps) : message.fps;
14508
- if (message.encoderConfig != null && message.hasOwnProperty("encoderConfig"))
14509
- object.encoderConfig = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoderConfig, options);
14510
14418
  return object;
14511
14419
  };
14512
- OutputEncodedConfig.prototype.toJSON = function toJSON() {
14420
+ EncoderConfig.prototype.toJSON = function toJSON() {
14513
14421
  return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
14514
14422
  };
14515
- OutputEncodedConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14423
+ EncoderConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
14516
14424
  if (typeUrlPrefix === void 0) {
14517
14425
  typeUrlPrefix = "type.googleapis.com";
14518
14426
  }
14519
- return typeUrlPrefix + "/sesame.v1.outputs.OutputEncodedConfig";
14427
+ return typeUrlPrefix + "/sesame.v1.outputs.EncoderConfig";
14520
14428
  };
14521
- return OutputEncodedConfig;
14429
+ return EncoderConfig;
14522
14430
  }();
14523
14431
  outputs.DecklinkOutputConfig = function() {
14524
14432
  function DecklinkOutputConfig(properties) {
@@ -14689,7 +14597,7 @@ var sesame = $root.sesame = (() => {
14689
14597
  }
14690
14598
  }
14691
14599
  EncodedWebSocketOutputConfig.prototype.channel = "";
14692
- EncodedWebSocketOutputConfig.prototype.encoded = null;
14600
+ EncodedWebSocketOutputConfig.prototype.encoder = null;
14693
14601
  EncodedWebSocketOutputConfig.create = function create(properties) {
14694
14602
  return new EncodedWebSocketOutputConfig(properties);
14695
14603
  };
@@ -14701,8 +14609,8 @@ var sesame = $root.sesame = (() => {
14701
14609
  /* id 1, wireType 2 =*/
14702
14610
  10
14703
14611
  ).string(message.channel);
14704
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
14705
- $root.sesame.v1.outputs.OutputEncodedConfig.encode(message.encoded, writer.uint32(
14612
+ if (message.encoder != null && Object.hasOwnProperty.call(message, "encoder"))
14613
+ $root.sesame.v1.outputs.EncoderConfig.encode(message.encoder, writer.uint32(
14706
14614
  /* id 2, wireType 2 =*/
14707
14615
  18
14708
14616
  ).fork()).ldelim();
@@ -14725,7 +14633,7 @@ var sesame = $root.sesame = (() => {
14725
14633
  break;
14726
14634
  }
14727
14635
  case 2: {
14728
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.decode(reader, reader.uint32());
14636
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
14729
14637
  break;
14730
14638
  }
14731
14639
  default:
@@ -14747,10 +14655,10 @@ var sesame = $root.sesame = (() => {
14747
14655
  if (!$util.isString(message.channel))
14748
14656
  return "channel: string expected";
14749
14657
  }
14750
- if (message.encoded != null && message.hasOwnProperty("encoded")) {
14751
- let error = $root.sesame.v1.outputs.OutputEncodedConfig.verify(message.encoded);
14658
+ if (message.encoder != null && message.hasOwnProperty("encoder")) {
14659
+ let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoder);
14752
14660
  if (error)
14753
- return "encoded." + error;
14661
+ return "encoder." + error;
14754
14662
  }
14755
14663
  return null;
14756
14664
  };
@@ -14760,10 +14668,10 @@ var sesame = $root.sesame = (() => {
14760
14668
  let message = new $root.sesame.v1.outputs.EncodedWebSocketOutputConfig();
14761
14669
  if (object.channel != null)
14762
14670
  message.channel = String(object.channel);
14763
- if (object.encoded != null) {
14764
- if (typeof object.encoded !== "object")
14765
- throw TypeError(".sesame.v1.outputs.EncodedWebSocketOutputConfig.encoded: object expected");
14766
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.fromObject(object.encoded);
14671
+ if (object.encoder != null) {
14672
+ if (typeof object.encoder !== "object")
14673
+ throw TypeError(".sesame.v1.outputs.EncodedWebSocketOutputConfig.encoder: object expected");
14674
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoder);
14767
14675
  }
14768
14676
  return message;
14769
14677
  };
@@ -14773,12 +14681,12 @@ var sesame = $root.sesame = (() => {
14773
14681
  let object = {};
14774
14682
  if (options.defaults) {
14775
14683
  object.channel = "";
14776
- object.encoded = null;
14684
+ object.encoder = null;
14777
14685
  }
14778
14686
  if (message.channel != null && message.hasOwnProperty("channel"))
14779
14687
  object.channel = message.channel;
14780
- if (message.encoded != null && message.hasOwnProperty("encoded"))
14781
- object.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.toObject(message.encoded, options);
14688
+ if (message.encoder != null && message.hasOwnProperty("encoder"))
14689
+ object.encoder = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoder, options);
14782
14690
  return object;
14783
14691
  };
14784
14692
  EncodedWebSocketOutputConfig.prototype.toJSON = function toJSON() {
@@ -14800,7 +14708,7 @@ var sesame = $root.sesame = (() => {
14800
14708
  this[keys[i]] = properties[keys[i]];
14801
14709
  }
14802
14710
  }
14803
- EncodedRecorderOutputConfig.prototype.encoded = null;
14711
+ EncodedRecorderOutputConfig.prototype.encoder = null;
14804
14712
  EncodedRecorderOutputConfig.prototype.filename = "";
14805
14713
  EncodedRecorderOutputConfig.prototype.sizeGb = 0;
14806
14714
  EncodedRecorderOutputConfig.prototype.groupId = "";
@@ -14811,8 +14719,8 @@ var sesame = $root.sesame = (() => {
14811
14719
  EncodedRecorderOutputConfig.encode = function encode(message, writer) {
14812
14720
  if (!writer)
14813
14721
  writer = $Writer.create();
14814
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
14815
- $root.sesame.v1.outputs.OutputEncodedConfig.encode(message.encoded, writer.uint32(
14722
+ if (message.encoder != null && Object.hasOwnProperty.call(message, "encoder"))
14723
+ $root.sesame.v1.outputs.EncoderConfig.encode(message.encoder, writer.uint32(
14816
14724
  /* id 1, wireType 2 =*/
14817
14725
  10
14818
14726
  ).fork()).ldelim();
@@ -14851,7 +14759,7 @@ var sesame = $root.sesame = (() => {
14851
14759
  break;
14852
14760
  switch (tag >>> 3) {
14853
14761
  case 1: {
14854
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.decode(reader, reader.uint32());
14762
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
14855
14763
  break;
14856
14764
  }
14857
14765
  case 2: {
@@ -14885,10 +14793,10 @@ var sesame = $root.sesame = (() => {
14885
14793
  EncodedRecorderOutputConfig.verify = function verify(message) {
14886
14794
  if (typeof message !== "object" || message === null)
14887
14795
  return "object expected";
14888
- if (message.encoded != null && message.hasOwnProperty("encoded")) {
14889
- let error = $root.sesame.v1.outputs.OutputEncodedConfig.verify(message.encoded);
14796
+ if (message.encoder != null && message.hasOwnProperty("encoder")) {
14797
+ let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoder);
14890
14798
  if (error)
14891
- return "encoded." + error;
14799
+ return "encoder." + error;
14892
14800
  }
14893
14801
  if (message.filename != null && message.hasOwnProperty("filename")) {
14894
14802
  if (!$util.isString(message.filename))
@@ -14917,10 +14825,10 @@ var sesame = $root.sesame = (() => {
14917
14825
  if (object instanceof $root.sesame.v1.outputs.EncodedRecorderOutputConfig)
14918
14826
  return object;
14919
14827
  let message = new $root.sesame.v1.outputs.EncodedRecorderOutputConfig();
14920
- if (object.encoded != null) {
14921
- if (typeof object.encoded !== "object")
14922
- throw TypeError(".sesame.v1.outputs.EncodedRecorderOutputConfig.encoded: object expected");
14923
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.fromObject(object.encoded);
14828
+ if (object.encoder != null) {
14829
+ if (typeof object.encoder !== "object")
14830
+ throw TypeError(".sesame.v1.outputs.EncodedRecorderOutputConfig.encoder: object expected");
14831
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoder);
14924
14832
  }
14925
14833
  if (object.filename != null)
14926
14834
  message.filename = String(object.filename);
@@ -14955,14 +14863,14 @@ var sesame = $root.sesame = (() => {
14955
14863
  options = {};
14956
14864
  let object = {};
14957
14865
  if (options.defaults) {
14958
- object.encoded = null;
14866
+ object.encoder = null;
14959
14867
  object.filename = "";
14960
14868
  object.sizeGb = 0;
14961
14869
  object.groupId = "";
14962
14870
  object.recorderType = options.enums === String ? "RECORDER_TYPE_UNSPECIFIED" : 0;
14963
14871
  }
14964
- if (message.encoded != null && message.hasOwnProperty("encoded"))
14965
- object.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.toObject(message.encoded, options);
14872
+ if (message.encoder != null && message.hasOwnProperty("encoder"))
14873
+ object.encoder = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoder, options);
14966
14874
  if (message.filename != null && message.hasOwnProperty("filename"))
14967
14875
  object.filename = message.filename;
14968
14876
  if (message.sizeGb != null && message.hasOwnProperty("sizeGb"))
@@ -14994,7 +14902,7 @@ var sesame = $root.sesame = (() => {
14994
14902
  this[keys[i]] = properties[keys[i]];
14995
14903
  }
14996
14904
  }
14997
- EncodedSuperSlowMoRecorderOutputConfig.prototype.encoded = null;
14905
+ EncodedSuperSlowMoRecorderOutputConfig.prototype.encoder = null;
14998
14906
  EncodedSuperSlowMoRecorderOutputConfig.prototype.filename = "";
14999
14907
  EncodedSuperSlowMoRecorderOutputConfig.prototype.sizeGb = 0;
15000
14908
  EncodedSuperSlowMoRecorderOutputConfig.prototype.groupId = "";
@@ -15007,8 +14915,8 @@ var sesame = $root.sesame = (() => {
15007
14915
  EncodedSuperSlowMoRecorderOutputConfig.encode = function encode(message, writer) {
15008
14916
  if (!writer)
15009
14917
  writer = $Writer.create();
15010
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
15011
- $root.sesame.v1.outputs.OutputEncodedConfig.encode(message.encoded, writer.uint32(
14918
+ if (message.encoder != null && Object.hasOwnProperty.call(message, "encoder"))
14919
+ $root.sesame.v1.outputs.EncoderConfig.encode(message.encoder, writer.uint32(
15012
14920
  /* id 1, wireType 2 =*/
15013
14921
  10
15014
14922
  ).fork()).ldelim();
@@ -15059,7 +14967,7 @@ var sesame = $root.sesame = (() => {
15059
14967
  break;
15060
14968
  switch (tag >>> 3) {
15061
14969
  case 1: {
15062
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.decode(reader, reader.uint32());
14970
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
15063
14971
  break;
15064
14972
  }
15065
14973
  case 2: {
@@ -15105,10 +15013,10 @@ var sesame = $root.sesame = (() => {
15105
15013
  EncodedSuperSlowMoRecorderOutputConfig.verify = function verify(message) {
15106
15014
  if (typeof message !== "object" || message === null)
15107
15015
  return "object expected";
15108
- if (message.encoded != null && message.hasOwnProperty("encoded")) {
15109
- let error = $root.sesame.v1.outputs.OutputEncodedConfig.verify(message.encoded);
15016
+ if (message.encoder != null && message.hasOwnProperty("encoder")) {
15017
+ let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoder);
15110
15018
  if (error)
15111
- return "encoded." + error;
15019
+ return "encoder." + error;
15112
15020
  }
15113
15021
  if (message.filename != null && message.hasOwnProperty("filename")) {
15114
15022
  if (!$util.isString(message.filename))
@@ -15151,10 +15059,10 @@ var sesame = $root.sesame = (() => {
15151
15059
  if (object instanceof $root.sesame.v1.outputs.EncodedSuperSlowMoRecorderOutputConfig)
15152
15060
  return object;
15153
15061
  let message = new $root.sesame.v1.outputs.EncodedSuperSlowMoRecorderOutputConfig();
15154
- if (object.encoded != null) {
15155
- if (typeof object.encoded !== "object")
15156
- throw TypeError(".sesame.v1.outputs.EncodedSuperSlowMoRecorderOutputConfig.encoded: object expected");
15157
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.fromObject(object.encoded);
15062
+ if (object.encoder != null) {
15063
+ if (typeof object.encoder !== "object")
15064
+ throw TypeError(".sesame.v1.outputs.EncodedSuperSlowMoRecorderOutputConfig.encoder: object expected");
15065
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoder);
15158
15066
  }
15159
15067
  if (object.filename != null)
15160
15068
  message.filename = String(object.filename);
@@ -15207,14 +15115,14 @@ var sesame = $root.sesame = (() => {
15207
15115
  object.sourceIds = [];
15208
15116
  }
15209
15117
  if (options.defaults) {
15210
- object.encoded = null;
15118
+ object.encoder = null;
15211
15119
  object.filename = "";
15212
15120
  object.sizeGb = 0;
15213
15121
  object.groupId = "";
15214
15122
  object.recorderType = options.enums === String ? "RECORDER_TYPE_UNSPECIFIED" : 0;
15215
15123
  }
15216
- if (message.encoded != null && message.hasOwnProperty("encoded"))
15217
- object.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.toObject(message.encoded, options);
15124
+ if (message.encoder != null && message.hasOwnProperty("encoder"))
15125
+ object.encoder = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoder, options);
15218
15126
  if (message.filename != null && message.hasOwnProperty("filename"))
15219
15127
  object.filename = message.filename;
15220
15128
  if (message.sizeGb != null && message.hasOwnProperty("sizeGb"))
@@ -15255,7 +15163,7 @@ var sesame = $root.sesame = (() => {
15255
15163
  }
15256
15164
  }
15257
15165
  EncodedSrtOutputConfig.prototype.url = "";
15258
- EncodedSrtOutputConfig.prototype.encoded = null;
15166
+ EncodedSrtOutputConfig.prototype.encoder = null;
15259
15167
  EncodedSrtOutputConfig.create = function create(properties) {
15260
15168
  return new EncodedSrtOutputConfig(properties);
15261
15169
  };
@@ -15267,8 +15175,8 @@ var sesame = $root.sesame = (() => {
15267
15175
  /* id 1, wireType 2 =*/
15268
15176
  10
15269
15177
  ).string(message.url);
15270
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
15271
- $root.sesame.v1.outputs.OutputEncodedConfig.encode(message.encoded, writer.uint32(
15178
+ if (message.encoder != null && Object.hasOwnProperty.call(message, "encoder"))
15179
+ $root.sesame.v1.outputs.EncoderConfig.encode(message.encoder, writer.uint32(
15272
15180
  /* id 2, wireType 2 =*/
15273
15181
  18
15274
15182
  ).fork()).ldelim();
@@ -15291,7 +15199,7 @@ var sesame = $root.sesame = (() => {
15291
15199
  break;
15292
15200
  }
15293
15201
  case 2: {
15294
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.decode(reader, reader.uint32());
15202
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
15295
15203
  break;
15296
15204
  }
15297
15205
  default:
@@ -15313,10 +15221,10 @@ var sesame = $root.sesame = (() => {
15313
15221
  if (!$util.isString(message.url))
15314
15222
  return "url: string expected";
15315
15223
  }
15316
- if (message.encoded != null && message.hasOwnProperty("encoded")) {
15317
- let error = $root.sesame.v1.outputs.OutputEncodedConfig.verify(message.encoded);
15224
+ if (message.encoder != null && message.hasOwnProperty("encoder")) {
15225
+ let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoder);
15318
15226
  if (error)
15319
- return "encoded." + error;
15227
+ return "encoder." + error;
15320
15228
  }
15321
15229
  return null;
15322
15230
  };
@@ -15326,10 +15234,10 @@ var sesame = $root.sesame = (() => {
15326
15234
  let message = new $root.sesame.v1.outputs.EncodedSrtOutputConfig();
15327
15235
  if (object.url != null)
15328
15236
  message.url = String(object.url);
15329
- if (object.encoded != null) {
15330
- if (typeof object.encoded !== "object")
15331
- throw TypeError(".sesame.v1.outputs.EncodedSrtOutputConfig.encoded: object expected");
15332
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.fromObject(object.encoded);
15237
+ if (object.encoder != null) {
15238
+ if (typeof object.encoder !== "object")
15239
+ throw TypeError(".sesame.v1.outputs.EncodedSrtOutputConfig.encoder: object expected");
15240
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoder);
15333
15241
  }
15334
15242
  return message;
15335
15243
  };
@@ -15339,12 +15247,12 @@ var sesame = $root.sesame = (() => {
15339
15247
  let object = {};
15340
15248
  if (options.defaults) {
15341
15249
  object.url = "";
15342
- object.encoded = null;
15250
+ object.encoder = null;
15343
15251
  }
15344
15252
  if (message.url != null && message.hasOwnProperty("url"))
15345
15253
  object.url = message.url;
15346
- if (message.encoded != null && message.hasOwnProperty("encoded"))
15347
- object.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.toObject(message.encoded, options);
15254
+ if (message.encoder != null && message.hasOwnProperty("encoder"))
15255
+ object.encoder = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoder, options);
15348
15256
  return object;
15349
15257
  };
15350
15258
  EncodedSrtOutputConfig.prototype.toJSON = function toJSON() {
@@ -15366,7 +15274,7 @@ var sesame = $root.sesame = (() => {
15366
15274
  this[keys[i]] = properties[keys[i]];
15367
15275
  }
15368
15276
  }
15369
- EncodedMoqOutputConfig.prototype.encoded = null;
15277
+ EncodedMoqOutputConfig.prototype.encoder = null;
15370
15278
  EncodedMoqOutputConfig.prototype.url = "";
15371
15279
  EncodedMoqOutputConfig.prototype.broadcast = "";
15372
15280
  EncodedMoqOutputConfig.prototype.key = "";
@@ -15376,8 +15284,8 @@ var sesame = $root.sesame = (() => {
15376
15284
  EncodedMoqOutputConfig.encode = function encode(message, writer) {
15377
15285
  if (!writer)
15378
15286
  writer = $Writer.create();
15379
- if (message.encoded != null && Object.hasOwnProperty.call(message, "encoded"))
15380
- $root.sesame.v1.outputs.OutputEncodedConfig.encode(message.encoded, writer.uint32(
15287
+ if (message.encoder != null && Object.hasOwnProperty.call(message, "encoder"))
15288
+ $root.sesame.v1.outputs.EncoderConfig.encode(message.encoder, writer.uint32(
15381
15289
  /* id 1, wireType 2 =*/
15382
15290
  10
15383
15291
  ).fork()).ldelim();
@@ -15411,7 +15319,7 @@ var sesame = $root.sesame = (() => {
15411
15319
  break;
15412
15320
  switch (tag >>> 3) {
15413
15321
  case 1: {
15414
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.decode(reader, reader.uint32());
15322
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.decode(reader, reader.uint32());
15415
15323
  break;
15416
15324
  }
15417
15325
  case 2: {
@@ -15441,10 +15349,10 @@ var sesame = $root.sesame = (() => {
15441
15349
  EncodedMoqOutputConfig.verify = function verify(message) {
15442
15350
  if (typeof message !== "object" || message === null)
15443
15351
  return "object expected";
15444
- if (message.encoded != null && message.hasOwnProperty("encoded")) {
15445
- let error = $root.sesame.v1.outputs.OutputEncodedConfig.verify(message.encoded);
15352
+ if (message.encoder != null && message.hasOwnProperty("encoder")) {
15353
+ let error = $root.sesame.v1.outputs.EncoderConfig.verify(message.encoder);
15446
15354
  if (error)
15447
- return "encoded." + error;
15355
+ return "encoder." + error;
15448
15356
  }
15449
15357
  if (message.url != null && message.hasOwnProperty("url")) {
15450
15358
  if (!$util.isString(message.url))
@@ -15464,10 +15372,10 @@ var sesame = $root.sesame = (() => {
15464
15372
  if (object instanceof $root.sesame.v1.outputs.EncodedMoqOutputConfig)
15465
15373
  return object;
15466
15374
  let message = new $root.sesame.v1.outputs.EncodedMoqOutputConfig();
15467
- if (object.encoded != null) {
15468
- if (typeof object.encoded !== "object")
15469
- throw TypeError(".sesame.v1.outputs.EncodedMoqOutputConfig.encoded: object expected");
15470
- message.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.fromObject(object.encoded);
15375
+ if (object.encoder != null) {
15376
+ if (typeof object.encoder !== "object")
15377
+ throw TypeError(".sesame.v1.outputs.EncodedMoqOutputConfig.encoder: object expected");
15378
+ message.encoder = $root.sesame.v1.outputs.EncoderConfig.fromObject(object.encoder);
15471
15379
  }
15472
15380
  if (object.url != null)
15473
15381
  message.url = String(object.url);
@@ -15482,13 +15390,13 @@ var sesame = $root.sesame = (() => {
15482
15390
  options = {};
15483
15391
  let object = {};
15484
15392
  if (options.defaults) {
15485
- object.encoded = null;
15393
+ object.encoder = null;
15486
15394
  object.url = "";
15487
15395
  object.broadcast = "";
15488
15396
  object.key = "";
15489
15397
  }
15490
- if (message.encoded != null && message.hasOwnProperty("encoded"))
15491
- object.encoded = $root.sesame.v1.outputs.OutputEncodedConfig.toObject(message.encoded, options);
15398
+ if (message.encoder != null && message.hasOwnProperty("encoder"))
15399
+ object.encoder = $root.sesame.v1.outputs.EncoderConfig.toObject(message.encoder, options);
15492
15400
  if (message.url != null && message.hasOwnProperty("url"))
15493
15401
  object.url = message.url;
15494
15402
  if (message.broadcast != null && message.hasOwnProperty("broadcast"))
@@ -20469,8 +20377,8 @@ var sesame = $root.sesame = (() => {
20469
20377
  return jobs;
20470
20378
  }();
20471
20379
  v1.rpc = function() {
20472
- const rpc2 = {};
20473
- rpc2.Message = function() {
20380
+ const rpc = {};
20381
+ rpc.Message = function() {
20474
20382
  function Message2(properties) {
20475
20383
  if (properties) {
20476
20384
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -20632,7 +20540,7 @@ var sesame = $root.sesame = (() => {
20632
20540
  };
20633
20541
  return Message2;
20634
20542
  }();
20635
- rpc2.Request = function() {
20543
+ rpc.Request = function() {
20636
20544
  function Request2(properties) {
20637
20545
  if (properties) {
20638
20546
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -20769,7 +20677,7 @@ var sesame = $root.sesame = (() => {
20769
20677
  };
20770
20678
  return Request2;
20771
20679
  }();
20772
- rpc2.Response = function() {
20680
+ rpc.Response = function() {
20773
20681
  function Response2(properties) {
20774
20682
  if (properties) {
20775
20683
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -20925,7 +20833,7 @@ var sesame = $root.sesame = (() => {
20925
20833
  };
20926
20834
  return Response2;
20927
20835
  }();
20928
- rpc2.Event = function() {
20836
+ rpc.Event = function() {
20929
20837
  function Event2(properties) {
20930
20838
  if (properties) {
20931
20839
  for (let keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -21086,7 +20994,7 @@ var sesame = $root.sesame = (() => {
21086
20994
  };
21087
20995
  return Event2;
21088
20996
  }();
21089
- rpc2.SesameAPIService = function() {
20997
+ rpc.SesameAPIService = function() {
21090
20998
  function SesameAPIService(rpcImpl, requestDelimited, responseDelimited) {
21091
20999
  $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
21092
21000
  }
@@ -21144,7 +21052,7 @@ var sesame = $root.sesame = (() => {
21144
21052
  }, "name", { value: "RequestIODeviceList" });
21145
21053
  return SesameAPIService;
21146
21054
  }();
21147
- return rpc2;
21055
+ return rpc;
21148
21056
  }();
21149
21057
  return v1;
21150
21058
  }();
@@ -21160,7 +21068,7 @@ var CommandList = class {
21160
21068
  add(item, timeOffsetMs, transaction) {
21161
21069
  item.timeOffsetUs = (timeOffsetMs || 0) * 1e3;
21162
21070
  if (transaction) {
21163
- item.transactionDeps = (transaction == null ? void 0 : transaction.dependencies) || [];
21071
+ item.transactionDeps = transaction?.dependencies || [];
21164
21072
  item.transactionId = transaction.transactionId;
21165
21073
  }
21166
21074
  this.cl.commandList.push(item);
@@ -21197,174 +21105,40 @@ var CommandList = class {
21197
21105
  this.cl.commandList.splice(this.cl.commandList.indexOf(item.del), 1);
21198
21106
  });
21199
21107
  }
21200
- get_command_list_msg() {
21108
+ getCommandListMsg() {
21201
21109
  return this.cl;
21202
21110
  }
21203
- buildSourceConfig(cfg) {
21204
- var _a;
21205
- const config = {
21206
- common: {
21207
- userId: cfg.userId,
21208
- useAsClock: cfg.useAsClock,
21209
- audioOnly: cfg.audioOnly,
21210
- audioChannels: cfg.audioChannels,
21211
- loop: cfg.loop,
21212
- playState: cfg.playState,
21213
- mipMap: cfg.mipMap,
21214
- textureSize: cfg.textureSize,
21215
- decoderType: cfg.decoderType,
21216
- deinterlace: cfg.deinterlace,
21217
- videoProcessors: cfg.videoProcessors || []
21218
- }
21219
- };
21220
- switch (cfg.sourceType) {
21221
- case sesame.v1.sources.SourceType.SOURCE_TYPE_FILE:
21222
- config.file = { url: ((_a = cfg.fileConfig) == null ? void 0 : _a.filename) || cfg.url || "" };
21223
- break;
21224
- case sesame.v1.sources.SourceType.SOURCE_TYPE_RECORDER:
21225
- if (cfg.recorderConfig == null) throw new Error("No recorder source config found");
21226
- config.recorder = cfg.recorderConfig;
21227
- break;
21228
- case sesame.v1.sources.SourceType.SOURCE_TYPE_BROWSER:
21229
- if (!cfg.url) throw new Error("No browser URL found");
21230
- config.browser = { url: cfg.url };
21231
- break;
21232
- case sesame.v1.sources.SourceType.SOURCE_TYPE_RTT:
21233
- if (cfg.rttConfig == null) throw new Error("No RTT config found");
21234
- config.rtt = cfg.rttConfig;
21235
- break;
21236
- case sesame.v1.sources.SourceType.SOURCE_TYPE_DECKLINK:
21237
- if (cfg.decklinkConfig == null) throw new Error("No decklink source config found");
21238
- config.decklink = cfg.decklinkConfig;
21239
- break;
21240
- case sesame.v1.sources.SourceType.SOURCE_TYPE_SIGNAL_GENERATOR:
21241
- config.signalGenerator = {};
21242
- break;
21243
- case sesame.v1.sources.SourceType.SOURCE_TYPE_SYSTEM_AUDIO:
21244
- config.systemAudio = { deviceName: cfg.url || "" };
21245
- break;
21246
- case sesame.v1.sources.SourceType.SOURCE_TYPE_SRT_STREAM:
21247
- config.srtStream = cfg.srtConfig || (cfg.url ? { url: cfg.url } : void 0);
21248
- if (config.srtStream == null) throw new Error("No SRT source config found");
21249
- if (cfg.decodeBufferFrames) config.srtStream.decodeBufferFrames = cfg.decodeBufferFrames;
21250
- break;
21251
- case sesame.v1.sources.SourceType.SOURCE_TYPE_WEBSOCKET:
21252
- if (!cfg.url) throw new Error("No websocket channel found");
21253
- config.websocket = { channel: cfg.url };
21254
- if (cfg.decodeBufferFrames) config.websocket.decodeBufferFrames = cfg.decodeBufferFrames;
21255
- break;
21256
- case sesame.v1.sources.SourceType.SOURCE_TYPE_MOQ:
21257
- if (cfg.moqConfig == null) throw new Error("No MoQ source config found");
21258
- config.moq = cfg.moqConfig;
21259
- if (cfg.decodeBufferFrames) config.moq.decodeBufferFrames = cfg.decodeBufferFrames;
21260
- break;
21261
- default:
21262
- throw new Error(`Unsupported source type: ${cfg.sourceType}`);
21263
- }
21264
- return config;
21265
- }
21266
- buildOutputEncodedConfig(cfg) {
21267
- return {
21268
- width: cfg.width,
21269
- height: cfg.height,
21270
- fps: cfg.fps,
21271
- encoderConfig: cfg.encoderConfig
21272
- };
21273
- }
21274
- buildOutputConfig(id, cfg) {
21275
- const outputConfig = {
21276
- id,
21277
- audioMixIds: cfg.audioMixIds,
21278
- compositionId: cfg.compositionId,
21279
- useAsClock: !!cfg.useAsClock
21280
- };
21281
- switch (cfg.outputType) {
21282
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_DECKLINK:
21283
- if (cfg.decklinkConfig == null) throw new Error("No decklink config found");
21284
- outputConfig.decklink = cfg.decklinkConfig;
21285
- break;
21286
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_RECORDER:
21287
- if (cfg.recorderConfig == null) throw new Error("No recorder config found");
21288
- if (cfg.encodedConfig == null) throw new Error("No output config found");
21289
- outputConfig.recorder = {
21290
- encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21291
- filename: cfg.recorderConfig.filename,
21292
- sizeGb: cfg.recorderConfig.sizeGb,
21293
- groupId: cfg.recorderConfig.groupId
21294
- };
21295
- break;
21296
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SUPER_SLOWMO_RECORDER:
21297
- if (cfg.recorderConfig == null) throw new Error("No recorder config found");
21298
- if (cfg.encodedConfig == null) throw new Error("No output config found");
21299
- outputConfig.superSlowmoRecorder = {
21300
- encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21301
- filename: cfg.recorderConfig.filename,
21302
- sizeGb: cfg.recorderConfig.sizeGb,
21303
- groupId: cfg.recorderConfig.groupId
21304
- };
21305
- break;
21306
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_SYSTEM_AUDIO:
21307
- if (cfg.systemAudioConfig == null) throw new Error("No system audio config found");
21308
- outputConfig.systemAudio = cfg.systemAudioConfig;
21309
- break;
21310
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SRT:
21311
- if (cfg.encodedConfig == null) throw new Error("No output config found");
21312
- outputConfig.srt = {
21313
- url: cfg.encodedConfig.url,
21314
- encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
21315
- };
21316
- break;
21317
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_WEBSOCKET:
21318
- if (cfg.encodedConfig == null) throw new Error("No output config found");
21319
- outputConfig.websocket = {
21320
- channel: cfg.encodedConfig.url,
21321
- encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
21322
- };
21323
- break;
21324
- case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_MOQ:
21325
- if (cfg.moqConfig == null) throw new Error("No MoQ config found");
21326
- if (cfg.encodedConfig == null) throw new Error("No output config found");
21327
- outputConfig.moq = {
21328
- ...cfg.moqConfig,
21329
- encoded: this.buildOutputEncodedConfig(cfg.encodedConfig)
21330
- };
21331
- break;
21332
- default:
21333
- throw new Error(`Unsupported output type: ${cfg.outputType}`);
21334
- }
21335
- return outputConfig;
21336
- }
21337
21111
  callback(event, data, timeOffsetMs) {
21338
21112
  let item = new sesame.v1.commands.CommandListItem();
21339
21113
  item.callback = { event, data };
21340
21114
  return this.add(item, timeOffsetMs);
21341
21115
  }
21342
- add_compositor(id, width, height, multisample, timeOffsetMs) {
21116
+ compositorAdd(id, width, height, multisample, timeOffsetMs) {
21343
21117
  let item = new sesame.v1.commands.CommandListItem();
21344
21118
  item.addCompositor = { id, multisample, width, height };
21345
21119
  return this.add(item, timeOffsetMs);
21346
21120
  }
21347
- remove_compositor(id, timeOffsetMs) {
21121
+ compositorRemove(id, timeOffsetMs) {
21348
21122
  let item = new sesame.v1.commands.CommandListItem();
21349
21123
  item.removeCompositor = { id };
21350
21124
  return this.add(item, timeOffsetMs);
21351
21125
  }
21352
- clear_compositor(id, timeOffsetMs) {
21126
+ compositorClear(id, timeOffsetMs) {
21353
21127
  let item = new sesame.v1.commands.CommandListItem();
21354
21128
  item.clearCompositor = { id };
21355
21129
  return this.add(item, timeOffsetMs);
21356
21130
  }
21357
- add_source(id, cfg, timeOffsetMs) {
21131
+ sourceAdd(id, cfg, timeOffsetMs) {
21358
21132
  let item = new sesame.v1.commands.CommandListItem();
21359
- item.addSource = { id, config: this.buildSourceConfig(cfg) };
21133
+ item.addSource = { id, config: cfg };
21360
21134
  return this.add(item, timeOffsetMs);
21361
21135
  }
21362
- remove_source(id, timeOffsetMs) {
21136
+ sourceRemove(id, timeOffsetMs) {
21363
21137
  let item = new sesame.v1.commands.CommandListItem();
21364
21138
  item.removeSource = { id };
21365
21139
  return this.add(item, timeOffsetMs);
21366
21140
  }
21367
- add_node(id, cfg, timeOffsetMs) {
21141
+ nodeAdd(id, cfg, timeOffsetMs) {
21368
21142
  let item = new sesame.v1.commands.CommandListItem();
21369
21143
  item.addNode = {
21370
21144
  compositorId: cfg.compositorId,
@@ -21374,12 +21148,12 @@ var CommandList = class {
21374
21148
  };
21375
21149
  return this.add(item, timeOffsetMs);
21376
21150
  }
21377
- remove_node(compositorId, address, timeOffsetMs) {
21151
+ nodeRemove(compositorId, address, timeOffsetMs) {
21378
21152
  let item = new sesame.v1.commands.CommandListItem();
21379
21153
  item.removeNode = { compositorId, address };
21380
21154
  return this.add(item, timeOffsetMs);
21381
21155
  }
21382
- set_property(propertyDomain, addr, prop, val, timeOffsetMs) {
21156
+ propertySet(propertyDomain, addr, prop, val, timeOffsetMs) {
21383
21157
  let item = new sesame.v1.commands.CommandListItem();
21384
21158
  item.setProperty = {
21385
21159
  address: addr,
@@ -21389,17 +21163,17 @@ var CommandList = class {
21389
21163
  };
21390
21164
  return this.add(item, timeOffsetMs);
21391
21165
  }
21392
- add_load_playlist_command(sourceId, playlist) {
21166
+ playlistLoad(sourceId, playlist) {
21393
21167
  const item = new sesame.v1.commands.CommandListItem();
21394
21168
  const loadPlaylistCmd = {
21395
21169
  items: playlist.clips.map((clip) => ({
21396
21170
  id: clip.id,
21397
21171
  recorderId: clip.recorderId,
21398
- transitionTimeUs: (clip.transitionTime || 0) * 1e3,
21172
+ transitionTimeUs: clip.transitionTimeUs,
21399
21173
  speed: clip.speed || 1,
21400
21174
  audioRouting: clip.audioRouting,
21401
- startTimeUs: clip.startTime,
21402
- endTimeUs: clip.endTime,
21175
+ startTimeUs: clip.startTimeUs,
21176
+ endTimeUs: clip.endTimeUs,
21403
21177
  transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
21404
21178
  transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
21405
21179
  })),
@@ -21412,13 +21186,13 @@ var CommandList = class {
21412
21186
  item.loadPlaylist = loadPlaylistCmd;
21413
21187
  return this.add(item, 0);
21414
21188
  }
21415
- add_eject_playlist_command(sourceId) {
21189
+ playlistEject(sourceId) {
21416
21190
  const item = new sesame.v1.commands.CommandListItem();
21417
21191
  const ejectPlaylistCmd = { sourceId };
21418
21192
  item.ejectPlaylist = ejectPlaylistCmd;
21419
21193
  return this.add(item, 0);
21420
21194
  }
21421
- add_transport_command(id, msg, timeOffsetMs) {
21195
+ transportCommand(id, msg, timeOffsetMs) {
21422
21196
  let item = new sesame.v1.commands.CommandListItem();
21423
21197
  let transportCmd = { sourceId: id };
21424
21198
  let cmd;
@@ -21491,17 +21265,17 @@ var CommandList = class {
21491
21265
  item.updateSourceTransport = transportCmd;
21492
21266
  return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies: [] });
21493
21267
  }
21494
- update_source(id, cfg, timeOffsetMs) {
21268
+ sourceUpdate(id, cfg, timeOffsetMs) {
21495
21269
  let item = new sesame.v1.commands.CommandListItem();
21496
- item.updateSource = { id, config: this.buildSourceConfig(cfg) };
21270
+ item.updateSource = { id, config: cfg };
21497
21271
  return this.add(item, timeOffsetMs);
21498
21272
  }
21499
- update_source_metadata(id, metadata, timeOffsetMs) {
21273
+ sourceUpdateMetadata(id, metadata, timeOffsetMs) {
21500
21274
  let item = new sesame.v1.commands.CommandListItem();
21501
21275
  item.setSourceMetadata = { sourceId: id, metadata };
21502
21276
  return this.add(item, timeOffsetMs);
21503
21277
  }
21504
- update_source_transport(id, cfg, timeOffsetMs) {
21278
+ sourceUpdateTransport(id, cfg, timeOffsetMs) {
21505
21279
  let item = new sesame.v1.commands.CommandListItem();
21506
21280
  item.updateSourceTransport = {
21507
21281
  sourceId: id,
@@ -21510,47 +21284,47 @@ var CommandList = class {
21510
21284
  };
21511
21285
  return this.add(item, timeOffsetMs);
21512
21286
  }
21513
- add_output(id, cfg, timeOffsetMs) {
21287
+ outputAdd(id, cfg, timeOffsetMs) {
21514
21288
  let item = new sesame.v1.commands.CommandListItem();
21515
- item.addOutput = this.buildOutputConfig(id, cfg);
21289
+ item.addOutput = { id, ...cfg };
21516
21290
  return this.add(item, timeOffsetMs);
21517
21291
  }
21518
- update_output(id, cfg, timeOffsetMs) {
21292
+ outputUpdate(id, cfg, timeOffsetMs) {
21519
21293
  let item = new sesame.v1.commands.CommandListItem();
21520
- item.updateOutput = this.buildOutputConfig(id, cfg);
21294
+ item.updateOutput = { id, ...cfg };
21521
21295
  return this.add(item, timeOffsetMs);
21522
21296
  }
21523
- remove_output(id, timeOffsetMs) {
21297
+ outputRemove(id, timeOffsetMs) {
21524
21298
  let item = new sesame.v1.commands.CommandListItem();
21525
21299
  item.removeOutput = { id };
21526
21300
  return this.add(item, timeOffsetMs);
21527
21301
  }
21528
- add_audio_mixer(id, cfg, timeOffsetMs) {
21302
+ audioMixerAdd(id, cfg, timeOffsetMs) {
21529
21303
  let item = new sesame.v1.commands.CommandListItem();
21530
21304
  item.addAudioMixer = { id, config: cfg };
21531
21305
  return this.add(item, timeOffsetMs);
21532
21306
  }
21533
- update_audio_mixer(id, cfg, timeOffsetMs) {
21307
+ audioMixerUpdate(id, cfg, timeOffsetMs) {
21534
21308
  let item = new sesame.v1.commands.CommandListItem();
21535
21309
  item.updateAudioMixer = { id, config: cfg };
21536
21310
  return this.add(item, timeOffsetMs);
21537
21311
  }
21538
- add_audio_mixer_channel(mixerId, cfg, timeOffsetMs) {
21312
+ audioMixerChannelAdd(mixerId, cfg, timeOffsetMs) {
21539
21313
  let item = new sesame.v1.commands.CommandListItem();
21540
21314
  item.addAudioChannel = { mixerId, channelConfig: cfg };
21541
21315
  return this.add(item, timeOffsetMs);
21542
21316
  }
21543
- remove_audio_mixer(mixerId, timeOffsetMs) {
21317
+ audioMixerRemove(mixerId, timeOffsetMs) {
21544
21318
  let item = new sesame.v1.commands.CommandListItem();
21545
21319
  item.removeAudioMixer = { id: mixerId };
21546
21320
  return this.add(item, timeOffsetMs);
21547
21321
  }
21548
- remove_audio_mixer_channel(mixerId, channelId, timeOffsetMs) {
21322
+ audioMixerChannelRemove(mixerId, channelId, timeOffsetMs) {
21549
21323
  let item = new sesame.v1.commands.CommandListItem();
21550
21324
  item.removeAudioChannel = { mixerId, channelId };
21551
21325
  return this.add(item, timeOffsetMs);
21552
21326
  }
21553
- animate_property(propertyDomain, addr, prop, before, after, keyframes, timeOffsetMs) {
21327
+ propertyAnimate(propertyDomain, addr, prop, before, after, keyframes, timeOffsetMs) {
21554
21328
  let item = new sesame.v1.commands.CommandListItem();
21555
21329
  item.animateProperty = {
21556
21330
  address: addr,
@@ -21566,7 +21340,6 @@ var CommandList = class {
21566
21340
 
21567
21341
  // src/rpc-client.ts
21568
21342
  import { EventEmitter } from "events";
21569
- import * as WebSocket from "ws";
21570
21343
 
21571
21344
  // src/logger.ts
21572
21345
  var ConsoleLogger = class {
@@ -21745,7 +21518,6 @@ var RPCClient = class extends EventEmitter {
21745
21518
 
21746
21519
  // src/sesame-connection.ts
21747
21520
  import { EventEmitter as EventEmitter2 } from "events";
21748
- import WebSocket2 from "ws";
21749
21521
 
21750
21522
  // src/sesame-binary-protocol.ts
21751
21523
  var PROTOCOL_MAGIC = 1297302867;
@@ -21996,6 +21768,13 @@ var SesameBinaryProtocol = class {
21996
21768
  };
21997
21769
 
21998
21770
  // src/sesame-connection.ts
21771
+ var ConnectionState = /* @__PURE__ */ ((ConnectionState2) => {
21772
+ ConnectionState2["Disconnected"] = "disconnected";
21773
+ ConnectionState2["Connecting"] = "connecting";
21774
+ ConnectionState2["Connected"] = "connected";
21775
+ ConnectionState2["Reconnecting"] = "reconnecting";
21776
+ return ConnectionState2;
21777
+ })(ConnectionState || {});
21999
21778
  function waitForEvent(emitter, eventName) {
22000
21779
  return new Promise((resolve) => {
22001
21780
  emitter.once(eventName, resolve);
@@ -22008,30 +21787,61 @@ var SesameConnection = class extends EventEmitter2 {
22008
21787
  this.numRetries = 0;
22009
21788
  this.url = "";
22010
21789
  this.autoReconnect = true;
21790
+ this._state = "disconnected" /* Disconnected */;
21791
+ /* Bound listeners so we can removeEventListener later */
21792
+ this.boundMessageHandler = (event) => this.messageHandler(event);
21793
+ this.boundOpenHandler = () => this.openHandler();
21794
+ this.boundCloseHandler = () => this.closeHandler();
21795
+ this.boundErrorHandler = (event) => this.errorHandler(event);
22011
21796
  this.openHandler = () => {
22012
21797
  this.numRetries = 0;
21798
+ this.setState("connected" /* Connected */);
22013
21799
  this.emit("open");
22014
21800
  };
22015
21801
  this.messageHandler = (event) => {
22016
- var _a, _b, _c;
22017
21802
  if (event.data instanceof ArrayBuffer) {
22018
21803
  const parsed = SesameBinaryProtocol.parseData(new Uint8Array(event.data));
22019
21804
  if (!parsed.valid) this.emit("error", new Error("Invalid packet received"));
22020
- if (((_a = parsed.header) == null ? void 0 : _a.type) == 1 /* VIDEO_FRAME */) {
21805
+ if (parsed.header?.type == 1 /* VIDEO_FRAME */) {
22021
21806
  this.emit("video-packet", event.data);
22022
- } else if (((_b = parsed.header) == null ? void 0 : _b.type) == 2 /* AUDIO_FRAME */) {
21807
+ } else if (parsed.header?.type == 2 /* AUDIO_FRAME */) {
22023
21808
  this.emit("audio-packet", event.data);
22024
- } else if (((_c = parsed.header) == null ? void 0 : _c.type) == 3 /* RPC */) {
21809
+ } else if (parsed.header?.type == 3 /* RPC */) {
22025
21810
  this.emit("rpc", parsed.payload);
22026
21811
  }
22027
21812
  }
22028
21813
  };
22029
21814
  this.url = options.url;
22030
21815
  this.autoReconnect = options.autoReconnect;
22031
- if (options.autoConnect) this.connect().catch(() => log.debug("failed connect"));
21816
+ if (options.autoConnect) this.connect().catch(() => {
21817
+ });
21818
+ }
21819
+ get state() {
21820
+ return this._state;
21821
+ }
21822
+ setState(newState) {
21823
+ if (this._state === newState) return;
21824
+ const prev = this._state;
21825
+ this._state = newState;
21826
+ switch (newState) {
21827
+ case "connected" /* Connected */:
21828
+ log.info("Connected to Sesame");
21829
+ break;
21830
+ case "reconnecting" /* Reconnecting */:
21831
+ if (prev === "connected" /* Connected */) {
21832
+ log.warn("Lost connection to Sesame, will try reconnect..");
21833
+ } else {
21834
+ log.warn("Failed to connect to Sesame, will try reconnect..");
21835
+ }
21836
+ break;
21837
+ case "disconnected" /* Disconnected */:
21838
+ log.info("Disconnected from Sesame");
21839
+ break;
21840
+ }
21841
+ this.emit("state", newState, prev);
22032
21842
  }
22033
21843
  isConnected() {
22034
- return this.socket !== void 0 && this.socket.readyState === WebSocket2.OPEN;
21844
+ return this.socket !== void 0 && this.socket.readyState === WebSocket.OPEN;
22035
21845
  }
22036
21846
  async send(data) {
22037
21847
  if (!this.isConnected()) throw new Error("Not connected");
@@ -22043,11 +21853,14 @@ var SesameConnection = class extends EventEmitter2 {
22043
21853
  }
22044
21854
  async connect() {
22045
21855
  this.active = true;
22046
- this.socket = new WebSocket2(this.url);
22047
- this.socket.addEventListener("message", (event) => this.messageHandler(event));
22048
- this.socket.addEventListener("open", () => this.openHandler());
22049
- this.socket.addEventListener("close", () => this.closeHandler());
22050
- this.socket.addEventListener("error", (error) => this.errorHandler(error));
21856
+ if (this._state === "disconnected" /* Disconnected */) {
21857
+ this.setState("connecting" /* Connecting */);
21858
+ }
21859
+ this.socket = new WebSocket(this.url);
21860
+ this.socket.addEventListener("message", this.boundMessageHandler);
21861
+ this.socket.addEventListener("open", this.boundOpenHandler);
21862
+ this.socket.addEventListener("close", this.boundCloseHandler);
21863
+ this.socket.addEventListener("error", this.boundErrorHandler);
22051
21864
  this.socket.binaryType = "arraybuffer";
22052
21865
  await new Promise((resolve) => {
22053
21866
  const done = () => {
@@ -22065,30 +21878,41 @@ var SesameConnection = class extends EventEmitter2 {
22065
21878
  async disconnect() {
22066
21879
  this.active = false;
22067
21880
  if (!this.socket) {
21881
+ this.setState("disconnected" /* Disconnected */);
22068
21882
  return;
22069
21883
  }
22070
- if (this.socket.readyState !== WebSocket2.CLOSED) {
22071
- this.socket.close();
21884
+ const sock = this.socket;
21885
+ if (sock.readyState !== WebSocket.CLOSED) {
21886
+ sock.close();
22072
21887
  await waitForEvent(this, "close");
22073
21888
  }
22074
- this.socket.removeAllListeners();
21889
+ this.removeSocketListeners(sock);
21890
+ }
21891
+ removeSocketListeners(sock) {
21892
+ sock.removeEventListener("message", this.boundMessageHandler);
21893
+ sock.removeEventListener("open", this.boundOpenHandler);
21894
+ sock.removeEventListener("close", this.boundCloseHandler);
21895
+ sock.removeEventListener("error", this.boundErrorHandler);
22075
21896
  }
22076
21897
  retryHandler() {
22077
21898
  if (this.active && this.autoReconnect) {
22078
- this.connect().catch((err) => log.error("Retry failed", err));
21899
+ this.connect().catch(() => {
21900
+ });
22079
21901
  }
22080
21902
  }
22081
21903
  closeHandler() {
22082
21904
  this.emit("close");
21905
+ if (this.socket) {
21906
+ this.removeSocketListeners(this.socket);
21907
+ }
22083
21908
  this.socket = void 0;
22084
21909
  if (this.active) {
22085
- try {
22086
- setTimeout(() => {
22087
- this.retryHandler();
22088
- }, defaultBackoff(++this.numRetries));
22089
- } catch (err) {
22090
- log.error("Connection error", err);
22091
- }
21910
+ this.setState("reconnecting" /* Reconnecting */);
21911
+ setTimeout(() => {
21912
+ this.retryHandler();
21913
+ }, defaultBackoff(++this.numRetries));
21914
+ } else {
21915
+ this.setState("disconnected" /* Disconnected */);
22092
21916
  }
22093
21917
  }
22094
21918
  errorHandler(error) {
@@ -22101,6 +21925,131 @@ var defaultBackoff = (tries) => {
22101
21925
 
22102
21926
  // src/sesame-api-client.ts
22103
21927
  import { EventEmitter as EventEmitter3 } from "events";
21928
+
21929
+ // src/status-api.ts
21930
+ var StatusApi = class {
21931
+ /** @internal */
21932
+ constructor(rpc) {
21933
+ this.rpc = rpc;
21934
+ }
21935
+ async getStatus() {
21936
+ return this.rpc.service.requestStatus(new sesame.v1.common.Empty());
21937
+ }
21938
+ async getIODevices() {
21939
+ return this.rpc.service.requestIODeviceList(new sesame.v1.common.Empty());
21940
+ }
21941
+ async requestKeyframe(outputId) {
21942
+ await this.rpc.service.requestKeyframe({ id: outputId });
21943
+ }
21944
+ };
21945
+
21946
+ // src/recorder-api.ts
21947
+ var RecorderApi = class {
21948
+ /** @internal */
21949
+ constructor(rpc) {
21950
+ this.rpc = rpc;
21951
+ }
21952
+ async addClip(recorderId, clip) {
21953
+ const msg = sesame.v1.recorder.RecorderClipAddRequest.create({ clip });
21954
+ await this.rpc.service.requestRecorderOperation({ recorderId, addClip: msg });
21955
+ }
21956
+ async copyClip(recorderId, clipId, newClipId) {
21957
+ const msg = sesame.v1.recorder.RecorderClipCopyRequest.create({ clipId, newClipId });
21958
+ await this.rpc.service.requestRecorderOperation({ recorderId, copyClip: msg });
21959
+ }
21960
+ async removeClip(recorderId, id) {
21961
+ const msg = sesame.v1.recorder.RecorderClipRemoveRequest.create({ clipId: id });
21962
+ await this.rpc.service.requestRecorderOperation({ recorderId, removeClip: msg });
21963
+ }
21964
+ async removeAllClips(recorderId, protect) {
21965
+ const msg = sesame.v1.recorder.RecorderClipsClearRequest.create();
21966
+ if (protect) msg.protectedRanges = protect;
21967
+ await this.rpc.service.requestRecorderOperation({ recorderId, clearClips: msg });
21968
+ }
21969
+ async verifyClips(recorderId) {
21970
+ const msg = sesame.v1.recorder.RecorderClipsVerifyRequest.create();
21971
+ const reply = await this.rpc.service.requestRecorderOperation({ recorderId, verifyClips: msg });
21972
+ return reply.verifyClipsResponse?.errors || [];
21973
+ }
21974
+ async getClips(recorderId) {
21975
+ const msg = sesame.v1.recorder.RecorderClipsGetRequest.create();
21976
+ const reply = await this.rpc.service.requestRecorderOperation({ recorderId, getClips: msg });
21977
+ if (reply.getClipsResponse?.clips) {
21978
+ return reply.getClipsResponse.clips;
21979
+ } else {
21980
+ throw new Error(`No clips returned: ${JSON.stringify(reply)}`);
21981
+ }
21982
+ }
21983
+ async setLockedDuration(frames) {
21984
+ const msg = sesame.v1.recorder.RecorderLockedDurationSetRequest.create({ frames });
21985
+ await this.rpc.service.requestRecorderOperation({ recorderId: "", setLockedDuration: msg });
21986
+ }
21987
+ async setMetadata(recorderId, metadata) {
21988
+ const msg = sesame.v1.recorder.RecorderMetadataSetRequest.create({ metadata });
21989
+ await this.rpc.service.requestRecorderOperation({ recorderId, setMetadata: msg });
21990
+ }
21991
+ };
21992
+
21993
+ // src/jobs-api.ts
21994
+ var JobsApi = class {
21995
+ /** @internal */
21996
+ constructor(rpc) {
21997
+ this.rpc = rpc;
21998
+ }
21999
+ async importClip(config) {
22000
+ const msg = sesame.v1.jobs.ImportStartRequest.create();
22001
+ msg.config = config;
22002
+ const res = await this.rpc.service.requestClipImportStart(msg);
22003
+ if (res.error) {
22004
+ throw new Error(res.error);
22005
+ }
22006
+ return res;
22007
+ }
22008
+ async getImportStatus() {
22009
+ const msg = sesame.v1.jobs.ImportListRequest.create();
22010
+ return this.rpc.service.requestClipImportList(msg);
22011
+ }
22012
+ async abortImport(jobId) {
22013
+ const msg = { jobId };
22014
+ return this.rpc.service.requestClipImportAbort(msg);
22015
+ }
22016
+ async exportPlaylist(playlist, config) {
22017
+ const msg = sesame.v1.jobs.ExportStartRequest.create();
22018
+ if (!config.filename) throw new Error("Filename is required");
22019
+ msg.config = {
22020
+ ...config,
22021
+ filename: config.filename,
22022
+ videoCodec: config.videoCodec ?? sesame.v1.common.CodecId.CODEC_ID_H264,
22023
+ videoBitrateKbps: config.videoBitrateKbps ?? 1024,
22024
+ audioCodec: config.audioCodec ?? sesame.v1.jobs.AudioCodecId.AUDIO_CODEC_ID_AAC,
22025
+ audioBitrateKbps: config.audioBitrateKbps ?? 128,
22026
+ audioChannels: config.audioChannels ?? 4,
22027
+ audioRouting: config.audioRouting ?? [0, 1, 2, 3]
22028
+ };
22029
+ msg.items = playlist.clips.map((clip) => ({
22030
+ id: clip.id,
22031
+ recorderId: clip.recorderId,
22032
+ transitionTimeUs: clip.transitionTimeUs ?? 0,
22033
+ transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
22034
+ transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 },
22035
+ speed: clip.speed ?? 1,
22036
+ audioRouting: clip.audioRouting,
22037
+ startTimeUs: clip.startTimeUs,
22038
+ endTimeUs: clip.endTimeUs
22039
+ }));
22040
+ await this.rpc.service.requestPlaylistExportStart(msg);
22041
+ }
22042
+ async getExportStatus() {
22043
+ const msg = sesame.v1.jobs.ExportListRequest.create();
22044
+ return this.rpc.service.requestPlaylistExportList(msg);
22045
+ }
22046
+ async abortExport(jobId) {
22047
+ const msg = { jobId };
22048
+ return this.rpc.service.requestPlaylistExportAbort(msg);
22049
+ }
22050
+ };
22051
+
22052
+ // src/sesame-api-client.ts
22104
22053
  var EaseKind = /* @__PURE__ */ ((EaseKind2) => {
22105
22054
  EaseKind2["STEPPED"] = "stepped";
22106
22055
  EaseKind2["LINEAR"] = "linear";
@@ -22140,7 +22089,6 @@ var SesameClient = class extends EventEmitter3 {
22140
22089
  constructor(portOrUrl) {
22141
22090
  super();
22142
22091
  this.subscriptions = [];
22143
- this.errorIsLogged = false;
22144
22092
  this.onVideoPacket = () => {
22145
22093
  };
22146
22094
  this.onAudioPacket = () => {
@@ -22154,10 +22102,6 @@ var SesameClient = class extends EventEmitter3 {
22154
22102
  autoReconnect: true
22155
22103
  });
22156
22104
  this.conn.on("error", () => {
22157
- if (!this.errorIsLogged) {
22158
- log.warn("Could not connect to Sesame Engine, will keep trying..");
22159
- this.errorIsLogged = true;
22160
- }
22161
22105
  });
22162
22106
  let events = {
22163
22107
  [sesame.v1.common.EventTopic.EVENT_TOPIC_ERROR]: sesame.v1.status.Event,
@@ -22171,6 +22115,9 @@ var SesameClient = class extends EventEmitter3 {
22171
22115
  eventTypes: events
22172
22116
  };
22173
22117
  this.rpc = new RPCClient(this.conn, sesame.v1.rpc.SesameAPIService, options);
22118
+ this.status = new StatusApi(this.rpc);
22119
+ this.recorder = new RecorderApi(this.rpc);
22120
+ this.jobs = new JobsApi(this.rpc);
22174
22121
  this.rpc.on("event", (topic, msg) => {
22175
22122
  for (const subscription of this.subscriptions) {
22176
22123
  if (subscription.topic === topic) {
@@ -22179,175 +22126,61 @@ var SesameClient = class extends EventEmitter3 {
22179
22126
  }
22180
22127
  });
22181
22128
  this.rpc.on("error", (err) => {
22182
- log.error(`RPC error: ${err.message}`);
22129
+ if (this.isConnected()) {
22130
+ log.error(`RPC error: ${err.message}`);
22131
+ }
22183
22132
  });
22184
22133
  this.conn.on("open", async () => {
22185
- this.send_subscriptions();
22186
- this.errorIsLogged = false;
22134
+ this.sendSubscriptions();
22187
22135
  this.emit("connected");
22188
22136
  });
22189
22137
  this.conn.on("close", () => {
22190
22138
  this.emit("disconnected");
22191
22139
  });
22192
- this.conn.on("video-packet", (data) => this.onVideoPacket(this.video_subscription, data));
22193
- this.conn.on("audio-packet", (data) => this.onAudioPacket(this.video_subscription, data));
22140
+ this.conn.on("video-packet", (data) => this.onVideoPacket(this.videoSubscriptionId, data));
22141
+ this.conn.on("audio-packet", (data) => this.onAudioPacket(this.videoSubscriptionId, data));
22194
22142
  this.subscriptions = [];
22195
22143
  }
22196
22144
  isConnected() {
22197
22145
  return this.conn.isConnected();
22198
22146
  }
22199
- send_subscriptions() {
22147
+ sendSubscriptions() {
22200
22148
  if (!this.isConnected()) return;
22201
22149
  const eventTopics = this.subscriptions.map((subscription) => subscription.topic);
22202
22150
  const channels = [];
22203
- if (this.video_subscription) channels.push(`video/${this.video_subscription}`);
22151
+ if (this.videoSubscriptionId) channels.push(`video/${this.videoSubscriptionId}`);
22204
22152
  let subs = { eventTopics, channels };
22205
22153
  this.rpc.service.updateSubscriptions(subs).catch((err) => {
22206
22154
  log.error(`Failed to update subscriptions: ${err.message}`);
22207
22155
  });
22208
22156
  }
22209
- async get_status() {
22210
- const status = await this.rpc.service.requestStatus(new sesame.v1.common.Empty());
22211
- return status;
22157
+ addVideoSubscription(id) {
22158
+ this.videoSubscriptionId = id;
22159
+ this.sendSubscriptions();
22212
22160
  }
22213
- async get_io_devices() {
22214
- const reply = await this.rpc.service.requestIODeviceList(new sesame.v1.common.Empty());
22215
- return reply;
22216
- }
22217
- async request_keyframe(outputId) {
22218
- await this.rpc.service.requestKeyframe({ id: outputId });
22219
- }
22220
- add_video_subscription(id) {
22221
- this.video_subscription = id;
22222
- this.send_subscriptions();
22223
- }
22224
- add_subscription(topic, callback) {
22161
+ addSubscription(topic, callback) {
22225
22162
  for (let i = 0; i < this.subscriptions.length; i++) {
22226
22163
  if (this.subscriptions[i].callback === callback && this.subscriptions[i].topic === topic) {
22227
22164
  return;
22228
22165
  }
22229
22166
  }
22230
22167
  this.subscriptions.push({ topic, callback });
22231
- this.send_subscriptions();
22168
+ this.sendSubscriptions();
22232
22169
  }
22233
- remove_subscription(topic, callback) {
22170
+ removeSubscription(topic, callback) {
22234
22171
  this.subscriptions = this.subscriptions.filter((s) => !(s.topic === topic && s.callback === callback));
22235
- this.send_subscriptions();
22172
+ this.sendSubscriptions();
22236
22173
  }
22237
22174
  getService() {
22238
22175
  return this.rpc;
22239
22176
  }
22240
22177
  async execute(cl) {
22241
22178
  cl.filterCreatedAndDestroyedSources();
22242
- if (cl.get_command_list_msg().commandList.length > 0) {
22243
- await this.rpc.service.executeCommandList(cl.get_command_list_msg());
22179
+ if (cl.getCommandListMsg().commandList.length > 0) {
22180
+ await this.rpc.service.executeCommandList(cl.getCommandListMsg());
22244
22181
  }
22245
22182
  }
22246
- async addClip(recorderId, clip) {
22247
- const msg = sesame.v1.recorder.RecorderClipAddRequest.create({ clip });
22248
- await this.rpc.service.requestRecorderOperation({ recorderId, addClip: msg });
22249
- }
22250
- async copyClip(recorderId, clipId, newClipId) {
22251
- const msg = sesame.v1.recorder.RecorderClipCopyRequest.create({ clipId, newClipId });
22252
- await this.rpc.service.requestRecorderOperation({ recorderId, copyClip: msg });
22253
- }
22254
- async removeClip(recorderId, id) {
22255
- const msg = sesame.v1.recorder.RecorderClipRemoveRequest.create({ clipId: id });
22256
- await this.rpc.service.requestRecorderOperation({ recorderId, removeClip: msg });
22257
- }
22258
- async removeAllClips(recorderId, protect) {
22259
- const msg = sesame.v1.recorder.RecorderClipsClearRequest.create();
22260
- if (protect) msg.protectedRanges = protect;
22261
- await this.rpc.service.requestRecorderOperation({ recorderId, clearClips: msg });
22262
- }
22263
- async verifyClips(recorderId) {
22264
- var _a;
22265
- const msg = sesame.v1.recorder.RecorderClipsVerifyRequest.create();
22266
- const reply = await this.rpc.service.requestRecorderOperation({ recorderId, verifyClips: msg });
22267
- return ((_a = reply.verifyClipsResponse) == null ? void 0 : _a.errors) || [];
22268
- }
22269
- async setLockedDuration(frames) {
22270
- const msg = sesame.v1.recorder.RecorderLockedDurationSetRequest.create({ frames });
22271
- await this.rpc.service.requestRecorderOperation({ recorderId: "", setLockedDuration: msg });
22272
- }
22273
- async setMetadata(recorderId, metadata) {
22274
- const msg = sesame.v1.recorder.RecorderMetadataSetRequest.create({ metadata });
22275
- await this.rpc.service.requestRecorderOperation({ recorderId, setMetadata: msg });
22276
- }
22277
- async getClips(recorderId) {
22278
- const msg = sesame.v1.recorder.RecorderClipsGetRequest.create();
22279
- const reply = await this.rpc.service.requestRecorderOperation({ recorderId, getClips: msg });
22280
- if (reply.getClipsResponse && reply.getClipsResponse.clips) {
22281
- return reply.getClipsResponse.clips.map((c) => {
22282
- return {
22283
- id: Number(c.id),
22284
- startTime: Number(c.startTimeUs),
22285
- endTime: Number(c.endTimeUs),
22286
- lockedStart: Number(c.lockedStartUs),
22287
- lockedEnd: Number(c.lockedEndUs),
22288
- userTime: c.userTimeUs ? Number(c.userTimeUs) : void 0,
22289
- name: c.name ?? "",
22290
- userData: c.userData
22291
- };
22292
- });
22293
- } else {
22294
- throw new Error(`No clips returned: ${JSON.stringify(reply)}`);
22295
- }
22296
- }
22297
- async getImportClipStatus() {
22298
- const msg = sesame.v1.jobs.ImportListRequest.create();
22299
- return await this.rpc.service.requestClipImportList(msg);
22300
- }
22301
- async getExportPlaylistStatus() {
22302
- const msg = sesame.v1.jobs.ExportListRequest.create();
22303
- return await this.rpc.service.requestPlaylistExportList(msg);
22304
- }
22305
- async exportPlaylist(playlist, config) {
22306
- const msg = sesame.v1.jobs.ExportStartRequest.create();
22307
- if (!config.filename) throw new Error("Filename is required");
22308
- msg.config = {
22309
- ...config,
22310
- filename: config.filename,
22311
- videoCodec: config.videoCodec ?? sesame.v1.common.CodecId.CODEC_ID_H264,
22312
- videoBitrateKbps: config.videoBitrateKbps ?? 1024,
22313
- audioCodec: config.audioCodec ?? sesame.v1.jobs.AudioCodecId.AUDIO_CODEC_ID_AAC,
22314
- audioBitrateKbps: config.audioBitrateKbps ?? 128,
22315
- audioChannels: config.audioChannels ?? 4,
22316
- audioRouting: config.audioRouting ?? [0, 1, 2, 3]
22317
- };
22318
- msg.items = playlist.clips.map((clip) => ({
22319
- id: clip.id,
22320
- recorderId: clip.recorderId,
22321
- transitionTimeUs: (clip.transitionTime ?? 0) * 1e3,
22322
- transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
22323
- transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 },
22324
- speed: clip.speed ?? 1,
22325
- audioRouting: clip.audioRouting,
22326
- startTimeUs: clip.startTime,
22327
- endTimeUs: clip.endTime
22328
- }));
22329
- await this.rpc.service.requestPlaylistExportStart(msg);
22330
- }
22331
- async importClip(config) {
22332
- const msg = sesame.v1.jobs.ImportStartRequest.create();
22333
- msg.config = config;
22334
- const res = await this.rpc.service.requestClipImportStart(msg);
22335
- if (res.error) {
22336
- throw new Error(res.error);
22337
- } else {
22338
- return res;
22339
- }
22340
- }
22341
- async abortExportJob(jobId) {
22342
- const msg = { jobId };
22343
- return this.rpc.service.requestPlaylistExportAbort(msg);
22344
- }
22345
- async abortImportJob(jobId) {
22346
- const msg = { jobId };
22347
- return this.rpc.service.requestClipImportAbort(msg);
22348
- }
22349
22183
  disconnect() {
22350
- this.conn.removeAllListeners();
22351
22184
  this.conn.disconnect();
22352
22185
  }
22353
22186
  };
@@ -22360,16 +22193,20 @@ var Event = sesame.v1.rpc.Event;
22360
22193
  export {
22361
22194
  CodecType,
22362
22195
  CommandList,
22196
+ ConnectionState,
22363
22197
  EaseKind,
22364
22198
  Event,
22199
+ JobsApi,
22365
22200
  Message,
22366
22201
  PacketType,
22367
22202
  RPCClient,
22203
+ RecorderApi,
22368
22204
  Request,
22369
22205
  Response,
22370
22206
  SesameBinaryProtocol,
22371
22207
  SesameClient,
22372
22208
  SesameConnection,
22209
+ StatusApi,
22373
22210
  getLogger,
22374
22211
  log,
22375
22212
  sesame,