@stinkycomputing/sesame-api-client 1.4.1-alpha.7 → 1.4.1-alpha.9

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/README.md CHANGED
@@ -30,11 +30,11 @@ const client = new SesameClient(8080);
30
30
 
31
31
  // Build command list
32
32
  const cl = new CommandList();
33
- cl.add_source('my-source', {
33
+ cl.sourceAdd('my-source', {
34
34
  type: 'file',
35
35
  path: '/path/to/video.mp4'
36
36
  });
37
- cl.add_compositor('main', 1920, 1080, false);
37
+ cl.compositorAdd('main', 1920, 1080, false);
38
38
 
39
39
  // Execute commands
40
40
  await client.execute(cl);
@@ -118,21 +118,21 @@ The `CommandList` class provides a fluent API for building command sequences:
118
118
  const cl = new CommandList();
119
119
 
120
120
  // Add source
121
- cl.add_source('cam1', {
121
+ cl.sourceAdd('cam1', {
122
122
  type: 'decklink',
123
123
  deviceIndex: 0
124
124
  });
125
125
 
126
126
  // Add compositor
127
- cl.add_compositor('main', 1920, 1080, false);
127
+ cl.compositorAdd('main', 1920, 1080, false);
128
128
 
129
129
  // Add node to compositor
130
- cl.add_node('main', 'cam1-node', 'source', {
130
+ cl.nodeAdd('main', 'cam1-node', 'source', {
131
131
  sourceId: 'cam1'
132
132
  });
133
133
 
134
134
  // Set properties
135
- cl.set_property(
135
+ cl.propertySet(
136
136
  { compositor: 'main', node: 'cam1-node' },
137
137
  'transform',
138
138
  'position',
@@ -140,7 +140,7 @@ cl.set_property(
140
140
  );
141
141
 
142
142
  // Transport control
143
- cl.add_transport_command('cam1', { type: 'play' });
143
+ cl.transportCommand('cam1', { type: 'play' });
144
144
 
145
145
  // Execute all commands
146
146
  await client.execute(cl);
@@ -155,7 +155,7 @@ import { CommandList, keyframe, EaseKind, sesame } from '@stinkycomputing/sesame
155
155
 
156
156
  const cl = new CommandList();
157
157
 
158
- cl.animate_property(
158
+ cl.propertyAnimate(
159
159
  { compositor: 'main', node: 'cam1-node' }, // property domain
160
160
  'cam1-node', // address
161
161
  'opacity', // property name
package/dist/browser.cjs CHANGED
@@ -8224,7 +8224,7 @@ var sesame = $root.sesame = (() => {
8224
8224
  RecorderClip.prototype.endTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8225
8225
  RecorderClip.prototype.lockedStartUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8226
8226
  RecorderClip.prototype.lockedEndUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8227
- RecorderClip.prototype.userTimeUs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8227
+ RecorderClip.prototype.userTimeMs = $util.Long ? $util.Long.fromBits(0, 0, false) : 0;
8228
8228
  RecorderClip.create = function create(properties) {
8229
8229
  return new RecorderClip(properties);
8230
8230
  };
@@ -8271,11 +8271,11 @@ var sesame = $root.sesame = (() => {
8271
8271
  /* id 8, wireType 0 =*/
8272
8272
  64
8273
8273
  ).int64(message.lockedEndUs);
8274
- if (message.userTimeUs != null && Object.hasOwnProperty.call(message, "userTimeUs"))
8274
+ if (message.userTimeMs != null && Object.hasOwnProperty.call(message, "userTimeMs"))
8275
8275
  writer.uint32(
8276
8276
  /* id 9, wireType 0 =*/
8277
8277
  72
8278
- ).int64(message.userTimeUs);
8278
+ ).int64(message.userTimeMs);
8279
8279
  return writer;
8280
8280
  };
8281
8281
  RecorderClip.encodeDelimited = function encodeDelimited(message, writer) {
@@ -8323,7 +8323,7 @@ var sesame = $root.sesame = (() => {
8323
8323
  break;
8324
8324
  }
8325
8325
  case 9: {
8326
- message.userTimeUs = reader.int64();
8326
+ message.userTimeMs = reader.int64();
8327
8327
  break;
8328
8328
  }
8329
8329
  default:
@@ -8373,9 +8373,9 @@ var sesame = $root.sesame = (() => {
8373
8373
  if (!$util.isInteger(message.lockedEndUs) && !(message.lockedEndUs && $util.isInteger(message.lockedEndUs.low) && $util.isInteger(message.lockedEndUs.high)))
8374
8374
  return "lockedEndUs: integer|Long expected";
8375
8375
  }
8376
- if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs")) {
8377
- if (!$util.isInteger(message.userTimeUs) && !(message.userTimeUs && $util.isInteger(message.userTimeUs.low) && $util.isInteger(message.userTimeUs.high)))
8378
- return "userTimeUs: integer|Long expected";
8376
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs")) {
8377
+ if (!$util.isInteger(message.userTimeMs) && !(message.userTimeMs && $util.isInteger(message.userTimeMs.low) && $util.isInteger(message.userTimeMs.high)))
8378
+ return "userTimeMs: integer|Long expected";
8379
8379
  }
8380
8380
  return null;
8381
8381
  };
@@ -8447,15 +8447,15 @@ var sesame = $root.sesame = (() => {
8447
8447
  else if (typeof object.lockedEndUs === "object")
8448
8448
  message.lockedEndUs = new $util.LongBits(object.lockedEndUs.low >>> 0, object.lockedEndUs.high >>> 0).toNumber();
8449
8449
  }
8450
- if (object.userTimeUs != null) {
8450
+ if (object.userTimeMs != null) {
8451
8451
  if ($util.Long)
8452
- (message.userTimeUs = $util.Long.fromValue(object.userTimeUs)).unsigned = false;
8453
- else if (typeof object.userTimeUs === "string")
8454
- message.userTimeUs = parseInt(object.userTimeUs, 10);
8455
- else if (typeof object.userTimeUs === "number")
8456
- message.userTimeUs = object.userTimeUs;
8457
- else if (typeof object.userTimeUs === "object")
8458
- message.userTimeUs = new $util.LongBits(object.userTimeUs.low >>> 0, object.userTimeUs.high >>> 0).toNumber();
8452
+ (message.userTimeMs = $util.Long.fromValue(object.userTimeMs)).unsigned = false;
8453
+ else if (typeof object.userTimeMs === "string")
8454
+ message.userTimeMs = parseInt(object.userTimeMs, 10);
8455
+ else if (typeof object.userTimeMs === "number")
8456
+ message.userTimeMs = object.userTimeMs;
8457
+ else if (typeof object.userTimeMs === "object")
8458
+ message.userTimeMs = new $util.LongBits(object.userTimeMs.low >>> 0, object.userTimeMs.high >>> 0).toNumber();
8459
8459
  }
8460
8460
  return message;
8461
8461
  };
@@ -8498,9 +8498,9 @@ var sesame = $root.sesame = (() => {
8498
8498
  object.lockedEndUs = options.longs === String ? "0" : 0;
8499
8499
  if ($util.Long) {
8500
8500
  let long = new $util.Long(0, 0, false);
8501
- object.userTimeUs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8501
+ object.userTimeMs = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
8502
8502
  } else
8503
- object.userTimeUs = options.longs === String ? "0" : 0;
8503
+ object.userTimeMs = options.longs === String ? "0" : 0;
8504
8504
  }
8505
8505
  if (message.id != null && message.hasOwnProperty("id"))
8506
8506
  if (typeof message.id === "number")
@@ -8536,11 +8536,11 @@ var sesame = $root.sesame = (() => {
8536
8536
  object.lockedEndUs = options.longs === String ? String(message.lockedEndUs) : message.lockedEndUs;
8537
8537
  else
8538
8538
  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;
8539
- if (message.userTimeUs != null && message.hasOwnProperty("userTimeUs"))
8540
- if (typeof message.userTimeUs === "number")
8541
- object.userTimeUs = options.longs === String ? String(message.userTimeUs) : message.userTimeUs;
8539
+ if (message.userTimeMs != null && message.hasOwnProperty("userTimeMs"))
8540
+ if (typeof message.userTimeMs === "number")
8541
+ object.userTimeMs = options.longs === String ? String(message.userTimeMs) : message.userTimeMs;
8542
8542
  else
8543
- 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;
8543
+ 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;
8544
8544
  return object;
8545
8545
  };
8546
8546
  RecorderClip.prototype.toJSON = function toJSON() {
@@ -21149,7 +21149,7 @@ var CommandList = class {
21149
21149
  this.cl.commandList.splice(this.cl.commandList.indexOf(item.del), 1);
21150
21150
  });
21151
21151
  }
21152
- get_command_list_msg() {
21152
+ getCommandListMsg() {
21153
21153
  return this.cl;
21154
21154
  }
21155
21155
  callback(event, data, timeOffsetMs) {
@@ -21157,32 +21157,32 @@ var CommandList = class {
21157
21157
  item.callback = { event, data };
21158
21158
  return this.add(item, timeOffsetMs);
21159
21159
  }
21160
- add_compositor(id, width, height, multisample, timeOffsetMs) {
21160
+ compositorAdd(id, width, height, multisample, timeOffsetMs) {
21161
21161
  let item = new sesame.v1.commands.CommandListItem();
21162
21162
  item.addCompositor = { id, multisample, width, height };
21163
21163
  return this.add(item, timeOffsetMs);
21164
21164
  }
21165
- remove_compositor(id, timeOffsetMs) {
21165
+ compositorRemove(id, timeOffsetMs) {
21166
21166
  let item = new sesame.v1.commands.CommandListItem();
21167
21167
  item.removeCompositor = { id };
21168
21168
  return this.add(item, timeOffsetMs);
21169
21169
  }
21170
- clear_compositor(id, timeOffsetMs) {
21170
+ compositorClear(id, timeOffsetMs) {
21171
21171
  let item = new sesame.v1.commands.CommandListItem();
21172
21172
  item.clearCompositor = { id };
21173
21173
  return this.add(item, timeOffsetMs);
21174
21174
  }
21175
- add_source(id, cfg, timeOffsetMs) {
21175
+ sourceAdd(id, cfg, timeOffsetMs) {
21176
21176
  let item = new sesame.v1.commands.CommandListItem();
21177
21177
  item.addSource = { id, config: cfg };
21178
21178
  return this.add(item, timeOffsetMs);
21179
21179
  }
21180
- remove_source(id, timeOffsetMs) {
21180
+ sourceRemove(id, timeOffsetMs) {
21181
21181
  let item = new sesame.v1.commands.CommandListItem();
21182
21182
  item.removeSource = { id };
21183
21183
  return this.add(item, timeOffsetMs);
21184
21184
  }
21185
- add_node(id, cfg, timeOffsetMs) {
21185
+ nodeAdd(id, cfg, timeOffsetMs) {
21186
21186
  let item = new sesame.v1.commands.CommandListItem();
21187
21187
  item.addNode = {
21188
21188
  compositorId: cfg.compositorId,
@@ -21192,12 +21192,12 @@ var CommandList = class {
21192
21192
  };
21193
21193
  return this.add(item, timeOffsetMs);
21194
21194
  }
21195
- remove_node(compositorId, address, timeOffsetMs) {
21195
+ nodeRemove(compositorId, address, timeOffsetMs) {
21196
21196
  let item = new sesame.v1.commands.CommandListItem();
21197
21197
  item.removeNode = { compositorId, address };
21198
21198
  return this.add(item, timeOffsetMs);
21199
21199
  }
21200
- set_property(propertyDomain, addr, prop, val, timeOffsetMs) {
21200
+ propertySet(propertyDomain, addr, prop, val, timeOffsetMs) {
21201
21201
  let item = new sesame.v1.commands.CommandListItem();
21202
21202
  item.setProperty = {
21203
21203
  address: addr,
@@ -21207,7 +21207,7 @@ var CommandList = class {
21207
21207
  };
21208
21208
  return this.add(item, timeOffsetMs);
21209
21209
  }
21210
- add_load_playlist_command(sourceId, playlist) {
21210
+ playlistLoad(sourceId, playlist) {
21211
21211
  const item = new sesame.v1.commands.CommandListItem();
21212
21212
  const loadPlaylistCmd = {
21213
21213
  items: playlist.clips.map((clip) => ({
@@ -21230,13 +21230,13 @@ var CommandList = class {
21230
21230
  item.loadPlaylist = loadPlaylistCmd;
21231
21231
  return this.add(item, 0);
21232
21232
  }
21233
- add_eject_playlist_command(sourceId) {
21233
+ playlistEject(sourceId) {
21234
21234
  const item = new sesame.v1.commands.CommandListItem();
21235
21235
  const ejectPlaylistCmd = { sourceId };
21236
21236
  item.ejectPlaylist = ejectPlaylistCmd;
21237
21237
  return this.add(item, 0);
21238
21238
  }
21239
- add_transport_command(id, msg, timeOffsetMs) {
21239
+ transportCommand(id, msg, timeOffsetMs) {
21240
21240
  let item = new sesame.v1.commands.CommandListItem();
21241
21241
  let transportCmd = { sourceId: id };
21242
21242
  let cmd;
@@ -21309,17 +21309,17 @@ var CommandList = class {
21309
21309
  item.updateSourceTransport = transportCmd;
21310
21310
  return this.add(item, timeOffsetMs, { transactionId: msg.transactionId, dependencies: [] });
21311
21311
  }
21312
- update_source(id, cfg, timeOffsetMs) {
21312
+ sourceUpdate(id, cfg, timeOffsetMs) {
21313
21313
  let item = new sesame.v1.commands.CommandListItem();
21314
21314
  item.updateSource = { id, config: cfg };
21315
21315
  return this.add(item, timeOffsetMs);
21316
21316
  }
21317
- update_source_metadata(id, metadata, timeOffsetMs) {
21317
+ sourceUpdateMetadata(id, metadata, timeOffsetMs) {
21318
21318
  let item = new sesame.v1.commands.CommandListItem();
21319
21319
  item.setSourceMetadata = { sourceId: id, metadata };
21320
21320
  return this.add(item, timeOffsetMs);
21321
21321
  }
21322
- update_source_transport(id, cfg, timeOffsetMs) {
21322
+ sourceUpdateTransport(id, cfg, timeOffsetMs) {
21323
21323
  let item = new sesame.v1.commands.CommandListItem();
21324
21324
  item.updateSourceTransport = {
21325
21325
  sourceId: id,
@@ -21328,47 +21328,47 @@ var CommandList = class {
21328
21328
  };
21329
21329
  return this.add(item, timeOffsetMs);
21330
21330
  }
21331
- add_output(id, cfg, timeOffsetMs) {
21331
+ outputAdd(id, cfg, timeOffsetMs) {
21332
21332
  let item = new sesame.v1.commands.CommandListItem();
21333
21333
  item.addOutput = { id, ...cfg };
21334
21334
  return this.add(item, timeOffsetMs);
21335
21335
  }
21336
- update_output(id, cfg, timeOffsetMs) {
21336
+ outputUpdate(id, cfg, timeOffsetMs) {
21337
21337
  let item = new sesame.v1.commands.CommandListItem();
21338
21338
  item.updateOutput = { id, ...cfg };
21339
21339
  return this.add(item, timeOffsetMs);
21340
21340
  }
21341
- remove_output(id, timeOffsetMs) {
21341
+ outputRemove(id, timeOffsetMs) {
21342
21342
  let item = new sesame.v1.commands.CommandListItem();
21343
21343
  item.removeOutput = { id };
21344
21344
  return this.add(item, timeOffsetMs);
21345
21345
  }
21346
- add_audio_mixer(id, cfg, timeOffsetMs) {
21346
+ audioMixerAdd(id, cfg, timeOffsetMs) {
21347
21347
  let item = new sesame.v1.commands.CommandListItem();
21348
21348
  item.addAudioMixer = { id, config: cfg };
21349
21349
  return this.add(item, timeOffsetMs);
21350
21350
  }
21351
- update_audio_mixer(id, cfg, timeOffsetMs) {
21351
+ audioMixerUpdate(id, cfg, timeOffsetMs) {
21352
21352
  let item = new sesame.v1.commands.CommandListItem();
21353
21353
  item.updateAudioMixer = { id, config: cfg };
21354
21354
  return this.add(item, timeOffsetMs);
21355
21355
  }
21356
- add_audio_mixer_channel(mixerId, cfg, timeOffsetMs) {
21356
+ audioMixerChannelAdd(mixerId, cfg, timeOffsetMs) {
21357
21357
  let item = new sesame.v1.commands.CommandListItem();
21358
21358
  item.addAudioChannel = { mixerId, channelConfig: cfg };
21359
21359
  return this.add(item, timeOffsetMs);
21360
21360
  }
21361
- remove_audio_mixer(mixerId, timeOffsetMs) {
21361
+ audioMixerRemove(mixerId, timeOffsetMs) {
21362
21362
  let item = new sesame.v1.commands.CommandListItem();
21363
21363
  item.removeAudioMixer = { id: mixerId };
21364
21364
  return this.add(item, timeOffsetMs);
21365
21365
  }
21366
- remove_audio_mixer_channel(mixerId, channelId, timeOffsetMs) {
21366
+ audioMixerChannelRemove(mixerId, channelId, timeOffsetMs) {
21367
21367
  let item = new sesame.v1.commands.CommandListItem();
21368
21368
  item.removeAudioChannel = { mixerId, channelId };
21369
21369
  return this.add(item, timeOffsetMs);
21370
21370
  }
21371
- animate_property(propertyDomain, addr, prop, before, after, keyframes, timeOffsetMs) {
21371
+ propertyAnimate(propertyDomain, addr, prop, before, after, keyframes, timeOffsetMs) {
21372
21372
  let item = new sesame.v1.commands.CommandListItem();
21373
21373
  item.animateProperty = {
21374
21374
  address: addr,