@mdcrtrs/player 0.2.0 → 0.4.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/README.md CHANGED
@@ -51,11 +51,16 @@ function VideoPlayer() {
51
51
  |------|------|----------|-------------|
52
52
  | `creatorId` | `string` | Yes | Project public ID |
53
53
  | `asset` | `PlayerAsset` | Yes | Asset to play (`assetId`, `playbackId`, `title`, optional `duration`) |
54
+ | `env` | `"production" \| "preview"` | No | Platform environment; `"preview"` calls `preview-api` / `preview-playback.mediacreators.io`. Default `"production"` |
54
55
  | `auth` | `{ fanToken: string }` | No | Fan authentication for personalized features |
55
56
  | `theme` | `{ primaryColor: string }` | No | Brand color (CSS color value) |
57
+ | `branding` | `PlayerBrandingConfig` | No | Custom branding logo (URL, link, title, white filter) |
58
+ | `config` | `PlayerConfig` | No | Player customization: controls visibility, accent color, languages |
56
59
  | `playerTheme` | `string` | No | Player chrome theme name |
57
60
  | `poster` | `string` | No | Poster image URL |
58
61
  | `autoResume` | `boolean` | No | Resume from last watched position (requires `auth`) |
62
+ | `getSession` | `() => Promise<SessionToken>` | No | Host-minted session callback; skips internal session fetch |
63
+ | `onAccessDenied` | `(state: PlayerAccessState) => void` | No | Called on 403 from playback service (`"access_denied"` or `"not_available"`) |
59
64
  | `className` | `string` | No | CSS class for the player container |
60
65
 
61
66
  ### Events
@@ -71,6 +76,7 @@ function VideoPlayer() {
71
76
  | `onComplete` | `() => void` | Playback completed |
72
77
  | `onResume` | `(position: number) => void` | Resumed from saved position |
73
78
  | `onError` | `(error: { code: string, message: string }) => void` | Playback error |
79
+ | `onAccessDenied` | `(state: PlayerAccessState) => void` | Access denied by playback service |
74
80
 
75
81
  ## License
76
82