@mux/ai 0.48.0 → 0.50.0
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-DxAt9Jq8.d.ts → index-BotaPu5M.d.ts} +1 -1
- package/dist/{index-DAuzEXly.d.ts → index-nu1UOAMW.d.ts} +4 -2
- package/dist/index.d.ts +50 -7
- package/dist/index.js +127 -38
- package/dist/index.js.map +1 -1
- package/dist/primitives/index.d.ts +2 -2
- package/dist/primitives/index.js +12 -1
- package/dist/primitives/index.js.map +1 -1
- package/dist/{shots-BwpjZDpr.d.ts → shots-3wmvZnUV.d.ts} +11 -2
- package/dist/workflows/index.d.ts +2 -2
- package/dist/workflows/index.js +115 -14
- package/dist/workflows/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { D as DEFAULT_STORYBOARD_WIDTH, H as HeatmapOptions, a as HeatmapResponse, L as LOW_CONFIDENCE_THRESHOLD, M as MAX_CUE_TEXT_CHARS, T as ThumbnailOptions, b as TranscriptFetchOptions, c as TranscriptResult, V as VTTCue, d as VTTCueBudgetChunkingOptions, e as VTTDurationChunk, f as VTTDurationChunkingOptions, g as buildTranscriptUrl, h as buildVttFromCueBlocks, j as buildVttFromTranslatedCueBlocks, k as chunkByTokens, l as chunkText, m as chunkVTTCues, n as chunkVTTCuesByBudget, o as chunkVTTCuesByDuration, p as concatenateVttSegments, q as estimateTokenCount, r as extractTextFromVTT, s as extractTimestampedTranscript, t as fetchTranscriptForAsset, u as filterVttByScope, v as findCaptionTrack, w as getHeatmapForAsset, x as getHeatmapForPlaybackId, y as getHeatmapForVideo, z as getReadyTextTracks, A as getReliableLanguageCode, B as getStoryboardUrl, C as getThumbnailUrls, E as parseVTTCues, F as replaceCueText, G as sanitizeUntrustedText, I as secondsToTimestamp, J as splitVttPreambleAndCueBlocks, K as stripVttMetadataBlocks, N as vttTimestampToSeconds } from '../index-
|
|
2
|
-
export { q as CompletedShotsResult, r as ErroredShotsResult, H as Hotspot, s as HotspotOptions, t as HotspotResponse, u as PendingShotsResult, v as Shot, w as ShotRequestOptions, x as ShotsResult, y as
|
|
1
|
+
export { D as DEFAULT_STORYBOARD_WIDTH, H as HeatmapOptions, a as HeatmapResponse, L as LOW_CONFIDENCE_THRESHOLD, M as MAX_CUE_TEXT_CHARS, T as ThumbnailOptions, b as TranscriptFetchOptions, c as TranscriptResult, V as VTTCue, d as VTTCueBudgetChunkingOptions, e as VTTDurationChunk, f as VTTDurationChunkingOptions, g as buildTranscriptUrl, h as buildVttFromCueBlocks, j as buildVttFromTranslatedCueBlocks, k as chunkByTokens, l as chunkText, m as chunkVTTCues, n as chunkVTTCuesByBudget, o as chunkVTTCuesByDuration, p as concatenateVttSegments, q as estimateTokenCount, r as extractTextFromVTT, s as extractTimestampedTranscript, t as fetchTranscriptForAsset, u as filterVttByScope, v as findCaptionTrack, w as getHeatmapForAsset, x as getHeatmapForPlaybackId, y as getHeatmapForVideo, z as getReadyTextTracks, A as getReliableLanguageCode, B as getStoryboardUrl, C as getThumbnailUrls, E as parseVTTCues, F as replaceCueText, G as sanitizeUntrustedText, I as secondsToTimestamp, J as splitVttPreambleAndCueBlocks, K as stripVttMetadataBlocks, N as vttTimestampToSeconds } from '../index-nu1UOAMW.js';
|
|
2
|
+
export { q as CompletedShotsResult, D as DeletedShotsResult, r as ErroredShotsResult, H as Hotspot, s as HotspotOptions, t as HotspotResponse, u as PendingShotsResult, v as Shot, w as ShotRequestOptions, x as ShotsResult, y as SkippedShotsResult, z as WaitForShotsOptions, B as getHotspotsForAsset, F as getHotspotsForPlaybackId, G as getHotspotsForVideo, J as getShotsForAsset, K as requestShotsForAsset, L as waitForShotsForAsset } from '../shots-3wmvZnUV.js';
|
|
3
3
|
import '@mux/ts';
|
package/dist/primitives/index.js
CHANGED
|
@@ -1011,8 +1011,10 @@ async function fetchShotsFromManifest(shotsManifestUrl) {
|
|
|
1011
1011
|
async function transformShotsResponse(data) {
|
|
1012
1012
|
switch (data.status) {
|
|
1013
1013
|
case "pending":
|
|
1014
|
+
case "skipped":
|
|
1015
|
+
case "deleted":
|
|
1014
1016
|
return {
|
|
1015
|
-
status:
|
|
1017
|
+
status: data.status,
|
|
1016
1018
|
createdAt: data.created_at
|
|
1017
1019
|
};
|
|
1018
1020
|
case "errored":
|
|
@@ -1099,6 +1101,15 @@ async function waitForShotsForAsset(assetId, options = {}) {
|
|
|
1099
1101
|
if (result.status === "errored") {
|
|
1100
1102
|
throw new MuxAiError(`Shot generation failed for asset ${assetId}.`);
|
|
1101
1103
|
}
|
|
1104
|
+
if (result.status === "skipped") {
|
|
1105
|
+
throw new MuxAiError(
|
|
1106
|
+
`Shot generation was skipped for asset ${assetId}; the asset may have no video track.`,
|
|
1107
|
+
{ type: "validation_error" }
|
|
1108
|
+
);
|
|
1109
|
+
}
|
|
1110
|
+
if (result.status === "deleted") {
|
|
1111
|
+
throw new MuxAiError(`Shots for asset ${assetId} have been deleted.`, { type: "validation_error" });
|
|
1112
|
+
}
|
|
1102
1113
|
if (attempt < normalizedMaxAttempts - 1) {
|
|
1103
1114
|
await sleep(normalizedPollIntervalMs);
|
|
1104
1115
|
}
|