@mottosports/motto-video-player 1.0.1-rc.12 → 1.0.1-rc.5

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
@@ -1,6 +1,6 @@
1
1
  # Motto Video Player
2
2
 
3
- React video player component for the Motto platform, powered by Shaka Player with TanStack Query integration.
3
+ A modern, feature-rich video player built on top of Shaka Player with React support.
4
4
 
5
5
  ## Features
6
6
 
@@ -17,217 +17,220 @@ React video player component for the Motto platform, powered by Shaka Player wit
17
17
  ## Installation
18
18
 
19
19
  ```bash
20
- npm install @motto-ui-components/motto-video-player @tanstack/react-query
20
+ npm install @motto/video-player
21
+ # or
22
+ yarn add @motto/video-player
23
+ # or
24
+ pnpm add @motto/video-player
21
25
  ```
22
26
 
23
- ## Quick Start
27
+ ## Basic Usage
24
28
 
25
- ### Setup QueryClient (Required for Video wrapper)
29
+ ```tsx
30
+ import { Player } from '@motto/video-player';
26
31
 
27
- ```jsx
28
- import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
32
+ function MyVideoPlayer() {
33
+ return (
34
+ <Player
35
+ src="https://example.com/video.m3u8"
36
+ autoPlay={false}
37
+ controls={true}
38
+ width={800}
39
+ height={450}
40
+ />
41
+ );
42
+ }
43
+ ```
44
+
45
+ ## Next.js Usage (SSR Support)
46
+
47
+ If you're using Next.js, you need to handle server-side rendering (SSR) since Shaka Player requires browser APIs. Here are three approaches:
48
+
49
+ ### Option 1: Using next/dynamic (Recommended)
29
50
 
30
- const queryClient = new QueryClient();
51
+ ```tsx
52
+ import dynamic from 'next/dynamic';
31
53
 
32
- function App() {
54
+ const MottoPlayer = dynamic(
55
+ () => import('@motto/video-player').then((mod) => ({ default: mod.Player })),
56
+ {
57
+ ssr: false,
58
+ loading: () => <div>Loading player...</div>
59
+ }
60
+ );
61
+
62
+ function MyVideoPage() {
33
63
  return (
34
- <QueryClientProvider client={queryClient}>
35
- <YourComponents />
36
- </QueryClientProvider>
64
+ <div>
65
+ <h1>My Video</h1>
66
+ <MottoPlayer
67
+ src="https://example.com/video.m3u8"
68
+ autoPlay={false}
69
+ controls={true}
70
+ width={800}
71
+ height={450}
72
+ />
73
+ </div>
37
74
  );
38
75
  }
39
76
  ```
40
77
 
41
- ### Basic Usage
42
-
43
- #### VideoPlayer (Bare Component)
44
- For direct stream URL playback:
78
+ ### Option 2: Using the built-in ClientOnlyPlayer
45
79
 
46
- ```jsx
47
- import { VideoPlayer } from '@motto-ui-components/motto-video-player';
80
+ ```tsx
81
+ import { ClientOnlyPlayer } from '@motto/video-player';
48
82
 
49
- function MyPlayer() {
83
+ function MyVideoPage() {
50
84
  return (
51
- <VideoPlayer
52
- src="https://example.com/video.m3u8"
53
- controls
54
- aspectRatio={16/9}
55
- onPlay={() => console.log('Playing')}
56
- onError={(error) => console.error(error)}
57
- />
85
+ <div>
86
+ <h1>My Video</h1>
87
+ <ClientOnlyPlayer
88
+ src="https://example.com/video.m3u8"
89
+ autoPlay={false}
90
+ controls={true}
91
+ width={800}
92
+ height={450}
93
+ />
94
+ </div>
58
95
  );
59
96
  }
60
97
  ```
61
98
 
62
- #### Video (Wrapper Component)
63
- For data fetching with TanStack Query:
99
+ ### Option 3: Using useEffect for client-side only rendering
100
+
101
+ ```tsx
102
+ import { Player } from '@motto/video-player';
103
+ import { useEffect, useState } from 'react';
64
104
 
65
- ```jsx
66
- import { Video } from '@motto-ui-components/motto-video-player';
105
+ function MyVideoPage() {
106
+ const [isClient, setIsClient] = useState(false);
107
+
108
+ useEffect(() => {
109
+ setIsClient(true);
110
+ }, []);
111
+
112
+ if (!isClient) {
113
+ return <div>Loading player...</div>;
114
+ }
67
115
 
68
- function MyPlayer() {
69
116
  return (
70
- <Video
71
- videoId="your-video-id"
72
- publicKey="your-public-key"
73
- controls
74
- refetchInterval={30000}
75
- events={{
76
- onVideoData: (video) => console.log('Video loaded:', video),
77
- onError: (error) => console.error('Error:', error),
78
- onPlay: () => console.log('Playing')
79
- }}
80
- />
117
+ <div>
118
+ <h1>My Video</h1>
119
+ <Player
120
+ src="https://example.com/video.m3u8"
121
+ autoPlay={false}
122
+ controls={true}
123
+ width={800}
124
+ height={450}
125
+ />
126
+ </div>
81
127
  );
82
128
  }
83
129
  ```
84
130
 
85
- ## Component Comparison
131
+ ## Player Props
132
+
133
+ The player accepts the following props:
86
134
 
87
- | Feature | VideoPlayer | Video |
88
- |---------|-------------|-------|
89
- | **Use Case** | Direct stream URL | Data fetching with videoId |
90
- | **Data Fetching** | Manual | ✅ Automatic with TanStack Query |
91
- | **Caching** | None | ✅ Smart caching & background updates |
92
- | **Loading States** | Manual | Built-in loading indicators |
93
- | **Error Handling** | Manual | Automatic retry with exponential backoff |
94
- | **Performance** | Minimal overhead | Optimized with query deduplication |
135
+ - `src` (string, required): URL of the video manifest (HLS, DASH, etc.)
136
+ - `autoPlay` (boolean, default: false): Whether to start playing automatically
137
+ - `controls` (boolean, default: true): Whether to show player controls
138
+ - `width` (number): Fixed width in pixels
139
+ - `height` (number): Fixed height in pixels
140
+ - `aspectRatio` (number, default: 16/9): Aspect ratio for responsive sizing
141
+ - `poster` (string): URL of poster image to show before video loads
142
+ - `muted` (boolean, default: false): Whether to start muted
143
+ - `loop` (boolean, default: false): Whether to loop the video
95
144
 
96
145
  ## Advanced Configuration
97
146
 
98
- ### TanStack Query Options
99
-
100
- ```jsx
101
- <Video
102
- videoId="123"
103
- publicKey="key"
104
- refetchInterval={30000}
105
- queryOptions={{
106
- staleTime: 5 * 60 * 1000, // 5 minutes
107
- retry: 3,
108
- retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30000)
147
+ ### Quality Control
148
+
149
+ ```tsx
150
+ <Player
151
+ src="https://example.com/video.m3u8"
152
+ qualityConfig={{
153
+ enableAutoQuality: true,
154
+ preferredVideoHeight: 720,
155
+ preferredAudioLanguage: 'en'
109
156
  }}
110
157
  />
111
158
  ```
112
159
 
113
- ### Skip Controls
160
+ ### DRM Configuration
114
161
 
115
- ```jsx
116
- <VideoPlayer
117
- src="..."
118
- skipConfig={{
119
- showSkipBack: true,
120
- showSkipForward: true,
121
- skipDuration: 15,
122
- position: 'controls' // or 'overlay'
162
+ ```tsx
163
+ <Player
164
+ src="https://example.com/protected-video.mpd"
165
+ drmConfig={{
166
+ servers: {
167
+ 'com.widevine.alpha': 'https://license-server.com/widevine',
168
+ 'com.microsoft.playready': 'https://license-server.com/playready'
169
+ }
123
170
  }}
124
- onSkipBack={(newTime) => console.log('Skipped to:', newTime)}
125
- onSkipForward={(newTime) => console.log('Skipped to:', newTime)}
126
171
  />
127
172
  ```
128
173
 
129
- ### Responsive Sizing
130
-
131
- ```jsx
132
- // Default responsive 16:9
133
- <VideoPlayer src="..." />
174
+ ### Mux Analytics
134
175
 
135
- // Custom aspect ratio
136
- <VideoPlayer src="..." aspectRatio={4/3} />
137
-
138
- // Fixed dimensions
139
- <VideoPlayer src="..." width={800} height={450} />
140
- ```
141
-
142
- ### Analytics Integration
143
-
144
- ```jsx
145
- <VideoPlayer
146
- src="..."
176
+ ```tsx
177
+ <Player
178
+ src="https://example.com/video.m3u8"
147
179
  muxConfig={{
148
- debug: false,
149
- data: {
150
- env_key: 'your-mux-env-key',
151
- video_title: 'Video Title',
152
- video_id: 'video-123',
153
- player_name: 'Web Player',
154
- viewer_user_id: 'user-456'
180
+ envKey: 'your-mux-env-key',
181
+ metadata: {
182
+ video_title: 'My Video',
183
+ viewer_user_id: 'user123'
155
184
  }
156
185
  }}
157
- onMuxReady={(monitor) => console.log('Mux ready')}
158
186
  />
159
187
  ```
160
188
 
161
- ## API Reference
162
-
163
- ### VideoPlayer Props
164
-
165
- ```typescript
166
- interface VideoPlayerProps {
167
- src: string; // Video source URL
168
- autoPlay?: boolean; // Auto-play video
169
- controls?: boolean; // Show player controls
170
- aspectRatio?: number; // Video aspect ratio (default: 16/9)
171
- width?: number; // Fixed width
172
- height?: number; // Fixed height
173
- skipConfig?: SkipConfig; // Skip controls configuration
174
- muxConfig?: MuxConfig; // Mux analytics configuration
175
- onPlay?: () => void; // Play event callback
176
- onPause?: () => void; // Pause event callback
177
- onError?: (error: any) => void; // Error event callback
178
- // ... more props
179
- }
180
- ```
181
-
182
- ### Video Props
183
-
184
- ```typescript
185
- interface VideoProps extends Omit<VideoPlayerProps, 'src'> {
186
- videoId?: string; // Video ID for data fetching
187
- publicKey?: string; // Public key for API authentication
188
- videoData?: VideoData; // Pre-loaded video data
189
- refetchInterval?: number; // Background refetch interval (ms)
190
- queryOptions?: QueryOptions; // TanStack Query configuration
191
- events?: {
192
- onVideoData?: (video: VideoData) => void;
193
- onEmptyPlaylists?: () => void;
194
- onError?: (error: Error) => void;
195
- // ... player events
196
- };
197
- }
189
+ ## Event Handling
190
+
191
+ ```tsx
192
+ <Player
193
+ src="https://example.com/video.m3u8"
194
+ events={{
195
+ onPlay: () => console.log('Video started playing'),
196
+ onPause: () => console.log('Video paused'),
197
+ onEnded: () => console.log('Video ended'),
198
+ onError: (error) => console.error('Playback error:', error),
199
+ onQualityChange: (quality) => console.log('Quality changed:', quality)
200
+ }}
201
+ />
198
202
  ```
199
203
 
200
- ## TanStack Query Benefits
204
+ ## Responsive Design
201
205
 
202
- ### Caching & Performance
203
- - **Automatic Caching**: Videos are cached with configurable stale time
204
- - **Background Refetching**: Data stays fresh with background updates
205
- - **Request Deduplication**: Identical requests are automatically deduplicated
206
- - **Garbage Collection**: Memory-efficient cleanup of unused cache entries
206
+ For responsive video players, omit the `width` and `height` props and optionally set an `aspectRatio`:
207
207
 
208
- ### Resilience & UX
209
- - **Smart Retries**: Exponential backoff retry logic for failed requests
210
- - **Loading States**: Built-in loading indicators for better UX
211
- - **Error Recovery**: Automatic error handling and recovery mechanisms
212
- - **Optimistic Updates**: Support for optimistic UI updates
208
+ ```tsx
209
+ <Player
210
+ src="https://example.com/video.m3u8"
211
+ aspectRatio={16/9}
212
+ containerClassName="w-full max-w-4xl"
213
+ />
214
+ ```
213
215
 
214
- ## Examples
216
+ ## Live Streaming
215
217
 
216
- Check out the [example app](../../apps/example) for comprehensive usage examples including:
218
+ The player automatically detects live streams and shows appropriate UI:
217
219
 
218
- - Basic VideoPlayer usage
219
- - Video wrapper with TanStack Query
220
- - Pre-loaded data scenarios
221
- - Skip controls integration
222
- - Responsive design patterns
220
+ ```tsx
221
+ <Player
222
+ src="https://example.com/live-stream.m3u8"
223
+ streamStartDate={new Date('2024-01-01T12:00:00Z')} // Optional: for absolute time display
224
+ />
225
+ ```
223
226
 
224
- ## Contributing
227
+ ## Browser Support
225
228
 
226
- 1. Clone the repository
227
- 2. Install dependencies: `pnpm install`
228
- 3. Start development: `pnpm dev`
229
- 4. Build: `pnpm build`
229
+ - Chrome 80+
230
+ - Firefox 75+
231
+ - Safari 13+
232
+ - Edge 80+
230
233
 
231
234
  ## License
232
235
 
233
- ISC
236
+ MIT
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import { QueryClient } from '@tanstack/react-query';
1
+ import * as React from 'react';
2
+ import React__default, { HTMLAttributes } from 'react';
3
3
 
4
4
  /**
5
5
  * Unified events interface for both Player and Video wrapper
@@ -225,7 +225,17 @@ interface PlayerProps extends Omit<HTMLAttributes<HTMLVideoElement>, 'src' | 'on
225
225
  * Event callbacks
226
226
  */
227
227
  events?: PlayerEvents;
228
+ /**
229
+ * CSS class name for the container element
230
+ */
228
231
  containerClassName?: string;
232
+ /**
233
+ * Optional manual override for stream start time
234
+ * If not provided, the player will attempt to auto-detect the stream start time
235
+ * from the manifest for live streams. When provided, shows elapsed time since
236
+ * stream started instead of the current playback position.
237
+ */
238
+ streamStartDate?: Date;
229
239
  }
230
240
  /**
231
241
  * Mux Analytics type definitions
@@ -320,7 +330,13 @@ interface MuxAnalyticsConfig {
320
330
  metadata?: MuxMetadata;
321
331
  }
322
332
 
323
- declare const Player: React.ForwardRefExoticComponent<PlayerProps & React.RefAttributes<HTMLVideoElement>>;
333
+ declare const Player: React__default.ForwardRefExoticComponent<PlayerProps & React__default.RefAttributes<HTMLVideoElement>>;
334
+
335
+ /**
336
+ * Client-only wrapper for the Player component to prevent SSR issues.
337
+ * This component only renders the Player on the client side after hydration.
338
+ */
339
+ declare const ClientOnlyPlayer: React__default.ForwardRefExoticComponent<PlayerProps & React__default.RefAttributes<HTMLVideoElement>>;
324
340
 
325
341
  interface VideoData {
326
342
  id: string;
@@ -342,6 +358,22 @@ interface VideoListItem {
342
358
  }>;
343
359
  error?: string;
344
360
  }
361
+ /**
362
+ * Fetches video data from the Motto Streaming API
363
+ * @param videoId - The ID of the video to fetch
364
+ * @param publicKey - The public key for authentication
365
+ * @param mottoToken - Optional motto token for authenticated requests
366
+ * @returns Promise<VideoData> - The video data
367
+ */
368
+ declare const fetchVideoData: (videoId: string, publicKey: string, mottoToken?: string) => Promise<VideoData>;
369
+ /**
370
+ * Fetches multiple videos data from the Motto Streaming API
371
+ * @param publicKey - The public key for authentication
372
+ * @param videoIds - Array of video IDs to fetch
373
+ * @param mottoToken - Optional motto token for authenticated requests
374
+ * @returns Promise<VideoListItem[]> - Array of video data
375
+ */
376
+ declare function fetchVideosList(publicKey: string, videoIds: string[], mottoToken?: string, skip?: number, limit?: number): Promise<VideoListItem[]>;
345
377
 
346
378
  interface EventData {
347
379
  id: string;
@@ -357,6 +389,7 @@ declare enum EventsSortDirection {
357
389
  ASC = "asc",
358
390
  DESC = "desc"
359
391
  }
392
+ declare function fetchEventData(publicKey: string, eventId: string, unused?: any, filter?: string, order?: EventsSortDirection, locale?: string): Promise<EventData>;
360
393
 
361
394
  interface CreativeWorkData {
362
395
  id: string;
@@ -372,6 +405,7 @@ declare enum CreativeWorksSortDirection {
372
405
  ASC = "asc",
373
406
  DESC = "desc"
374
407
  }
408
+ declare function fetchCreativeWorkData(publicKey: string, creativeWorkId: string, unused?: any, filter?: string, order?: CreativeWorksSortDirection, locale?: string): Promise<CreativeWorkData>;
375
409
 
376
410
  interface VideoProps extends Omit<PlayerProps, 'src'> {
377
411
  videoId?: string;
@@ -392,7 +426,7 @@ interface VideoProps extends Omit<PlayerProps, 'src'> {
392
426
  onCanPlay?: () => void;
393
427
  onPlayerReady?: () => void;
394
428
  };
395
- children?: React.ReactNode;
429
+ children?: React__default.ReactNode;
396
430
  className?: string;
397
431
  queryOptions?: {
398
432
  enabled?: boolean;
@@ -402,7 +436,7 @@ interface VideoProps extends Omit<PlayerProps, 'src'> {
402
436
  retryDelay?: number;
403
437
  };
404
438
  }
405
- declare const Video: React.FC<VideoProps>;
439
+ declare const Video: React__default.FC<VideoProps>;
406
440
 
407
441
  interface EventProps extends Omit<PlayerProps, 'src'> {
408
442
  publicKey: string;
@@ -440,7 +474,7 @@ interface EventProps extends Omit<PlayerProps, 'src'> {
440
474
  retryDelay?: number;
441
475
  };
442
476
  }
443
- declare const Event: React.FC<EventProps>;
477
+ declare const Event: React__default.FC<EventProps>;
444
478
 
445
479
  interface CreativeWorkProps extends Omit<PlayerProps, 'src'> {
446
480
  publicKey: string;
@@ -478,12 +512,21 @@ interface CreativeWorkProps extends Omit<PlayerProps, 'src'> {
478
512
  retryDelay?: number;
479
513
  };
480
514
  }
481
- declare const CreativeWork: React.FC<CreativeWorkProps>;
515
+ declare const CreativeWork: React__default.FC<CreativeWorkProps>;
516
+
517
+ /**
518
+ * Client-side wrapper for the Event component to prevent SSR issues
519
+ * This component ensures that Event is only rendered on the client-side
520
+ */
521
+ declare const ClientSideEvent: React__default.FC<EventProps>;
482
522
 
483
- declare const queryClient: QueryClient;
484
523
  interface QueryProviderProps {
485
- children: React.ReactNode;
524
+ children: React__default.ReactNode;
486
525
  }
487
- declare const QueryProvider: React.FC<QueryProviderProps>;
526
+ declare const QueryProvider: React__default.FC<QueryProviderProps>;
527
+
528
+ declare const _default: {
529
+ Player: React.ForwardRefExoticComponent<PlayerProps & React.RefAttributes<HTMLVideoElement>>;
530
+ };
488
531
 
489
- export { CreativeWork, type CreativeWorkData, type CreativeWorkProps, CreativeWorksSortDirection, Event, type EventData, type EventProps, EventsSortDirection, Player, type PlayerEvents, type PlayerProps, QueryProvider, Video, type VideoData, type VideoListItem, type VideoProps, queryClient };
532
+ export { ClientOnlyPlayer, ClientSideEvent, CreativeWork, type CreativeWorkData, type CreativeWorkProps, CreativeWorksSortDirection, Event, type EventData, type EventProps, EventsSortDirection, type MuxAnalyticsConfig, type MuxDataUpdatePayload, type MuxErrorTranslator, type MuxMetadata, Player, type PlayerEvents, type PlayerProps, QueryProvider, type SeekbarConfig, Video, type VideoData, type VideoListItem, type VideoProps, _default as default, fetchCreativeWorkData, fetchEventData, fetchVideoData, fetchVideosList };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import React, { HTMLAttributes } from 'react';
2
- import { QueryClient } from '@tanstack/react-query';
1
+ import * as React from 'react';
2
+ import React__default, { HTMLAttributes } from 'react';
3
3
 
4
4
  /**
5
5
  * Unified events interface for both Player and Video wrapper
@@ -225,7 +225,17 @@ interface PlayerProps extends Omit<HTMLAttributes<HTMLVideoElement>, 'src' | 'on
225
225
  * Event callbacks
226
226
  */
227
227
  events?: PlayerEvents;
228
+ /**
229
+ * CSS class name for the container element
230
+ */
228
231
  containerClassName?: string;
232
+ /**
233
+ * Optional manual override for stream start time
234
+ * If not provided, the player will attempt to auto-detect the stream start time
235
+ * from the manifest for live streams. When provided, shows elapsed time since
236
+ * stream started instead of the current playback position.
237
+ */
238
+ streamStartDate?: Date;
229
239
  }
230
240
  /**
231
241
  * Mux Analytics type definitions
@@ -320,7 +330,13 @@ interface MuxAnalyticsConfig {
320
330
  metadata?: MuxMetadata;
321
331
  }
322
332
 
323
- declare const Player: React.ForwardRefExoticComponent<PlayerProps & React.RefAttributes<HTMLVideoElement>>;
333
+ declare const Player: React__default.ForwardRefExoticComponent<PlayerProps & React__default.RefAttributes<HTMLVideoElement>>;
334
+
335
+ /**
336
+ * Client-only wrapper for the Player component to prevent SSR issues.
337
+ * This component only renders the Player on the client side after hydration.
338
+ */
339
+ declare const ClientOnlyPlayer: React__default.ForwardRefExoticComponent<PlayerProps & React__default.RefAttributes<HTMLVideoElement>>;
324
340
 
325
341
  interface VideoData {
326
342
  id: string;
@@ -342,6 +358,22 @@ interface VideoListItem {
342
358
  }>;
343
359
  error?: string;
344
360
  }
361
+ /**
362
+ * Fetches video data from the Motto Streaming API
363
+ * @param videoId - The ID of the video to fetch
364
+ * @param publicKey - The public key for authentication
365
+ * @param mottoToken - Optional motto token for authenticated requests
366
+ * @returns Promise<VideoData> - The video data
367
+ */
368
+ declare const fetchVideoData: (videoId: string, publicKey: string, mottoToken?: string) => Promise<VideoData>;
369
+ /**
370
+ * Fetches multiple videos data from the Motto Streaming API
371
+ * @param publicKey - The public key for authentication
372
+ * @param videoIds - Array of video IDs to fetch
373
+ * @param mottoToken - Optional motto token for authenticated requests
374
+ * @returns Promise<VideoListItem[]> - Array of video data
375
+ */
376
+ declare function fetchVideosList(publicKey: string, videoIds: string[], mottoToken?: string, skip?: number, limit?: number): Promise<VideoListItem[]>;
345
377
 
346
378
  interface EventData {
347
379
  id: string;
@@ -357,6 +389,7 @@ declare enum EventsSortDirection {
357
389
  ASC = "asc",
358
390
  DESC = "desc"
359
391
  }
392
+ declare function fetchEventData(publicKey: string, eventId: string, unused?: any, filter?: string, order?: EventsSortDirection, locale?: string): Promise<EventData>;
360
393
 
361
394
  interface CreativeWorkData {
362
395
  id: string;
@@ -372,6 +405,7 @@ declare enum CreativeWorksSortDirection {
372
405
  ASC = "asc",
373
406
  DESC = "desc"
374
407
  }
408
+ declare function fetchCreativeWorkData(publicKey: string, creativeWorkId: string, unused?: any, filter?: string, order?: CreativeWorksSortDirection, locale?: string): Promise<CreativeWorkData>;
375
409
 
376
410
  interface VideoProps extends Omit<PlayerProps, 'src'> {
377
411
  videoId?: string;
@@ -392,7 +426,7 @@ interface VideoProps extends Omit<PlayerProps, 'src'> {
392
426
  onCanPlay?: () => void;
393
427
  onPlayerReady?: () => void;
394
428
  };
395
- children?: React.ReactNode;
429
+ children?: React__default.ReactNode;
396
430
  className?: string;
397
431
  queryOptions?: {
398
432
  enabled?: boolean;
@@ -402,7 +436,7 @@ interface VideoProps extends Omit<PlayerProps, 'src'> {
402
436
  retryDelay?: number;
403
437
  };
404
438
  }
405
- declare const Video: React.FC<VideoProps>;
439
+ declare const Video: React__default.FC<VideoProps>;
406
440
 
407
441
  interface EventProps extends Omit<PlayerProps, 'src'> {
408
442
  publicKey: string;
@@ -440,7 +474,7 @@ interface EventProps extends Omit<PlayerProps, 'src'> {
440
474
  retryDelay?: number;
441
475
  };
442
476
  }
443
- declare const Event: React.FC<EventProps>;
477
+ declare const Event: React__default.FC<EventProps>;
444
478
 
445
479
  interface CreativeWorkProps extends Omit<PlayerProps, 'src'> {
446
480
  publicKey: string;
@@ -478,12 +512,21 @@ interface CreativeWorkProps extends Omit<PlayerProps, 'src'> {
478
512
  retryDelay?: number;
479
513
  };
480
514
  }
481
- declare const CreativeWork: React.FC<CreativeWorkProps>;
515
+ declare const CreativeWork: React__default.FC<CreativeWorkProps>;
516
+
517
+ /**
518
+ * Client-side wrapper for the Event component to prevent SSR issues
519
+ * This component ensures that Event is only rendered on the client-side
520
+ */
521
+ declare const ClientSideEvent: React__default.FC<EventProps>;
482
522
 
483
- declare const queryClient: QueryClient;
484
523
  interface QueryProviderProps {
485
- children: React.ReactNode;
524
+ children: React__default.ReactNode;
486
525
  }
487
- declare const QueryProvider: React.FC<QueryProviderProps>;
526
+ declare const QueryProvider: React__default.FC<QueryProviderProps>;
527
+
528
+ declare const _default: {
529
+ Player: React.ForwardRefExoticComponent<PlayerProps & React.RefAttributes<HTMLVideoElement>>;
530
+ };
488
531
 
489
- export { CreativeWork, type CreativeWorkData, type CreativeWorkProps, CreativeWorksSortDirection, Event, type EventData, type EventProps, EventsSortDirection, Player, type PlayerEvents, type PlayerProps, QueryProvider, Video, type VideoData, type VideoListItem, type VideoProps, queryClient };
532
+ export { ClientOnlyPlayer, ClientSideEvent, CreativeWork, type CreativeWorkData, type CreativeWorkProps, CreativeWorksSortDirection, Event, type EventData, type EventProps, EventsSortDirection, type MuxAnalyticsConfig, type MuxDataUpdatePayload, type MuxErrorTranslator, type MuxMetadata, Player, type PlayerEvents, type PlayerProps, QueryProvider, type SeekbarConfig, Video, type VideoData, type VideoListItem, type VideoProps, _default as default, fetchCreativeWorkData, fetchEventData, fetchVideoData, fetchVideosList };