@moviie/player-sdk 0.5.0 → 0.7.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
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export { PLAYER_API_EVENTS, PlayerAPIEvent, PlayerState } from '@moviie/player-types';
2
+ export { PLAYER_API_EVENTS, PlayerAPIEvent, PlayerState, PlayerVariant } from '@moviie/player-types';
3
3
 
4
4
  /** A single moment in the video where the term occurs. */
5
5
  interface TranscriptSearchMatch {
@@ -85,6 +85,20 @@ interface MoviieCTA {
85
85
  size: 'sm' | 'md' | 'lg';
86
86
  passUrlParams: boolean;
87
87
  }
88
+ type DrmWatermarkStyle = {
89
+ fontFamily: 'Arial' | 'Inter' | 'Raleway' | 'Roboto' | 'Ubuntu';
90
+ /** Hex #RRGGBB. */
91
+ backgroundColor: string;
92
+ /** Hex #RRGGBB. */
93
+ textColor: string;
94
+ animationSpeed: 'slow' | 'normal' | 'fast';
95
+ };
96
+ interface DrmWatermark {
97
+ /** 1–3 sanitized viewer lines (top→bottom). Present only for a triggered playback. */
98
+ lines: string[];
99
+ /** Resolved style: per-video override → org default → built-in DS default. */
100
+ style: DrmWatermarkStyle;
101
+ }
88
102
  interface MoviiePlaybackControls {
89
103
  autoplay: boolean;
90
104
  preload: boolean;
@@ -110,6 +124,19 @@ interface MoviiePlaybackControls {
110
124
  showChapters: boolean;
111
125
  turboStartEnabled: boolean;
112
126
  }
127
+ /**
128
+ * Feature 190 — an alternate playback version of a video (e.g. the condensed
129
+ * "Versão Express"). Native clients switch playback to `uri`, reusing the main
130
+ * playback request headers for private HLS.
131
+ */
132
+ interface MoviieVariant {
133
+ id: string;
134
+ kind: string;
135
+ label: string;
136
+ durationSeconds: number;
137
+ uri: string;
138
+ contentType: 'hls';
139
+ }
113
140
  interface MoviiePlaybackData {
114
141
  embedId: string;
115
142
  title: string;
@@ -122,6 +149,8 @@ interface MoviiePlaybackData {
122
149
  /** Pixel height from ingest metadata when known (positive integers only). */
123
150
  videoHeightPx: number | null;
124
151
  profile: string;
152
+ /** Feature 190 — alternate playback versions (e.g. the condensed "Versão Express"). */
153
+ variants?: MoviieVariant[];
125
154
  playback: MoviiePlaybackPayload;
126
155
  posterUrl: string | null;
127
156
  branding: {
@@ -136,6 +165,12 @@ interface MoviiePlaybackData {
136
165
  telemetry: {
137
166
  bootstrapUrl: string;
138
167
  };
168
+ /**
169
+ * Feature 196 — social DRM watermark. Present only for a triggered private
170
+ * playback (the token carried viewer `drm.lines`); omitted otherwise so the
171
+ * native player mounts no overlay.
172
+ */
173
+ drm?: DrmWatermark;
139
174
  /**
140
175
  * Feature 185 — native pixel emission (Meta Conversions API only; the native
141
176
  * player has no browser tags). Present only when a Meta pixel has the CAPI
@@ -357,4 +392,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
357
392
 
358
393
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
359
394
 
360
- 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 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 };
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 };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export { PLAYER_API_EVENTS, PlayerAPIEvent, PlayerState } from '@moviie/player-types';
2
+ export { PLAYER_API_EVENTS, PlayerAPIEvent, PlayerState, PlayerVariant } from '@moviie/player-types';
3
3
 
4
4
  /** A single moment in the video where the term occurs. */
5
5
  interface TranscriptSearchMatch {
@@ -85,6 +85,20 @@ interface MoviieCTA {
85
85
  size: 'sm' | 'md' | 'lg';
86
86
  passUrlParams: boolean;
87
87
  }
88
+ type DrmWatermarkStyle = {
89
+ fontFamily: 'Arial' | 'Inter' | 'Raleway' | 'Roboto' | 'Ubuntu';
90
+ /** Hex #RRGGBB. */
91
+ backgroundColor: string;
92
+ /** Hex #RRGGBB. */
93
+ textColor: string;
94
+ animationSpeed: 'slow' | 'normal' | 'fast';
95
+ };
96
+ interface DrmWatermark {
97
+ /** 1–3 sanitized viewer lines (top→bottom). Present only for a triggered playback. */
98
+ lines: string[];
99
+ /** Resolved style: per-video override → org default → built-in DS default. */
100
+ style: DrmWatermarkStyle;
101
+ }
88
102
  interface MoviiePlaybackControls {
89
103
  autoplay: boolean;
90
104
  preload: boolean;
@@ -110,6 +124,19 @@ interface MoviiePlaybackControls {
110
124
  showChapters: boolean;
111
125
  turboStartEnabled: boolean;
112
126
  }
127
+ /**
128
+ * Feature 190 — an alternate playback version of a video (e.g. the condensed
129
+ * "Versão Express"). Native clients switch playback to `uri`, reusing the main
130
+ * playback request headers for private HLS.
131
+ */
132
+ interface MoviieVariant {
133
+ id: string;
134
+ kind: string;
135
+ label: string;
136
+ durationSeconds: number;
137
+ uri: string;
138
+ contentType: 'hls';
139
+ }
113
140
  interface MoviiePlaybackData {
114
141
  embedId: string;
115
142
  title: string;
@@ -122,6 +149,8 @@ interface MoviiePlaybackData {
122
149
  /** Pixel height from ingest metadata when known (positive integers only). */
123
150
  videoHeightPx: number | null;
124
151
  profile: string;
152
+ /** Feature 190 — alternate playback versions (e.g. the condensed "Versão Express"). */
153
+ variants?: MoviieVariant[];
125
154
  playback: MoviiePlaybackPayload;
126
155
  posterUrl: string | null;
127
156
  branding: {
@@ -136,6 +165,12 @@ interface MoviiePlaybackData {
136
165
  telemetry: {
137
166
  bootstrapUrl: string;
138
167
  };
168
+ /**
169
+ * Feature 196 — social DRM watermark. Present only for a triggered private
170
+ * playback (the token carried viewer `drm.lines`); omitted otherwise so the
171
+ * native player mounts no overlay.
172
+ */
173
+ drm?: DrmWatermark;
139
174
  /**
140
175
  * Feature 185 — native pixel emission (Meta Conversions API only; the native
141
176
  * player has no browser tags). Present only when a Meta pixel has the CAPI
@@ -357,4 +392,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
357
392
 
358
393
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
359
394
 
360
- 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 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moviie/player-sdk",
3
- "version": "0.5.0",
3
+ "version": "0.7.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.2.0"
44
+ "@moviie/player-types": "1.3.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@types/node": "^22.10.2",