@linktr.ee/messaging-react 1.30.0 → 1.30.1-rc-1776660256

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "1.30.0",
3
+ "version": "1.30.1-rc-1776660256",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -206,7 +206,7 @@ const CustomMessageWithContext = (props: CustomMessageWithContextProps) => {
206
206
  <LockedAttachment
207
207
  title={message.metadata?.attachment_title}
208
208
  mimeType={message.metadata?.attachment_mime_type}
209
- thumbnail={message.metadata?.attachment_thumbnail}
209
+ thumbnailUrl={message.metadata?.attachment_thumbnail}
210
210
  amountText={message.metadata?.amount_text}
211
211
  detail={message.metadata?.attachment_detail}
212
212
  paymentStatus={message.metadata?.payment_status}
@@ -33,40 +33,40 @@ const VARIANTS = [
33
33
  title: "Alicia's Workout Plan",
34
34
  mimeType: 'video/mp4',
35
35
  detail: '1:20',
36
- thumbnail: VIDEO_THUMBNAIL_BLURRED,
37
- source: VIDEO_SOURCE,
36
+ thumbnailUrl: VIDEO_THUMBNAIL_BLURRED,
37
+ sourceUrl: VIDEO_SOURCE,
38
38
  },
39
39
  {
40
40
  label: 'Audio',
41
41
  title: 'Morning Meditation',
42
42
  mimeType: 'audio/mpeg',
43
43
  detail: '4:35',
44
- thumbnail: AUDIO_THUMBNAIL,
45
- source: AUDIO_SOURCE,
44
+ thumbnailUrl: AUDIO_THUMBNAIL,
45
+ sourceUrl: AUDIO_SOURCE,
46
46
  },
47
47
  {
48
48
  label: 'Image',
49
49
  title: 'Picture of my cat',
50
50
  mimeType: 'image/jpeg',
51
51
  detail: '3.2 MB',
52
- thumbnail: IMAGE_THUMBNAIL_BLURRED,
53
- source: IMAGE_SOURCE,
52
+ thumbnailUrl: IMAGE_THUMBNAIL_BLURRED,
53
+ sourceUrl: IMAGE_SOURCE,
54
54
  },
55
55
  {
56
56
  label: 'Document',
57
57
  title: 'Strength Training Guide',
58
58
  mimeType: 'application/zip',
59
59
  detail: '14 files',
60
- thumbnail: DOCUMENT_THUMBNAIL,
61
- source: DOCUMENT_SOURCE,
60
+ thumbnailUrl: DOCUMENT_THUMBNAIL,
61
+ sourceUrl: DOCUMENT_SOURCE,
62
62
  },
63
63
  {
64
64
  label: 'Unknown',
65
65
  title: 'Unknown Attachment',
66
66
  mimeType: 'application/octet-stream',
67
67
  detail: undefined,
68
- thumbnail: undefined,
69
- source: DOCUMENT_SOURCE,
68
+ thumbnailUrl: undefined,
69
+ sourceUrl: DOCUMENT_SOURCE,
70
70
  },
71
71
  ]
72
72
 
@@ -76,28 +76,28 @@ const NO_THUMBNAIL_VARIANTS = [
76
76
  title: "Alicia's Workout Plan",
77
77
  mimeType: 'video/mp4',
78
78
  detail: '1:20',
79
- source: VIDEO_SOURCE,
79
+ sourceUrl: VIDEO_SOURCE,
80
80
  },
81
81
  {
82
82
  label: 'Audio',
83
83
  title: 'Morning Meditation',
84
84
  mimeType: 'audio/mpeg',
85
85
  detail: '4:35',
86
- source: AUDIO_SOURCE,
86
+ sourceUrl: AUDIO_SOURCE,
87
87
  },
88
88
  {
89
89
  label: 'Image',
90
90
  title: 'Picture of my cat',
91
91
  mimeType: 'image/jpeg',
92
92
  detail: '3.2 MB',
93
- source: IMAGE_SOURCE,
93
+ sourceUrl: IMAGE_SOURCE,
94
94
  },
95
95
  {
96
96
  label: 'Document',
97
97
  title: 'Strength Training Guide',
98
98
  mimeType: 'application/zip',
99
99
  detail: '14 files',
100
- source: DOCUMENT_SOURCE,
100
+ sourceUrl: DOCUMENT_SOURCE,
101
101
  },
102
102
  ]
103
103
 
@@ -135,15 +135,15 @@ export const Visitor: StoryFn = () => (
135
135
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
136
136
  Locked
137
137
  </td>
138
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
138
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
139
139
  <td key={mimeType} className="align-top">
140
140
  <LockedAttachment
141
141
  title={title}
142
142
  amountText="AU$9.99"
143
- thumbnail={thumbnail}
143
+ thumbnailUrl={thumbnailUrl}
144
144
  mimeType={mimeType}
145
145
  detail={detail}
146
- onUnlock={withDelay(() => ({ source }))}
146
+ onUnlock={withDelay(() => ({ sourceUrl }))}
147
147
  onDownload={() => {}}
148
148
  />
149
149
  </td>
@@ -153,16 +153,16 @@ export const Visitor: StoryFn = () => (
153
153
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
154
154
  Purchased
155
155
  </td>
156
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
156
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
157
157
  <td key={mimeType} className="align-top">
158
158
  <LockedAttachment
159
159
  title={title}
160
160
  amountText="AU$9.99"
161
- thumbnail={thumbnail}
161
+ thumbnailUrl={thumbnailUrl}
162
162
  mimeType={mimeType}
163
163
  detail={detail}
164
164
  paymentStatus="paid"
165
- onUnlock={withDelay(() => ({ source }))}
165
+ onUnlock={withDelay(() => ({ sourceUrl }))}
166
166
  onDownload={() => {}}
167
167
  />
168
168
  </td>
@@ -172,12 +172,12 @@ export const Visitor: StoryFn = () => (
172
172
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
173
173
  Unlocked
174
174
  </td>
175
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
175
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
176
176
  <td key={mimeType} className="align-top">
177
177
  <LockedAttachment
178
178
  title={title}
179
- thumbnail={thumbnail}
180
- source={source}
179
+ thumbnailUrl={thumbnailUrl}
180
+ sourceUrl={sourceUrl}
181
181
  mimeType={mimeType}
182
182
  detail={detail}
183
183
  amountText="AU$9.99"
@@ -199,12 +199,12 @@ export const Creator: StoryFn = () => (
199
199
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
200
200
  Preview
201
201
  </td>
202
- {VARIANTS.map(({ mimeType, detail, thumbnail, source }) => (
202
+ {VARIANTS.map(({ mimeType, detail, thumbnailUrl, sourceUrl }) => (
203
203
  <td key={mimeType} className="align-top">
204
204
  <LockedAttachment
205
205
  isPreview
206
- thumbnail={thumbnail}
207
- source={source}
206
+ thumbnailUrl={thumbnailUrl}
207
+ sourceUrl={sourceUrl}
208
208
  mimeType={mimeType}
209
209
  detail={detail}
210
210
  placeholderAmountText="A$0.00"
@@ -216,12 +216,12 @@ export const Creator: StoryFn = () => (
216
216
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
217
217
  Pending
218
218
  </td>
219
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
219
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
220
220
  <td key={mimeType} className="align-top">
221
221
  <LockedAttachment
222
222
  title={title}
223
- thumbnail={thumbnail}
224
- source={source}
223
+ thumbnailUrl={thumbnailUrl}
224
+ sourceUrl={sourceUrl}
225
225
  mimeType={mimeType}
226
226
  detail={detail}
227
227
  amountText="AU$9.99"
@@ -234,13 +234,13 @@ export const Creator: StoryFn = () => (
234
234
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
235
235
  Sent
236
236
  </td>
237
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
237
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
238
238
  <td key={mimeType} className="align-top">
239
239
  <LockedAttachment
240
240
 
241
241
  title={title}
242
- thumbnail={thumbnail}
243
- source={source}
242
+ thumbnailUrl={thumbnailUrl}
243
+ sourceUrl={sourceUrl}
244
244
  mimeType={mimeType}
245
245
  detail={detail}
246
246
  amountText="AU$9.99"
@@ -252,12 +252,12 @@ export const Creator: StoryFn = () => (
252
252
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
253
253
  Sold
254
254
  </td>
255
- {VARIANTS.map(({ title, mimeType, detail, thumbnail, source }) => (
255
+ {VARIANTS.map(({ title, mimeType, detail, thumbnailUrl, sourceUrl }) => (
256
256
  <td key={mimeType} className="align-top">
257
257
  <LockedAttachment
258
258
  title={title}
259
- thumbnail={thumbnail}
260
- source={source}
259
+ thumbnailUrl={thumbnailUrl}
260
+ sourceUrl={sourceUrl}
261
261
  mimeType={mimeType}
262
262
  detail={detail}
263
263
  amountText="AU$9.99"
@@ -278,11 +278,11 @@ export const NoThumbnail: StoryFn = () => (
278
278
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
279
279
  Creator
280
280
  </td>
281
- {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, source }) => (
281
+ {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, sourceUrl }) => (
282
282
  <td key={mimeType} className="align-top">
283
283
  <LockedAttachment
284
284
  title={title}
285
- source={source}
285
+ sourceUrl={sourceUrl}
286
286
  mimeType={mimeType}
287
287
  detail={detail}
288
288
  amountText="AU$9.99"
@@ -294,14 +294,14 @@ export const NoThumbnail: StoryFn = () => (
294
294
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
295
295
  Locked
296
296
  </td>
297
- {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, source }) => (
297
+ {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, sourceUrl }) => (
298
298
  <td key={mimeType} className="align-top">
299
299
  <LockedAttachment
300
300
  title={title}
301
301
  amountText="AU$9.99"
302
302
  mimeType={mimeType}
303
303
  detail={detail}
304
- onUnlock={withDelay(() => ({ source }))}
304
+ onUnlock={withDelay(() => ({ sourceUrl }))}
305
305
  onDownload={() => {}}
306
306
  />
307
307
  </td>
@@ -311,11 +311,11 @@ export const NoThumbnail: StoryFn = () => (
311
311
  <td className="text-xs font-medium text-black/40 pr-4 align-top pt-2">
312
312
  Unlocked
313
313
  </td>
314
- {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, source }) => (
314
+ {NO_THUMBNAIL_VARIANTS.map(({ title, mimeType, detail, sourceUrl }) => (
315
315
  <td key={mimeType} className="align-top">
316
316
  <LockedAttachment
317
317
  title={title}
318
- source={source}
318
+ sourceUrl={sourceUrl}
319
319
  mimeType={mimeType}
320
320
  detail={detail}
321
321
  amountText="AU$9.99"
@@ -43,7 +43,7 @@ const CloseButton: React.FC<CloseButtonProps> = (props) => {
43
43
  }
44
44
 
45
45
  interface CollapsedThumbnailProps {
46
- thumbnail?: string
46
+ thumbnailUrl?: string
47
47
  mimeType: string
48
48
  overlayIcon?: React.ElementType
49
49
  darkOverlay?: boolean
@@ -51,7 +51,7 @@ interface CollapsedThumbnailProps {
51
51
  }
52
52
 
53
53
  const CollapsedThumbnail: React.FC<CollapsedThumbnailProps> = (props) => {
54
- const { thumbnail, mimeType, overlayIcon: OverlayIcon, darkOverlay, onClick } = props
54
+ const { thumbnailUrl, mimeType, overlayIcon: OverlayIcon, darkOverlay, onClick } = props
55
55
  return (
56
56
  <button
57
57
  type="button"
@@ -63,9 +63,9 @@ const CollapsedThumbnail: React.FC<CollapsedThumbnailProps> = (props) => {
63
63
  onClick={onClick}
64
64
  aria-label={OverlayIcon ? 'Toggle preview' : undefined}
65
65
  >
66
- {thumbnail ? (
66
+ {thumbnailUrl ? (
67
67
  <img
68
- src={thumbnail}
68
+ src={thumbnailUrl}
69
69
  alt=""
70
70
  className="absolute inset-0 h-full w-full object-cover"
71
71
  />
@@ -91,13 +91,13 @@ const CollapsedThumbnail: React.FC<CollapsedThumbnailProps> = (props) => {
91
91
 
92
92
 
93
93
  interface AudioPreviewProps {
94
- source?: string
95
- thumbnail?: string
94
+ sourceUrl?: string
95
+ thumbnailUrl?: string
96
96
  mimeType: string
97
97
  }
98
98
 
99
99
  const AudioPreview: React.FC<AudioPreviewProps> = (props) => {
100
- const { source, thumbnail, mimeType } = props
100
+ const { sourceUrl, thumbnailUrl, mimeType } = props
101
101
  const [playing, setPlaying] = useState(false)
102
102
  const [played, setPlayed] = useState(0)
103
103
  const [seeking, setSeeking] = useState(false)
@@ -137,7 +137,7 @@ const AudioPreview: React.FC<AudioPreviewProps> = (props) => {
137
137
  setPlaying(false)
138
138
  setPlayed(0)
139
139
  setAudioReady(false)
140
- }, [source])
140
+ }, [sourceUrl])
141
141
 
142
142
  const getFraction = useCallback(
143
143
  (e: MouseEvent | TouchEvent | React.MouseEvent | React.TouchEvent) => {
@@ -185,10 +185,10 @@ const AudioPreview: React.FC<AudioPreviewProps> = (props) => {
185
185
 
186
186
  return (
187
187
  <div className="relative">
188
- {source && (
188
+ {sourceUrl && (
189
189
  <audio
190
190
  ref={audioRef}
191
- src={source}
191
+ src={sourceUrl}
192
192
  loop
193
193
  onCanPlay={() => setAudioReady(true)}
194
194
  onEnded={() => {
@@ -200,12 +200,12 @@ const AudioPreview: React.FC<AudioPreviewProps> = (props) => {
200
200
  </audio>
201
201
  )}
202
202
  <CollapsedThumbnail
203
- thumbnail={thumbnail}
203
+ thumbnailUrl={thumbnailUrl}
204
204
  mimeType={mimeType}
205
- overlayIcon={source && audioReady ? (playing ? PauseIcon : PlayIcon) : undefined}
206
- onClick={source && audioReady ? toggle : undefined}
205
+ overlayIcon={sourceUrl && audioReady ? (playing ? PauseIcon : PlayIcon) : undefined}
206
+ onClick={sourceUrl && audioReady ? toggle : undefined}
207
207
  />
208
- {source && audioReady && (
208
+ {sourceUrl && audioReady && (
209
209
  <div className="absolute inset-x-0 bottom-0 px-3 pb-2.5 pt-6 bg-gradient-to-t from-black/40 to-transparent">
210
210
  <div
211
211
  ref={trackRef}
@@ -250,22 +250,22 @@ const AudioPreview: React.FC<AudioPreviewProps> = (props) => {
250
250
  }
251
251
 
252
252
  interface VideoPreviewProps {
253
- source?: string
254
- thumbnail?: string
253
+ sourceUrl?: string
254
+ thumbnailUrl?: string
255
255
  mimeType: string
256
256
  }
257
257
 
258
258
  const VideoPreview: React.FC<VideoPreviewProps> = (props) => {
259
- const { source, thumbnail, mimeType } = props
259
+ const { sourceUrl, thumbnailUrl, mimeType } = props
260
260
  const [expanded, setExpanded] = useState(false)
261
261
  const collapse = () => setExpanded(false)
262
262
 
263
263
  useEffect(() => {
264
264
  setExpanded(false)
265
- }, [source])
265
+ }, [sourceUrl])
266
266
 
267
- if (!source) {
268
- return <CollapsedThumbnail thumbnail={thumbnail} mimeType={mimeType} />
267
+ if (!sourceUrl) {
268
+ return <CollapsedThumbnail thumbnailUrl={thumbnailUrl} mimeType={mimeType} />
269
269
  }
270
270
 
271
271
  return (
@@ -275,9 +275,9 @@ const VideoPreview: React.FC<VideoPreviewProps> = (props) => {
275
275
  })}
276
276
  >
277
277
  <MediaPlayer
278
- source={source}
278
+ source={sourceUrl}
279
279
  mimeType={mimeType}
280
- poster={thumbnail}
280
+ poster={thumbnailUrl}
281
281
  playing={expanded}
282
282
  loop
283
283
  controls={false}
@@ -292,9 +292,9 @@ const VideoPreview: React.FC<VideoPreviewProps> = (props) => {
292
292
  onClick={() => setExpanded(true)}
293
293
  aria-label="Expand video preview"
294
294
  >
295
- {thumbnail ? (
295
+ {thumbnailUrl ? (
296
296
  <img
297
- src={thumbnail}
297
+ src={thumbnailUrl}
298
298
  alt=""
299
299
  className="absolute inset-0 h-full w-full object-cover"
300
300
  />
@@ -317,22 +317,22 @@ const VideoPreview: React.FC<VideoPreviewProps> = (props) => {
317
317
  }
318
318
 
319
319
  interface ImagePreviewProps {
320
- source?: string
321
- thumbnail?: string
320
+ sourceUrl?: string
321
+ thumbnailUrl?: string
322
322
  mimeType: string
323
323
  title?: string
324
324
  }
325
325
 
326
326
  const ImagePreview: React.FC<ImagePreviewProps> = (props) => {
327
- const { source, thumbnail, mimeType, title } = props
327
+ const { sourceUrl, thumbnailUrl, mimeType, title } = props
328
328
  const [expanded, setExpanded] = useState(false)
329
329
  const collapse = () => setExpanded(false)
330
330
 
331
331
  useEffect(() => {
332
332
  setExpanded(false)
333
- }, [source])
333
+ }, [sourceUrl])
334
334
 
335
- if (expanded && source) {
335
+ if (expanded && sourceUrl) {
336
336
  return (
337
337
  <div className="relative">
338
338
  <button
@@ -341,7 +341,7 @@ const ImagePreview: React.FC<ImagePreviewProps> = (props) => {
341
341
  onClick={collapse}
342
342
  aria-label="Close preview"
343
343
  >
344
- <img src={source} alt={title ?? ''} className="block w-full" />
344
+ <img src={sourceUrl} alt={title ?? ''} className="block w-full" />
345
345
  </button>
346
346
  <CloseButton onClose={collapse} />
347
347
  </div>
@@ -350,10 +350,10 @@ const ImagePreview: React.FC<ImagePreviewProps> = (props) => {
350
350
 
351
351
  return (
352
352
  <CollapsedThumbnail
353
- thumbnail={thumbnail}
353
+ thumbnailUrl={thumbnailUrl}
354
354
  mimeType={mimeType}
355
- overlayIcon={source ? EyeSlashIcon : undefined}
356
- onClick={source ? () => setExpanded(true) : undefined}
355
+ overlayIcon={sourceUrl ? EyeSlashIcon : undefined}
356
+ onClick={sourceUrl ? () => setExpanded(true) : undefined}
357
357
  />
358
358
  )
359
359
  }
@@ -363,8 +363,8 @@ const CreatorCard: React.FC<CreatorCardProps> = (props) => {
363
363
  const {
364
364
  title,
365
365
  mimeType = 'application/octet-stream',
366
- thumbnail,
367
- source,
366
+ thumbnailUrl,
367
+ sourceUrl,
368
368
  detail,
369
369
  amountText,
370
370
  placeholderTitle = 'Attachment title',
@@ -380,17 +380,17 @@ const CreatorCard: React.FC<CreatorCardProps> = (props) => {
380
380
  let mediaPreview: React.ReactNode
381
381
  if (isPreview && sourceType === 'audio') {
382
382
  mediaPreview = (
383
- <AudioPreview source={source} thumbnail={thumbnail} mimeType={mimeType} />
383
+ <AudioPreview sourceUrl={sourceUrl} thumbnailUrl={thumbnailUrl} mimeType={mimeType} />
384
384
  )
385
385
  } else if (isPreview && sourceType === 'video') {
386
386
  mediaPreview = (
387
- <VideoPreview source={source} thumbnail={thumbnail} mimeType={mimeType} />
387
+ <VideoPreview sourceUrl={sourceUrl} thumbnailUrl={thumbnailUrl} mimeType={mimeType} />
388
388
  )
389
389
  } else if (isPreview && sourceType === 'image') {
390
390
  mediaPreview = (
391
391
  <ImagePreview
392
- source={source}
393
- thumbnail={thumbnail}
392
+ sourceUrl={sourceUrl}
393
+ thumbnailUrl={thumbnailUrl}
394
394
  mimeType={mimeType}
395
395
  title={title}
396
396
  />
@@ -403,7 +403,7 @@ const CreatorCard: React.FC<CreatorCardProps> = (props) => {
403
403
  : LockIcon
404
404
  mediaPreview = (
405
405
  <CollapsedThumbnail
406
- thumbnail={thumbnail}
406
+ thumbnailUrl={thumbnailUrl}
407
407
  mimeType={mimeType}
408
408
  overlayIcon={lockedOverlayIcon}
409
409
  darkOverlay
@@ -412,7 +412,7 @@ const CreatorCard: React.FC<CreatorCardProps> = (props) => {
412
412
  }
413
413
 
414
414
  return (
415
- <div className="relative w-[280px] select-none overflow-hidden rounded-[24px] bg-white shadow-card">
415
+ <div className="relative w-[280px] select-none overflow-hidden rounded-[24px] bg-white shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_4px_8px_rgba(0,0,0,0.06)]">
416
416
  {onDismiss && (
417
417
  <button
418
418
  type="button"
@@ -197,14 +197,15 @@ const MediaPlayer: React.FC<MediaPlayerProps> = ({
197
197
  if (controls) setPlaying((p) => !p)
198
198
  }}
199
199
  >
200
- {poster && (
200
+ {/* For audio, poster persists as a visual background. For video, hide once loaded. */}
201
+ {poster && (sourceType === 'audio' || initialLoad) && (
201
202
  <img
202
203
  src={poster}
203
204
  alt=""
204
205
  className="absolute inset-0 h-full w-full object-cover"
205
206
  />
206
207
  )}
207
- {!poster && (
208
+ {!poster && (sourceType === 'audio' || initialLoad) && (
208
209
  <div className="absolute inset-0 flex items-center justify-center">
209
210
  {renderTypeIcon(mimeType, {
210
211
  className: 'size-12 text-black/20',
@@ -212,11 +213,6 @@ const MediaPlayer: React.FC<MediaPlayerProps> = ({
212
213
  })}
213
214
  </div>
214
215
  )}
215
- {initialLoad && poster && (
216
- <div className="absolute inset-0 z-20">
217
- <img src={poster} alt="" className="h-full w-full object-cover" />
218
- </div>
219
- )}
220
216
  <div className="absolute inset-0">
221
217
  {sourceType === 'audio' ? (
222
218
  <audio
@@ -242,7 +238,6 @@ const MediaPlayer: React.FC<MediaPlayerProps> = ({
242
238
  <video
243
239
  ref={playerRef as React.RefObject<HTMLVideoElement>}
244
240
  src={source}
245
- poster={poster}
246
241
  loop={loop}
247
242
  muted={muted}
248
243
  playsInline