@moviie/player-sdk 0.4.0 → 0.6.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 {
@@ -52,12 +52,12 @@ declare function createTranscriptSearchController(opts: {
52
52
 
53
53
  interface MoviieClientInfo {
54
54
  bundleId?: string;
55
- platform: "ios" | "android" | "web";
55
+ platform: 'ios' | 'android' | 'web';
56
56
  sdkVersion?: string;
57
57
  }
58
58
  interface MoviiePlaybackPayload {
59
59
  uri: string;
60
- contentType: "hls" | "progressive";
60
+ contentType: 'hls' | 'progressive';
61
61
  expiresAt: string | null;
62
62
  refreshAfter: string | null;
63
63
  /** Headers applied by native/video stacks when fetching `uri` (e.g. CDN referrer checks). */
@@ -80,9 +80,9 @@ interface MoviieCTA {
80
80
  url: string;
81
81
  startTimeSeconds: number;
82
82
  endTimeSeconds: number;
83
- placement: "overlay" | "below";
83
+ placement: 'overlay' | 'below';
84
84
  position: string;
85
- size: "sm" | "md" | "lg";
85
+ size: 'sm' | 'md' | 'lg';
86
86
  passUrlParams: boolean;
87
87
  }
88
88
  interface MoviiePlaybackControls {
@@ -110,6 +110,19 @@ interface MoviiePlaybackControls {
110
110
  showChapters: boolean;
111
111
  turboStartEnabled: boolean;
112
112
  }
113
+ /**
114
+ * Feature 190 — an alternate playback version of a video (e.g. the condensed
115
+ * "Versão Express"). Native clients switch playback to `uri`, reusing the main
116
+ * playback request headers for private HLS.
117
+ */
118
+ interface MoviieVariant {
119
+ id: string;
120
+ kind: string;
121
+ label: string;
122
+ durationSeconds: number;
123
+ uri: string;
124
+ contentType: 'hls';
125
+ }
113
126
  interface MoviiePlaybackData {
114
127
  embedId: string;
115
128
  title: string;
@@ -122,6 +135,8 @@ interface MoviiePlaybackData {
122
135
  /** Pixel height from ingest metadata when known (positive integers only). */
123
136
  videoHeightPx: number | null;
124
137
  profile: string;
138
+ /** Feature 190 — alternate playback versions (e.g. the condensed "Versão Express"). */
139
+ variants?: MoviieVariant[];
125
140
  playback: MoviiePlaybackPayload;
126
141
  posterUrl: string | null;
127
142
  branding: {
@@ -136,6 +151,19 @@ interface MoviiePlaybackData {
136
151
  telemetry: {
137
152
  bootstrapUrl: string;
138
153
  };
154
+ /**
155
+ * Feature 185 — native pixel emission (Meta Conversions API only; the native
156
+ * player has no browser tags). Present only when a Meta pixel has the CAPI
157
+ * enabled for this playback; the native hook beacons these events to the origin
158
+ * which fires the server-side conversion. No change to the player event contract.
159
+ */
160
+ tracking?: {
161
+ meta?: {
162
+ enabledEvents: string[];
163
+ };
164
+ /** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
165
+ pitchTimestamps?: number[];
166
+ };
139
167
  }
140
168
  /** Minimal shape from GET /v1/videos/:id for embed_id resolution */
141
169
  interface MoviieVideo {
@@ -344,4 +372,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
344
372
 
345
373
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
346
374
 
347
- 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 };
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 };
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 {
@@ -52,12 +52,12 @@ declare function createTranscriptSearchController(opts: {
52
52
 
53
53
  interface MoviieClientInfo {
54
54
  bundleId?: string;
55
- platform: "ios" | "android" | "web";
55
+ platform: 'ios' | 'android' | 'web';
56
56
  sdkVersion?: string;
57
57
  }
58
58
  interface MoviiePlaybackPayload {
59
59
  uri: string;
60
- contentType: "hls" | "progressive";
60
+ contentType: 'hls' | 'progressive';
61
61
  expiresAt: string | null;
62
62
  refreshAfter: string | null;
63
63
  /** Headers applied by native/video stacks when fetching `uri` (e.g. CDN referrer checks). */
@@ -80,9 +80,9 @@ interface MoviieCTA {
80
80
  url: string;
81
81
  startTimeSeconds: number;
82
82
  endTimeSeconds: number;
83
- placement: "overlay" | "below";
83
+ placement: 'overlay' | 'below';
84
84
  position: string;
85
- size: "sm" | "md" | "lg";
85
+ size: 'sm' | 'md' | 'lg';
86
86
  passUrlParams: boolean;
87
87
  }
88
88
  interface MoviiePlaybackControls {
@@ -110,6 +110,19 @@ interface MoviiePlaybackControls {
110
110
  showChapters: boolean;
111
111
  turboStartEnabled: boolean;
112
112
  }
113
+ /**
114
+ * Feature 190 — an alternate playback version of a video (e.g. the condensed
115
+ * "Versão Express"). Native clients switch playback to `uri`, reusing the main
116
+ * playback request headers for private HLS.
117
+ */
118
+ interface MoviieVariant {
119
+ id: string;
120
+ kind: string;
121
+ label: string;
122
+ durationSeconds: number;
123
+ uri: string;
124
+ contentType: 'hls';
125
+ }
113
126
  interface MoviiePlaybackData {
114
127
  embedId: string;
115
128
  title: string;
@@ -122,6 +135,8 @@ interface MoviiePlaybackData {
122
135
  /** Pixel height from ingest metadata when known (positive integers only). */
123
136
  videoHeightPx: number | null;
124
137
  profile: string;
138
+ /** Feature 190 — alternate playback versions (e.g. the condensed "Versão Express"). */
139
+ variants?: MoviieVariant[];
125
140
  playback: MoviiePlaybackPayload;
126
141
  posterUrl: string | null;
127
142
  branding: {
@@ -136,6 +151,19 @@ interface MoviiePlaybackData {
136
151
  telemetry: {
137
152
  bootstrapUrl: string;
138
153
  };
154
+ /**
155
+ * Feature 185 — native pixel emission (Meta Conversions API only; the native
156
+ * player has no browser tags). Present only when a Meta pixel has the CAPI
157
+ * enabled for this playback; the native hook beacons these events to the origin
158
+ * which fires the server-side conversion. No change to the player event contract.
159
+ */
160
+ tracking?: {
161
+ meta?: {
162
+ enabledEvents: string[];
163
+ };
164
+ /** Feature 187 → 185: timestamps (s) of pitch checkpoints; crossing fires `pitch`. */
165
+ pitchTimestamps?: number[];
166
+ };
139
167
  }
140
168
  /** Minimal shape from GET /v1/videos/:id for embed_id resolution */
141
169
  interface MoviieVideo {
@@ -344,4 +372,4 @@ declare const MOVIIE_WATCH_BASE = "https://watch.moviie.ai";
344
372
 
345
373
  declare function deriveTelemetryEventsBaseUrlFromBootstrapUrl(bootstrapUrl: string): string | null;
346
374
 
347
- 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moviie/player-sdk",
3
- "version": "0.4.0",
3
+ "version": "0.6.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",