@moviie/player-sdk 0.6.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 +52 -1
- package/dist/index.d.ts +52 -1
- package/package.json +2 -2
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';
|
|
@@ -85,6 +109,20 @@ interface MoviieCTA {
|
|
|
85
109
|
size: 'sm' | 'md' | 'lg';
|
|
86
110
|
passUrlParams: boolean;
|
|
87
111
|
}
|
|
112
|
+
type DrmWatermarkStyle = {
|
|
113
|
+
fontFamily: 'Arial' | 'Inter' | 'Raleway' | 'Roboto' | 'Ubuntu';
|
|
114
|
+
/** Hex #RRGGBB. */
|
|
115
|
+
backgroundColor: string;
|
|
116
|
+
/** Hex #RRGGBB. */
|
|
117
|
+
textColor: string;
|
|
118
|
+
animationSpeed: 'slow' | 'normal' | 'fast';
|
|
119
|
+
};
|
|
120
|
+
interface DrmWatermark {
|
|
121
|
+
/** 1–3 sanitized viewer lines (top→bottom). Present only for a triggered playback. */
|
|
122
|
+
lines: string[];
|
|
123
|
+
/** Resolved style: per-video override → org default → built-in DS default. */
|
|
124
|
+
style: DrmWatermarkStyle;
|
|
125
|
+
}
|
|
88
126
|
interface MoviiePlaybackControls {
|
|
89
127
|
autoplay: boolean;
|
|
90
128
|
preload: boolean;
|
|
@@ -151,6 +189,12 @@ interface MoviiePlaybackData {
|
|
|
151
189
|
telemetry: {
|
|
152
190
|
bootstrapUrl: string;
|
|
153
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* Feature 196 — social DRM watermark. Present only for a triggered private
|
|
194
|
+
* playback (the token carried viewer `drm.lines`); omitted otherwise so the
|
|
195
|
+
* native player mounts no overlay.
|
|
196
|
+
*/
|
|
197
|
+
drm?: DrmWatermark;
|
|
154
198
|
/**
|
|
155
199
|
* Feature 185 — native pixel emission (Meta Conversions API only; the native
|
|
156
200
|
* player has no browser tags). Present only when a Meta pixel has the CAPI
|
|
@@ -164,6 +208,13 @@ interface MoviiePlaybackData {
|
|
|
164
208
|
/** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
|
|
165
209
|
pitchTimestamps?: number[];
|
|
166
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;
|
|
167
218
|
}
|
|
168
219
|
/** Minimal shape from GET /v1/videos/:id for embed_id resolution */
|
|
169
220
|
interface MoviieVideo {
|
|
@@ -372,4 +423,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
|
|
|
372
423
|
|
|
373
424
|
declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
|
|
374
425
|
|
|
375
|
-
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';
|
|
@@ -85,6 +109,20 @@ interface MoviieCTA {
|
|
|
85
109
|
size: 'sm' | 'md' | 'lg';
|
|
86
110
|
passUrlParams: boolean;
|
|
87
111
|
}
|
|
112
|
+
type DrmWatermarkStyle = {
|
|
113
|
+
fontFamily: 'Arial' | 'Inter' | 'Raleway' | 'Roboto' | 'Ubuntu';
|
|
114
|
+
/** Hex #RRGGBB. */
|
|
115
|
+
backgroundColor: string;
|
|
116
|
+
/** Hex #RRGGBB. */
|
|
117
|
+
textColor: string;
|
|
118
|
+
animationSpeed: 'slow' | 'normal' | 'fast';
|
|
119
|
+
};
|
|
120
|
+
interface DrmWatermark {
|
|
121
|
+
/** 1–3 sanitized viewer lines (top→bottom). Present only for a triggered playback. */
|
|
122
|
+
lines: string[];
|
|
123
|
+
/** Resolved style: per-video override → org default → built-in DS default. */
|
|
124
|
+
style: DrmWatermarkStyle;
|
|
125
|
+
}
|
|
88
126
|
interface MoviiePlaybackControls {
|
|
89
127
|
autoplay: boolean;
|
|
90
128
|
preload: boolean;
|
|
@@ -151,6 +189,12 @@ interface MoviiePlaybackData {
|
|
|
151
189
|
telemetry: {
|
|
152
190
|
bootstrapUrl: string;
|
|
153
191
|
};
|
|
192
|
+
/**
|
|
193
|
+
* Feature 196 — social DRM watermark. Present only for a triggered private
|
|
194
|
+
* playback (the token carried viewer `drm.lines`); omitted otherwise so the
|
|
195
|
+
* native player mounts no overlay.
|
|
196
|
+
*/
|
|
197
|
+
drm?: DrmWatermark;
|
|
154
198
|
/**
|
|
155
199
|
* Feature 185 — native pixel emission (Meta Conversions API only; the native
|
|
156
200
|
* player has no browser tags). Present only when a Meta pixel has the CAPI
|
|
@@ -164,6 +208,13 @@ interface MoviiePlaybackData {
|
|
|
164
208
|
/** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
|
|
165
209
|
pitchTimestamps?: number[];
|
|
166
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;
|
|
167
218
|
}
|
|
168
219
|
/** Minimal shape from GET /v1/videos/:id for embed_id resolution */
|
|
169
220
|
interface MoviieVideo {
|
|
@@ -372,4 +423,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
|
|
|
372
423
|
|
|
373
424
|
declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
|
|
374
425
|
|
|
375
|
-
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.
|
|
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.
|
|
44
|
+
"@moviie/player-types": "1.4.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^22.10.2",
|