@moviie/player-sdk 0.7.0 → 0.8.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.d.cts CHANGED
@@ -50,6 +50,30 @@ declare function createTranscriptSearchController(opts: {
50
50
  minLength?: number;
51
51
  }): TranscriptSearchController;
52
52
 
53
+ /**
54
+ * AI video summary shapes (feature 189) — the sanitized, player-ready summary
55
+ * delivered to native/SDK consumers in the playback payload. The server renders
56
+ * the stored Markdown to safe HTML before it reaches the client (the embed and
57
+ * native players never parse Markdown themselves); `html`/`tldrHtml` are already
58
+ * sanitized. Section timestamps drive seek-on-tap.
59
+ */
60
+ interface VideoSummarySection {
61
+ /** 0-based, contiguous per-minute index. */
62
+ index: number;
63
+ /** Window start in seconds — the seek target when the viewer taps the section. */
64
+ startSeconds: number;
65
+ /** Pre-formatted clock label, e.g. `"00:00–01:00"`. */
66
+ label: string;
67
+ /** Sanitized HTML for this minute's prose. */
68
+ html: string;
69
+ }
70
+ interface VideoSummaryDocument {
71
+ /** Sanitized HTML for the overall TL;DR shown at the top of the panel. */
72
+ tldrHtml: string;
73
+ /** Per-minute sections covering the whole video, in order. */
74
+ sections: VideoSummarySection[];
75
+ }
76
+
53
77
  interface MoviieClientInfo {
54
78
  bundleId?: string;
55
79
  platform: 'ios' | 'android' | 'web';
@@ -184,6 +208,13 @@ interface MoviiePlaybackData {
184
208
  /** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
185
209
  pitchTimestamps?: number[];
186
210
  };
211
+ /**
212
+ * Feature 189 — AI video summary (TL;DR + per-minute sections), already
213
+ * sanitized server-side. Present only when a summary exists AND display
214
+ * resolves as enabled (org→video override); absent otherwise, so the native
215
+ * AI-menu trigger stays hidden. Mirrors the web embed's gated inline panel.
216
+ */
217
+ summary?: VideoSummaryDocument;
187
218
  }
188
219
  /** Minimal shape from GET /v1/videos/:id for embed_id resolution */
189
220
  interface MoviieVideo {
@@ -392,4 +423,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
392
423
 
393
424
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
394
425
 
395
- export { HEARTBEAT_CONFIG, MOVIIE_CDN_BASE, MOVIIE_DEFAULT_API_BASE_URL, MOVIIE_TELEMETRY_API_PATH_PREFIX, MOVIIE_WATCH_BASE, MemoryViewerTokenStore, MoviieAuthError, MoviieBundleBlockedError, type MoviieCTA, type MoviieCaption, type MoviieChapter, MoviieClient, type MoviieClientInfo, MoviieDirectAccessBlockedError, type MoviieEndpointsConfiguration, type MoviieErrorCode, MoviieNetworkError, MoviieNotFoundError, type MoviiePlaybackControls, type MoviiePlaybackData, MoviieRateLimitError, MoviieReferrerBlockedError, MoviieSubscriptionInactiveError, type MoviieVariant, type MoviieVideo, PLAYBACK_EVENT_TYPE, SDK_PLAYBACK_AUTH_ERROR_MESSAGE, SDK_PUBLIC_API_KEY_PREFIX_PUBLISHABLE, TELEMETRY_TOKEN_CONFIG, TRANSCRIPT_SEARCH_DEBOUNCE_MS, TRANSCRIPT_SEARCH_MIN_LENGTH, TelemetryClient, type TranscriptSearchController, type TranscriptSearchMatch, type TranscriptSearchResult, type ViewerTokenStore, buildClientHeaders, configureMoviieEndpoints, createTranscriptSearchController, deriveMoviieTelemetryBaseUrlFromApiBaseUrl, deriveTelemetryEventsBaseUrlFromBootstrapUrl, fetchPlaybackData, fetchTranscriptSearch, getMoviieApiBaseUrl, getMoviieEventsBaseUrl, planRefresh, resetMoviieEndpointsConfiguration };
426
+ export { HEARTBEAT_CONFIG, MOVIIE_CDN_BASE, MOVIIE_DEFAULT_API_BASE_URL, MOVIIE_TELEMETRY_API_PATH_PREFIX, MOVIIE_WATCH_BASE, MemoryViewerTokenStore, MoviieAuthError, MoviieBundleBlockedError, type MoviieCTA, type MoviieCaption, type MoviieChapter, MoviieClient, type MoviieClientInfo, MoviieDirectAccessBlockedError, type MoviieEndpointsConfiguration, type MoviieErrorCode, MoviieNetworkError, MoviieNotFoundError, type MoviiePlaybackControls, type MoviiePlaybackData, MoviieRateLimitError, MoviieReferrerBlockedError, MoviieSubscriptionInactiveError, type MoviieVariant, type MoviieVideo, PLAYBACK_EVENT_TYPE, SDK_PLAYBACK_AUTH_ERROR_MESSAGE, SDK_PUBLIC_API_KEY_PREFIX_PUBLISHABLE, TELEMETRY_TOKEN_CONFIG, TRANSCRIPT_SEARCH_DEBOUNCE_MS, TRANSCRIPT_SEARCH_MIN_LENGTH, TelemetryClient, type TranscriptSearchController, type TranscriptSearchMatch, type TranscriptSearchResult, type VideoSummaryDocument, type VideoSummarySection, type ViewerTokenStore, buildClientHeaders, configureMoviieEndpoints, createTranscriptSearchController, deriveMoviieTelemetryBaseUrlFromApiBaseUrl, deriveTelemetryEventsBaseUrlFromBootstrapUrl, fetchPlaybackData, fetchTranscriptSearch, getMoviieApiBaseUrl, getMoviieEventsBaseUrl, planRefresh, resetMoviieEndpointsConfiguration };
package/dist/index.d.ts CHANGED
@@ -50,6 +50,30 @@ declare function createTranscriptSearchController(opts: {
50
50
  minLength?: number;
51
51
  }): TranscriptSearchController;
52
52
 
53
+ /**
54
+ * AI video summary shapes (feature 189) — the sanitized, player-ready summary
55
+ * delivered to native/SDK consumers in the playback payload. The server renders
56
+ * the stored Markdown to safe HTML before it reaches the client (the embed and
57
+ * native players never parse Markdown themselves); `html`/`tldrHtml` are already
58
+ * sanitized. Section timestamps drive seek-on-tap.
59
+ */
60
+ interface VideoSummarySection {
61
+ /** 0-based, contiguous per-minute index. */
62
+ index: number;
63
+ /** Window start in seconds — the seek target when the viewer taps the section. */
64
+ startSeconds: number;
65
+ /** Pre-formatted clock label, e.g. `"00:00–01:00"`. */
66
+ label: string;
67
+ /** Sanitized HTML for this minute's prose. */
68
+ html: string;
69
+ }
70
+ interface VideoSummaryDocument {
71
+ /** Sanitized HTML for the overall TL;DR shown at the top of the panel. */
72
+ tldrHtml: string;
73
+ /** Per-minute sections covering the whole video, in order. */
74
+ sections: VideoSummarySection[];
75
+ }
76
+
53
77
  interface MoviieClientInfo {
54
78
  bundleId?: string;
55
79
  platform: 'ios' | 'android' | 'web';
@@ -184,6 +208,13 @@ interface MoviiePlaybackData {
184
208
  /** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
185
209
  pitchTimestamps?: number[];
186
210
  };
211
+ /**
212
+ * Feature 189 — AI video summary (TL;DR + per-minute sections), already
213
+ * sanitized server-side. Present only when a summary exists AND display
214
+ * resolves as enabled (org→video override); absent otherwise, so the native
215
+ * AI-menu trigger stays hidden. Mirrors the web embed's gated inline panel.
216
+ */
217
+ summary?: VideoSummaryDocument;
187
218
  }
188
219
  /** Minimal shape from GET /v1/videos/:id for embed_id resolution */
189
220
  interface MoviieVideo {
@@ -392,4 +423,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
392
423
 
393
424
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
394
425
 
395
- export { HEARTBEAT_CONFIG, MOVIIE_CDN_BASE, MOVIIE_DEFAULT_API_BASE_URL, MOVIIE_TELEMETRY_API_PATH_PREFIX, MOVIIE_WATCH_BASE, MemoryViewerTokenStore, MoviieAuthError, MoviieBundleBlockedError, type MoviieCTA, type MoviieCaption, type MoviieChapter, MoviieClient, type MoviieClientInfo, MoviieDirectAccessBlockedError, type MoviieEndpointsConfiguration, type MoviieErrorCode, MoviieNetworkError, MoviieNotFoundError, type MoviiePlaybackControls, type MoviiePlaybackData, MoviieRateLimitError, MoviieReferrerBlockedError, MoviieSubscriptionInactiveError, type MoviieVariant, type MoviieVideo, PLAYBACK_EVENT_TYPE, SDK_PLAYBACK_AUTH_ERROR_MESSAGE, SDK_PUBLIC_API_KEY_PREFIX_PUBLISHABLE, TELEMETRY_TOKEN_CONFIG, TRANSCRIPT_SEARCH_DEBOUNCE_MS, TRANSCRIPT_SEARCH_MIN_LENGTH, TelemetryClient, type TranscriptSearchController, type TranscriptSearchMatch, type TranscriptSearchResult, type ViewerTokenStore, buildClientHeaders, configureMoviieEndpoints, createTranscriptSearchController, deriveMoviieTelemetryBaseUrlFromApiBaseUrl, deriveTelemetryEventsBaseUrlFromBootstrapUrl, fetchPlaybackData, fetchTranscriptSearch, getMoviieApiBaseUrl, getMoviieEventsBaseUrl, planRefresh, resetMoviieEndpointsConfiguration };
426
+ export { HEARTBEAT_CONFIG, MOVIIE_CDN_BASE, MOVIIE_DEFAULT_API_BASE_URL, MOVIIE_TELEMETRY_API_PATH_PREFIX, MOVIIE_WATCH_BASE, MemoryViewerTokenStore, MoviieAuthError, MoviieBundleBlockedError, type MoviieCTA, type MoviieCaption, type MoviieChapter, MoviieClient, type MoviieClientInfo, MoviieDirectAccessBlockedError, type MoviieEndpointsConfiguration, type MoviieErrorCode, MoviieNetworkError, MoviieNotFoundError, type MoviiePlaybackControls, type MoviiePlaybackData, MoviieRateLimitError, MoviieReferrerBlockedError, MoviieSubscriptionInactiveError, type MoviieVariant, type MoviieVideo, PLAYBACK_EVENT_TYPE, SDK_PLAYBACK_AUTH_ERROR_MESSAGE, SDK_PUBLIC_API_KEY_PREFIX_PUBLISHABLE, TELEMETRY_TOKEN_CONFIG, TRANSCRIPT_SEARCH_DEBOUNCE_MS, TRANSCRIPT_SEARCH_MIN_LENGTH, TelemetryClient, type TranscriptSearchController, type TranscriptSearchMatch, type TranscriptSearchResult, type VideoSummaryDocument, type VideoSummarySection, type ViewerTokenStore, buildClientHeaders, configureMoviieEndpoints, createTranscriptSearchController, deriveMoviieTelemetryBaseUrlFromApiBaseUrl, deriveTelemetryEventsBaseUrlFromBootstrapUrl, fetchPlaybackData, fetchTranscriptSearch, getMoviieApiBaseUrl, getMoviieEventsBaseUrl, planRefresh, resetMoviieEndpointsConfiguration };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moviie/player-sdk",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "private": false,
5
5
  "description": "Vendor-agnostic Moviie player SDK — playback metadata, HTTP client, telemetry.",
6
6
  "keywords": [
@@ -41,7 +41,7 @@
41
41
  ],
42
42
  "dependencies": {
43
43
  "zod": "^3.25.76",
44
- "@moviie/player-types": "1.3.0"
44
+ "@moviie/player-types": "1.4.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^22.10.2",