@stinkycomputing/sesame-api-client 1.4.1-alpha.0 → 1.4.1-alpha.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
@@ -21272,6 +21272,7 @@ var CommandList = class {
21272
21272
  };
21273
21273
  }
21274
21274
  buildOutputConfig(id, cfg) {
21275
+ var _a, _b;
21275
21276
  const outputConfig = {
21276
21277
  id,
21277
21278
  audioMixIds: cfg.audioMixIds,
@@ -21290,17 +21291,21 @@ var CommandList = class {
21290
21291
  encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21291
21292
  filename: cfg.recorderConfig.filename,
21292
21293
  sizeGb: cfg.recorderConfig.sizeGb,
21293
- groupId: cfg.recorderConfig.groupId
21294
+ groupId: cfg.recorderConfig.groupId,
21295
+ recorderType: cfg.recorderConfig.recorderType
21294
21296
  };
21295
21297
  break;
21296
21298
  case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SUPER_SLOWMO_RECORDER:
21297
- if (cfg.recorderConfig == null) throw new Error("No recorder config found");
21299
+ if (cfg.superSlowmoRecorderConfig == null) throw new Error("No super slowmo recorder config found");
21298
21300
  if (cfg.encodedConfig == null) throw new Error("No output config found");
21299
21301
  outputConfig.superSlowmoRecorder = {
21300
21302
  encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21301
- filename: cfg.recorderConfig.filename,
21302
- sizeGb: cfg.recorderConfig.sizeGb,
21303
- groupId: cfg.recorderConfig.groupId
21303
+ filename: cfg.superSlowmoRecorderConfig.filename,
21304
+ sizeGb: cfg.superSlowmoRecorderConfig.sizeGb,
21305
+ groupId: cfg.superSlowmoRecorderConfig.groupId,
21306
+ recorderType: cfg.superSlowmoRecorderConfig.recorderType,
21307
+ compositionIds: ((_a = cfg.superSlowmoRecorderConfig) == null ? void 0 : _a.compositionIds) || [],
21308
+ sourceIds: ((_b = cfg.superSlowmoRecorderConfig) == null ? void 0 : _b.sourceIds) || []
21304
21309
  };
21305
21310
  break;
21306
21311
  case sesame.v1.outputs.OutputType.OUTPUT_TYPE_SYSTEM_AUDIO:
@@ -22067,11 +22072,12 @@ var SesameConnection = class extends EventEmitter2 {
22067
22072
  if (!this.socket) {
22068
22073
  return;
22069
22074
  }
22070
- if (this.socket.readyState !== WebSocket2.CLOSED) {
22071
- this.socket.close();
22075
+ const sock = this.socket;
22076
+ if (sock.readyState !== WebSocket2.CLOSED) {
22077
+ sock.close();
22072
22078
  await waitForEvent(this, "close");
22073
22079
  }
22074
- this.socket.removeAllListeners();
22080
+ sock.removeAllListeners();
22075
22081
  }
22076
22082
  retryHandler() {
22077
22083
  if (this.active && this.autoReconnect) {
@@ -22080,6 +22086,9 @@ var SesameConnection = class extends EventEmitter2 {
22080
22086
  }
22081
22087
  closeHandler() {
22082
22088
  this.emit("close");
22089
+ if (this.socket) {
22090
+ this.socket.removeAllListeners();
22091
+ }
22083
22092
  this.socket = void 0;
22084
22093
  if (this.active) {
22085
22094
  try {
@@ -22347,7 +22356,6 @@ var SesameClient = class extends EventEmitter3 {
22347
22356
  return this.rpc.service.requestClipImportAbort(msg);
22348
22357
  }
22349
22358
  disconnect() {
22350
- this.conn.removeAllListeners();
22351
22359
  this.conn.disconnect();
22352
22360
  }
22353
22361
  };