@mux/ai 0.13.0 → 0.13.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/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ import '@ai-sdk/anthropic';
9
9
  import '@ai-sdk/google';
10
10
  import '@ai-sdk/openai';
11
11
 
12
- var version = "0.13.0";
12
+ var version = "0.13.1";
13
13
 
14
14
  /**
15
15
  * A function that returns workflow credentials, either synchronously or asynchronously.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // package.json
8
- var version = "0.13.0";
8
+ var version = "0.13.1";
9
9
 
10
10
  // src/env.ts
11
11
  import { z } from "zod";
@@ -4079,9 +4079,14 @@ async function generateEngagementInsights(assetId, options = {}) {
4079
4079
  }
4080
4080
  const { hotspots, heatmap } = engagementResult.value;
4081
4081
  if (hotspots.length === 0) {
4082
- throw new Error(
4083
- `No engagement data available for asset ${assetId} in timeframe ${timeframe}. Video may not have been viewed yet or engagement tracking is not enabled.`
4084
- );
4082
+ return {
4083
+ assetId,
4084
+ momentInsights: [],
4085
+ overallInsight: {
4086
+ summary: `No engagement data available for asset ${assetId} in timeframe ${timeframe}. Video may not have been viewed yet, not contain notable engagement patterns, or engagement tracking is not enabled.`,
4087
+ trends: []
4088
+ }
4089
+ };
4085
4090
  }
4086
4091
  let transcriptText = "";
4087
4092
  if (transcriptResult.status === "fulfilled") {