recappi 0.1.38 → 0.1.39

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.js CHANGED
@@ -20478,7 +20478,7 @@ async function recordViaSidecar(opts) {
20478
20478
  source: session.source,
20479
20479
  sourceLabel: opts.includeSystemAudio === false ? "Microphone" : "System audio \xB7 all apps",
20480
20480
  micEnabled: opts.includeMicrophone !== false,
20481
- captionStreamEnabled: opts.live === true,
20481
+ captionStreamEnabled: session.captionStreamEnabled,
20482
20482
  renderApp: opts.runtime?.renderApp,
20483
20483
  now: opts.runtime?.now
20484
20484
  });
@@ -20517,7 +20517,7 @@ async function startLiveRecordSession(opts, selection = {
20517
20517
  });
20518
20518
  return {
20519
20519
  mode: "local",
20520
- captionStreamEnabled: true,
20520
+ captionStreamEnabled: session.captionStreamEnabled,
20521
20521
  source: session.source,
20522
20522
  stop: session.stop
20523
20523
  };
@@ -20609,13 +20609,14 @@ async function startRecordSessionOnce(opts) {
20609
20609
  capabilities: opts.live ? ["recording.capture", "recording.upload", "live_captions.stream"] : ["recording.capture", "recording.upload"]
20610
20610
  })
20611
20611
  );
20612
+ const captionStreamEnabled = opts.live === true && handshake.capabilities.includes("live_captions.stream");
20612
20613
  assertSidecarCapabilities(handshake, opts);
20613
20614
  const recordingOptions = {
20614
20615
  includeSystemAudio: opts.includeSystemAudio ?? true,
20615
20616
  includeMicrophone: opts.includeMicrophone ?? true,
20616
20617
  ...opts.targetBundleId ? { targetBundleId: opts.targetBundleId } : {},
20617
20618
  ...opts.microphoneDeviceId ? { microphoneDeviceId: opts.microphoneDeviceId } : {},
20618
- liveCaptions: opts.live === true,
20619
+ liveCaptions: captionStreamEnabled,
20619
20620
  ...opts.translationLanguage ? { translationLanguage: opts.translationLanguage } : {},
20620
20621
  ...opts.transcriptionLanguage ? { transcriptionLanguage: opts.transcriptionLanguage } : {},
20621
20622
  ...opts.title ? { title: opts.title } : {}
@@ -20630,6 +20631,7 @@ async function startRecordSessionOnce(opts) {
20630
20631
  latestState = started.state;
20631
20632
  localSessionRef = started.localSessionRef;
20632
20633
  return {
20634
+ captionStreamEnabled,
20633
20635
  source: sidecar.client,
20634
20636
  stop: () => {
20635
20637
  stopPromise ??= (async () => {
@@ -20644,7 +20646,7 @@ async function startRecordSessionOnce(opts) {
20644
20646
  return recordCommandDataSchema.parse({
20645
20647
  origin: account.backendOrigin,
20646
20648
  userId: account.userId,
20647
- live: opts.live === true,
20649
+ live: captionStreamEnabled,
20648
20650
  sessionId: stopped.sessionId,
20649
20651
  state: stopped.state,
20650
20652
  ...recordingId ? { recordingId } : {},
@@ -20730,7 +20732,7 @@ function assertSidecarCapabilities(handshake, opts) {
20730
20732
  const capabilities = new Set(handshake.capabilities);
20731
20733
  const missing = [];
20732
20734
  if (!capabilities.has("recording.capture")) missing.push("recording.capture");
20733
- if (opts.live && !capabilities.has("live_captions.stream")) {
20735
+ if (opts.requireLiveCaptions && !capabilities.has("live_captions.stream")) {
20734
20736
  missing.push("live_captions.stream");
20735
20737
  }
20736
20738
  if (missing.length === 0) return;
@@ -21224,6 +21226,7 @@ async function runCli(deps = {}) {
21224
21226
  sidecarCommand: parsed.sidecarCommand,
21225
21227
  renderLive: parsed.live === true && mode === "human" && isTTY,
21226
21228
  renderHero: parsed.live !== true && mode === "human" && isTTY,
21229
+ requireLiveCaptions: parsed.live === true,
21227
21230
  runtime: deps.recordRuntime
21228
21231
  });
21229
21232
  renderSuccess("record", data, render3);