@stinkycomputing/sesame-api-client 1.4.0 → 1.4.1-alpha.1

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
@@ -146,6 +146,35 @@ cl.add_transport_command('cam1', { type: 'play' });
146
146
  await client.execute(cl);
147
147
  ```
148
148
 
149
+ ### Animations
150
+
151
+ Use the `keyframe()` helper to build type-safe animation keyframes. The easing parameters are constrained to the `EaseKind` enum, so invalid values are caught at compile time:
152
+
153
+ ```typescript
154
+ import { CommandList, keyframe, EaseKind, sesame } from '@stinkycomputing/sesame-api-client';
155
+
156
+ const cl = new CommandList();
157
+
158
+ cl.animate_property(
159
+ { compositor: 'main', node: 'cam1-node' }, // property domain
160
+ 'cam1-node', // address
161
+ 'opacity', // property name
162
+ sesame.v1.compositor.AnimationChannelEvaluationMode.HOLD, // before
163
+ sesame.v1.compositor.AnimationChannelEvaluationMode.HOLD, // after
164
+ [
165
+ keyframe(0, { floatValue: 0.0 }),
166
+ keyframe(500000, { floatValue: 1.0 }, EaseKind.QUADRATIC_INOUT),
167
+ keyframe(1000000, { floatValue: 0.5 }, EaseKind.CUBIC_IN, EaseKind.CUBIC_OUT),
168
+ ]
169
+ );
170
+ ```
171
+
172
+ The `keyframe(timeUs, value, easingIn?, easingOut?)` parameters:
173
+ - **timeUs** — time in microseconds
174
+ - **value** — a `PropValue` (`floatValue`, `intValue`, `vec4Value`, `stringValue`, or `boolValue`)
175
+ - **easingIn** *(optional)* — easing curve entering this keyframe (`EaseKind`)
176
+ - **easingOut** *(optional)* — easing curve leaving this keyframe (`EaseKind`)
177
+
149
178
  ## Deployment Notes
150
179
 
151
180
  When using this package in a bundled application (e.g., with esbuild):
@@ -160,6 +189,24 @@ This approach gives you:
160
189
  - ✅ Fast deployment
161
190
  - ✅ No version conflicts
162
191
 
192
+ ## Publishing
193
+
194
+ The package is published manually to npm from a local machine.
195
+
196
+ ### Prerequisites (one-time setup)
197
+
198
+ 1. Create the `@stinkycomputing` organization on [npmjs.com](https://www.npmjs.com/org/create)
199
+ 2. Log in to npm: `npm login`
200
+
201
+ ### Release process
202
+
203
+ 1. Update the version in `package.json`
204
+ 2. Build: `npm run build`
205
+ 3. Publish:
206
+ - **Stable release:** `npm publish --access public`
207
+ - **Prerelease:** `npm publish --access public --tag alpha` (or `beta`, etc.)
208
+ 4. Commit and tag: `git tag api-client-vX.Y.Z && git push origin api-client-vX.Y.Z`
209
+
163
210
  ## License
164
211
 
165
212
  MIT
package/dist/browser.cjs CHANGED
@@ -21334,7 +21334,8 @@ var CommandList = class {
21334
21334
  encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21335
21335
  filename: cfg.recorderConfig.filename,
21336
21336
  sizeGb: cfg.recorderConfig.sizeGb,
21337
- groupId: cfg.recorderConfig.groupId
21337
+ groupId: cfg.recorderConfig.groupId,
21338
+ recorderType: cfg.recorderConfig.type
21338
21339
  };
21339
21340
  break;
21340
21341
  case sesame.v1.outputs.OutputType.OUTPUT_TYPE_ENCODED_SUPER_SLOWMO_RECORDER:
@@ -21344,7 +21345,8 @@ var CommandList = class {
21344
21345
  encoded: this.buildOutputEncodedConfig(cfg.encodedConfig),
21345
21346
  filename: cfg.recorderConfig.filename,
21346
21347
  sizeGb: cfg.recorderConfig.sizeGb,
21347
- groupId: cfg.recorderConfig.groupId
21348
+ groupId: cfg.recorderConfig.groupId,
21349
+ recorderType: cfg.recorderConfig.type
21348
21350
  };
21349
21351
  break;
21350
21352
  case sesame.v1.outputs.OutputType.OUTPUT_TYPE_SYSTEM_AUDIO:
@@ -21442,10 +21444,10 @@ var CommandList = class {
21442
21444
  transitionTimeUs: (clip.transitionTime || 0) * 1e3,
21443
21445
  speed: clip.speed || 1,
21444
21446
  audioRouting: clip.audioRouting,
21445
- startTimeUs: void 0,
21446
- endTimeUs: void 0,
21447
- transitionType: sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
21448
- transitionFadeColor: { x: 0, y: 0, z: 0, w: 0 }
21447
+ startTimeUs: clip.startTime,
21448
+ endTimeUs: clip.endTime,
21449
+ transitionType: clip.transitionType ?? sesame.v1.recorder.TransitionType.TRANSITION_TYPE_MIX,
21450
+ transitionFadeColor: clip.transitionFadeColor ?? { x: 0, y: 0, z: 0, w: 0 }
21449
21451
  })),
21450
21452
  sourceId,
21451
21453
  userPlaylistId: playlist.id,
@@ -21494,6 +21496,29 @@ var CommandList = class {
21494
21496
  case "set_recorder":
21495
21497
  cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_MONITOR;
21496
21498
  break;
21499
+ case "take":
21500
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_TAKE;
21501
+ break;
21502
+ case "pre_roll":
21503
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_PRE_ROLL;
21504
+ break;
21505
+ case "post_roll":
21506
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_POST_ROLL;
21507
+ break;
21508
+ case "next_playlist_clip":
21509
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_NEXT;
21510
+ break;
21511
+ case "skip_next_playlist_clip":
21512
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_SKIP_NEXT;
21513
+ break;
21514
+ case "transitions_disabled":
21515
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_TRANSITIONS_DISABLED;
21516
+ useIntValue = true;
21517
+ break;
21518
+ case "set_scrubbing":
21519
+ cmd = sesame.v1.sources.SourceTransportCommandType.SOURCE_TRANSPORT_CMD_SET_SCRUBBING;
21520
+ useIntValue = true;
21521
+ break;
21497
21522
  default:
21498
21523
  throw new Error("Unknown transport command type: " + msg.type);
21499
21524
  }