@shohojdhara/atomix 0.2.9 → 0.3.1
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/CHANGELOG.md +4 -0
- package/dist/atomix.css +309 -105
- package/dist/atomix.min.css +3 -5
- package/dist/index.d.ts +807 -51
- package/dist/index.esm.js +16367 -16405
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +16277 -16330
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/themes/applemix.css +309 -105
- package/dist/themes/applemix.min.css +5 -7
- package/dist/themes/boomdevs.css +202 -10
- package/dist/themes/boomdevs.min.css +3 -5
- package/dist/themes/esrar.css +309 -105
- package/dist/themes/esrar.min.css +4 -6
- package/dist/themes/flashtrade.css +310 -105
- package/dist/themes/flashtrade.min.css +5 -7
- package/dist/themes/mashroom.css +300 -96
- package/dist/themes/mashroom.min.css +4 -6
- package/dist/themes/shaj-default.css +300 -96
- package/dist/themes/shaj-default.min.css +4 -6
- package/package.json +1 -1
- package/src/components/AtomixGlass/AtomixGlass.test.tsx +21 -32
- package/src/components/AtomixGlass/AtomixGlass.tsx +55 -42
- package/src/components/AtomixGlass/AtomixGlassContainer.tsx +205 -57
- package/src/components/AtomixGlass/GlassFilter.tsx +22 -8
- package/src/components/AtomixGlass/__snapshots__/AtomixGlass.test.tsx.snap +221 -0
- package/src/components/AtomixGlass/atomixGLass.old.tsx +0 -3
- package/src/components/AtomixGlass/shader-utils.ts +8 -0
- package/src/components/AtomixGlass/stories/AtomixGlass.stories.tsx +319 -100
- package/src/components/AtomixGlass/stories/Examples.stories.tsx +601 -105
- package/src/components/AtomixGlass/stories/Modes.stories.tsx +30 -12
- package/src/components/AtomixGlass/stories/Playground.stories.tsx +173 -38
- package/src/components/AtomixGlass/stories/ShaderVariants.stories.tsx +18 -18
- package/src/components/AtomixGlass/stories/shared-components.tsx +27 -5
- package/src/components/Breadcrumb/Breadcrumb.tsx +8 -3
- package/src/components/Button/Button.tsx +62 -17
- package/src/components/Callout/Callout.test.tsx +8 -14
- package/src/components/Card/Card.tsx +103 -1
- package/src/components/Card/index.ts +3 -2
- package/src/components/Footer/Footer.stories.tsx +1 -2
- package/src/components/Footer/Footer.tsx +0 -5
- package/src/components/Footer/FooterLink.tsx +3 -2
- package/src/components/Footer/FooterSection.tsx +0 -7
- package/src/components/Icon/index.ts +1 -1
- package/src/components/Modal/Modal.stories.tsx +29 -38
- package/src/components/Modal/Modal.tsx +4 -4
- package/src/components/Navigation/Nav/NavItem.tsx +8 -3
- package/src/components/Navigation/SideMenu/SideMenu.tsx +49 -41
- package/src/components/Navigation/SideMenu/SideMenuItem.tsx +63 -19
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/VideoPlayer/VideoPlayer.stories.tsx +977 -400
- package/src/components/VideoPlayer/VideoPlayer.tsx +1 -6
- package/src/lib/composables/shared-mouse-tracker.ts +133 -0
- package/src/lib/composables/useAtomixGlass.ts +303 -115
- package/src/lib/theme/ThemeManager.integration.test.ts +124 -0
- package/src/lib/theme/ThemeManager.stories.tsx +13 -13
- package/src/lib/theme/ThemeManager.test.ts +4 -0
- package/src/lib/theme/ThemeManager.ts +203 -59
- package/src/lib/theme/ThemeProvider.tsx +183 -33
- package/src/lib/theme/composeTheme.ts +375 -0
- package/src/lib/theme/createTheme.test.ts +475 -0
- package/src/lib/theme/createTheme.ts +510 -0
- package/src/lib/theme/generateCSSVariables.ts +713 -0
- package/src/lib/theme/index.ts +67 -0
- package/src/lib/theme/themeUtils.ts +333 -0
- package/src/lib/theme/types.ts +337 -8
- package/src/lib/theme/useTheme.test.tsx +2 -1
- package/src/lib/theme/useTheme.ts +6 -22
- package/src/lib/types/components.ts +152 -57
- package/src/styles/01-settings/_index.scss +2 -2
- package/src/styles/01-settings/_settings.badge.scss +2 -2
- package/src/styles/01-settings/_settings.border-radius.scss +1 -1
- package/src/styles/01-settings/{_settings.maps.scss → _settings.design-tokens.scss} +163 -49
- package/src/styles/01-settings/_settings.modal.scss +1 -1
- package/src/styles/01-settings/_settings.spacing.scss +14 -13
- package/src/styles/03-generic/_generic.root.scss +131 -50
- package/src/styles/05-objects/_objects.block.scss +1 -1
- package/src/styles/06-components/_components.atomix-glass.scss +20 -22
- package/src/styles/06-components/_components.badge.scss +2 -2
- package/src/styles/06-components/_components.button.scss +1 -1
- package/src/styles/06-components/_components.callout.scss +1 -1
- package/src/styles/06-components/_components.card.scss +74 -2
- package/src/styles/06-components/_components.chart.scss +1 -1
- package/src/styles/06-components/_components.dropdown.scss +6 -0
- package/src/styles/06-components/_components.footer.scss +1 -1
- package/src/styles/06-components/_components.list-group.scss +1 -1
- package/src/styles/06-components/_components.list.scss +1 -1
- package/src/styles/06-components/_components.menu.scss +1 -1
- package/src/styles/06-components/_components.messages.scss +1 -1
- package/src/styles/06-components/_components.modal.scss +7 -2
- package/src/styles/06-components/_components.navbar.scss +1 -1
- package/src/styles/06-components/_components.popover.scss +10 -0
- package/src/styles/06-components/_components.product-review.scss +1 -1
- package/src/styles/06-components/_components.progress.scss +1 -1
- package/src/styles/06-components/_components.rating.scss +1 -1
- package/src/styles/06-components/_components.spinner.scss +1 -1
- package/src/styles/99-utilities/_utilities.background.scss +1 -1
- package/src/styles/99-utilities/_utilities.border.scss +1 -1
- package/src/styles/99-utilities/_utilities.link.scss +1 -1
- package/src/styles/99-utilities/_utilities.text.scss +1 -1
|
@@ -190,90 +190,6 @@ interface BackgroundWrapperProps {
|
|
|
190
190
|
interactive?: boolean;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
const backgroundImages = [
|
|
194
|
-
// 0: Tech gradient - modern, professional
|
|
195
|
-
'https://images.unsplash.com/photo-1636690636968-4568d7e94fe7?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',
|
|
196
|
-
// 1: Purple cosmic - entertainment focused
|
|
197
|
-
'https://images.unsplash.com/photo-1534796636912-3b95b3ab5986?q=80&w=2071&auto=format&fit=crop',
|
|
198
|
-
// 2: Cinematic landscape - movie/video theme
|
|
199
|
-
'https://images.unsplash.com/photo-1506905925346-21bda4d32df4?q=80&w=2070&auto=format&fit=crop',
|
|
200
|
-
// 3: Abstract waves - fluid, dynamic
|
|
201
|
-
'https://images.unsplash.com/photo-1614850715649-1d0106293bd1?q=80&w=2070&auto=format&fit=crop',
|
|
202
|
-
// 4: Gaming/streaming setup
|
|
203
|
-
'https://images.unsplash.com/photo-1493711662062-fa541adb3fc8?q=80&w=2070&auto=format&fit=crop',
|
|
204
|
-
];
|
|
205
|
-
|
|
206
|
-
const BackgroundWrapper = ({
|
|
207
|
-
children,
|
|
208
|
-
backgroundImage,
|
|
209
|
-
backgroundIndex,
|
|
210
|
-
overlay = false,
|
|
211
|
-
overlayColor = 'rgba(0,0,0,0)',
|
|
212
|
-
overlayOpacity = 1,
|
|
213
|
-
height = '90vh',
|
|
214
|
-
width = '90vw',
|
|
215
|
-
borderRadius = '12px',
|
|
216
|
-
padding = '24px',
|
|
217
|
-
className = '',
|
|
218
|
-
style = {},
|
|
219
|
-
}: BackgroundWrapperProps) => {
|
|
220
|
-
const bgImage =
|
|
221
|
-
backgroundIndex !== undefined ? backgroundImages[backgroundIndex] : backgroundImage;
|
|
222
|
-
const finalOverlayColor = overlay ? 'rgba(0,0,0,0.5)' : overlayColor;
|
|
223
|
-
const finalOverlayOpacity = overlay ? 0.5 : overlayOpacity;
|
|
224
|
-
|
|
225
|
-
return (
|
|
226
|
-
<div
|
|
227
|
-
className={`atomix-video-background ${className}`}
|
|
228
|
-
style={{
|
|
229
|
-
position: 'relative',
|
|
230
|
-
width: width,
|
|
231
|
-
minHeight: height,
|
|
232
|
-
height: '100%',
|
|
233
|
-
backgroundImage: bgImage ? `url(${bgImage})` : undefined,
|
|
234
|
-
backgroundColor: !bgImage ? '#0f0f23' : undefined,
|
|
235
|
-
backgroundSize: 'cover',
|
|
236
|
-
backgroundPosition: 'center',
|
|
237
|
-
backgroundAttachment: 'fixed',
|
|
238
|
-
display: 'flex',
|
|
239
|
-
alignItems: 'center',
|
|
240
|
-
justifyContent: 'center',
|
|
241
|
-
borderRadius: borderRadius,
|
|
242
|
-
padding: padding,
|
|
243
|
-
...style,
|
|
244
|
-
}}
|
|
245
|
-
>
|
|
246
|
-
{finalOverlayOpacity > 0 && (
|
|
247
|
-
<div
|
|
248
|
-
style={{
|
|
249
|
-
position: 'absolute',
|
|
250
|
-
top: 0,
|
|
251
|
-
left: 0,
|
|
252
|
-
right: 0,
|
|
253
|
-
bottom: 0,
|
|
254
|
-
backgroundColor: finalOverlayColor,
|
|
255
|
-
opacity: finalOverlayOpacity,
|
|
256
|
-
zIndex: 1,
|
|
257
|
-
}}
|
|
258
|
-
/>
|
|
259
|
-
)}
|
|
260
|
-
<div
|
|
261
|
-
style={{
|
|
262
|
-
position: 'relative',
|
|
263
|
-
width: '100%',
|
|
264
|
-
height: '100%',
|
|
265
|
-
display: 'flex',
|
|
266
|
-
alignItems: 'center',
|
|
267
|
-
justifyContent: 'center',
|
|
268
|
-
zIndex: 2,
|
|
269
|
-
}}
|
|
270
|
-
>
|
|
271
|
-
{children}
|
|
272
|
-
</div>
|
|
273
|
-
</div>
|
|
274
|
-
);
|
|
275
|
-
};
|
|
276
|
-
|
|
277
193
|
/**
|
|
278
194
|
* Sample video URLs and configurations
|
|
279
195
|
*/
|
|
@@ -318,6 +234,10 @@ const videoSources = {
|
|
|
318
234
|
poster:
|
|
319
235
|
'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/WeAreGoingOnBullrun.jpg',
|
|
320
236
|
},
|
|
237
|
+
snow: {
|
|
238
|
+
src: 'https://cdn.pixabay.com/video/2025/10/22/311442_large.mp4',
|
|
239
|
+
poster: 'https://cdn.pixabay.com/video/2025/10/22/311442_large.jpg',
|
|
240
|
+
},
|
|
321
241
|
};
|
|
322
242
|
|
|
323
243
|
const sampleVideo = videoSources.sintel.src;
|
|
@@ -361,8 +281,9 @@ const sampleSubtitles = [
|
|
|
361
281
|
];
|
|
362
282
|
|
|
363
283
|
/**
|
|
364
|
-
* Default VideoPlayer
|
|
284
|
+
* 🎬 Hero Showcase - Default VideoPlayer
|
|
365
285
|
*
|
|
286
|
+
* A stunning showcase of the VideoPlayer component with premium design.
|
|
366
287
|
* Demonstrates the component with balanced settings suitable for most use cases.
|
|
367
288
|
* Features clean, modern controls and responsive design.
|
|
368
289
|
*/
|
|
@@ -370,11 +291,14 @@ export const Default: Story = {
|
|
|
370
291
|
args: {
|
|
371
292
|
src: videoSources.sintel.src,
|
|
372
293
|
poster: videoSources.sintel.poster,
|
|
373
|
-
width: '
|
|
374
|
-
height: '
|
|
294
|
+
width: '900px',
|
|
295
|
+
height: '506px',
|
|
375
296
|
controls: true,
|
|
376
297
|
showSettings: true,
|
|
298
|
+
showDownload: true,
|
|
299
|
+
showShare: true,
|
|
377
300
|
quality: sampleQualities,
|
|
301
|
+
subtitles: sampleSubtitles,
|
|
378
302
|
onPlay: fn(),
|
|
379
303
|
onPause: fn(),
|
|
380
304
|
onEnded: fn(),
|
|
@@ -385,15 +309,59 @@ export const Default: Story = {
|
|
|
385
309
|
},
|
|
386
310
|
decorators: [
|
|
387
311
|
Story => (
|
|
388
|
-
<
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
312
|
+
<div
|
|
313
|
+
style={{
|
|
314
|
+
display: 'flex',
|
|
315
|
+
flexDirection: 'column',
|
|
316
|
+
alignItems: 'center',
|
|
317
|
+
gap: '30px',
|
|
318
|
+
width: '100%',
|
|
319
|
+
}}
|
|
394
320
|
>
|
|
395
|
-
<
|
|
396
|
-
|
|
321
|
+
<div style={{ textAlign: 'center', maxWidth: '800px' }}>
|
|
322
|
+
<h1
|
|
323
|
+
style={{
|
|
324
|
+
margin: '0 0 16px 0',
|
|
325
|
+
fontSize: '48px',
|
|
326
|
+
fontWeight: '700',
|
|
327
|
+
color: 'white',
|
|
328
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.5)',
|
|
329
|
+
letterSpacing: '-0.02em',
|
|
330
|
+
}}
|
|
331
|
+
>
|
|
332
|
+
🎥 VideoPlayer
|
|
333
|
+
</h1>
|
|
334
|
+
<p
|
|
335
|
+
style={{
|
|
336
|
+
margin: '0 0 8px 0',
|
|
337
|
+
fontSize: '20px',
|
|
338
|
+
color: 'rgba(255,255,255,0.9)',
|
|
339
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
340
|
+
fontWeight: '400',
|
|
341
|
+
}}
|
|
342
|
+
>
|
|
343
|
+
Premium video player with advanced features
|
|
344
|
+
</p>
|
|
345
|
+
<p
|
|
346
|
+
style={{
|
|
347
|
+
margin: 0,
|
|
348
|
+
fontSize: '16px',
|
|
349
|
+
color: 'rgba(255,255,255,0.7)',
|
|
350
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.3)',
|
|
351
|
+
}}
|
|
352
|
+
>
|
|
353
|
+
Modern controls • Quality selection • Multi-language subtitles • Glass effects
|
|
354
|
+
</p>
|
|
355
|
+
</div>
|
|
356
|
+
<div
|
|
357
|
+
style={{
|
|
358
|
+
borderRadius: '16px',
|
|
359
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
360
|
+
}}
|
|
361
|
+
>
|
|
362
|
+
<Story />
|
|
363
|
+
</div>
|
|
364
|
+
</div>
|
|
397
365
|
),
|
|
398
366
|
],
|
|
399
367
|
parameters: {
|
|
@@ -407,14 +375,17 @@ export const Default: Story = {
|
|
|
407
375
|
};
|
|
408
376
|
|
|
409
377
|
/**
|
|
410
|
-
* YouTube Integration
|
|
378
|
+
* 📺 YouTube Integration - ID Method
|
|
379
|
+
*
|
|
380
|
+
* Seamless YouTube integration using the youtubeId prop.
|
|
381
|
+
* Automatically uses YouTube's native player with all standard features.
|
|
411
382
|
*/
|
|
412
383
|
export const YouTubeEmbed: Story = {
|
|
413
384
|
args: {
|
|
414
385
|
type: 'youtube',
|
|
415
386
|
youtubeId: 'eIho2S0ZahI',
|
|
416
|
-
width: '
|
|
417
|
-
height: '
|
|
387
|
+
width: '900px',
|
|
388
|
+
height: '506px',
|
|
418
389
|
autoplay: false,
|
|
419
390
|
muted: false,
|
|
420
391
|
onPlay: fn(),
|
|
@@ -423,9 +394,47 @@ export const YouTubeEmbed: Story = {
|
|
|
423
394
|
},
|
|
424
395
|
decorators: [
|
|
425
396
|
Story => (
|
|
426
|
-
<
|
|
427
|
-
|
|
428
|
-
|
|
397
|
+
<div
|
|
398
|
+
style={{
|
|
399
|
+
display: 'flex',
|
|
400
|
+
flexDirection: 'column',
|
|
401
|
+
alignItems: 'center',
|
|
402
|
+
gap: '24px',
|
|
403
|
+
width: '100%',
|
|
404
|
+
}}
|
|
405
|
+
>
|
|
406
|
+
<div style={{ textAlign: 'center' }}>
|
|
407
|
+
<h2
|
|
408
|
+
style={{
|
|
409
|
+
margin: '0 0 12px 0',
|
|
410
|
+
fontSize: '36px',
|
|
411
|
+
fontWeight: '700',
|
|
412
|
+
color: 'white',
|
|
413
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.5)',
|
|
414
|
+
}}
|
|
415
|
+
>
|
|
416
|
+
📺 YouTube Integration
|
|
417
|
+
</h2>
|
|
418
|
+
<p
|
|
419
|
+
style={{
|
|
420
|
+
margin: 0,
|
|
421
|
+
fontSize: '18px',
|
|
422
|
+
color: 'rgba(255,255,255,0.85)',
|
|
423
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
424
|
+
}}
|
|
425
|
+
>
|
|
426
|
+
Native YouTube player with seamless embedding
|
|
427
|
+
</p>
|
|
428
|
+
</div>
|
|
429
|
+
<div
|
|
430
|
+
style={{
|
|
431
|
+
borderRadius: '16px',
|
|
432
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
433
|
+
}}
|
|
434
|
+
>
|
|
435
|
+
<Story />
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
429
438
|
),
|
|
430
439
|
],
|
|
431
440
|
parameters: {
|
|
@@ -441,8 +450,8 @@ export const YouTubeEmbed: Story = {
|
|
|
441
450
|
export const YouTubeURL: Story = {
|
|
442
451
|
args: {
|
|
443
452
|
src: 'https://www.youtube.com/watch?v=eIho2S0ZahI',
|
|
444
|
-
width: '
|
|
445
|
-
height: '
|
|
453
|
+
width: '900px',
|
|
454
|
+
height: '506px',
|
|
446
455
|
autoplay: false,
|
|
447
456
|
muted: false,
|
|
448
457
|
onPlay: fn(),
|
|
@@ -451,9 +460,47 @@ export const YouTubeURL: Story = {
|
|
|
451
460
|
},
|
|
452
461
|
decorators: [
|
|
453
462
|
Story => (
|
|
454
|
-
<
|
|
455
|
-
|
|
456
|
-
|
|
463
|
+
<div
|
|
464
|
+
style={{
|
|
465
|
+
display: 'flex',
|
|
466
|
+
flexDirection: 'column',
|
|
467
|
+
alignItems: 'center',
|
|
468
|
+
gap: '24px',
|
|
469
|
+
width: '100%',
|
|
470
|
+
}}
|
|
471
|
+
>
|
|
472
|
+
<div style={{ textAlign: 'center' }}>
|
|
473
|
+
<h2
|
|
474
|
+
style={{
|
|
475
|
+
margin: '0 0 12px 0',
|
|
476
|
+
fontSize: '36px',
|
|
477
|
+
fontWeight: '700',
|
|
478
|
+
color: 'white',
|
|
479
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.5)',
|
|
480
|
+
}}
|
|
481
|
+
>
|
|
482
|
+
🔗 YouTube URL Detection
|
|
483
|
+
</h2>
|
|
484
|
+
<p
|
|
485
|
+
style={{
|
|
486
|
+
margin: 0,
|
|
487
|
+
fontSize: '18px',
|
|
488
|
+
color: 'rgba(255,255,255,0.85)',
|
|
489
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
490
|
+
}}
|
|
491
|
+
>
|
|
492
|
+
Automatic YouTube URL detection and embedding
|
|
493
|
+
</p>
|
|
494
|
+
</div>
|
|
495
|
+
<div
|
|
496
|
+
style={{
|
|
497
|
+
borderRadius: '16px',
|
|
498
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
499
|
+
}}
|
|
500
|
+
>
|
|
501
|
+
<Story />
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
457
504
|
),
|
|
458
505
|
],
|
|
459
506
|
parameters: {
|
|
@@ -467,14 +514,17 @@ export const YouTubeURL: Story = {
|
|
|
467
514
|
};
|
|
468
515
|
|
|
469
516
|
/**
|
|
470
|
-
* Advanced Features Showcase
|
|
517
|
+
* ⚡ Advanced Features Showcase
|
|
518
|
+
*
|
|
519
|
+
* Complete showcase of all VideoPlayer features including quality selection,
|
|
520
|
+
* subtitles, playback speed controls, download/share buttons, and comprehensive settings menu.
|
|
471
521
|
*/
|
|
472
522
|
export const AdvancedFeatures: Story = {
|
|
473
523
|
args: {
|
|
474
524
|
src: videoSources.bigBuckBunny.src,
|
|
475
525
|
poster: videoSources.bigBuckBunny.poster,
|
|
476
|
-
width: '
|
|
477
|
-
height: '
|
|
526
|
+
width: '1000px',
|
|
527
|
+
height: '562px',
|
|
478
528
|
controls: true,
|
|
479
529
|
showDownload: true,
|
|
480
530
|
showShare: true,
|
|
@@ -493,9 +543,84 @@ export const AdvancedFeatures: Story = {
|
|
|
493
543
|
},
|
|
494
544
|
decorators: [
|
|
495
545
|
Story => (
|
|
496
|
-
<
|
|
497
|
-
|
|
498
|
-
|
|
546
|
+
<div
|
|
547
|
+
style={{
|
|
548
|
+
display: 'flex',
|
|
549
|
+
flexDirection: 'column',
|
|
550
|
+
alignItems: 'center',
|
|
551
|
+
gap: '40px',
|
|
552
|
+
width: '100%',
|
|
553
|
+
}}
|
|
554
|
+
>
|
|
555
|
+
<div style={{ textAlign: 'center', maxWidth: '900px' }}>
|
|
556
|
+
<h2
|
|
557
|
+
style={{
|
|
558
|
+
margin: '0 0 16px 0',
|
|
559
|
+
fontSize: '42px',
|
|
560
|
+
fontWeight: '700',
|
|
561
|
+
color: 'white',
|
|
562
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
563
|
+
}}
|
|
564
|
+
>
|
|
565
|
+
⚡ Advanced Features
|
|
566
|
+
</h2>
|
|
567
|
+
<p
|
|
568
|
+
style={{
|
|
569
|
+
margin: '0 0 12px 0',
|
|
570
|
+
fontSize: '20px',
|
|
571
|
+
color: 'rgba(255,255,255,0.95)',
|
|
572
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
573
|
+
fontWeight: '500',
|
|
574
|
+
}}
|
|
575
|
+
>
|
|
576
|
+
Everything you need for professional video playback
|
|
577
|
+
</p>
|
|
578
|
+
<div
|
|
579
|
+
style={{
|
|
580
|
+
display: 'flex',
|
|
581
|
+
flexWrap: 'wrap',
|
|
582
|
+
gap: '12px',
|
|
583
|
+
justifyContent: 'center',
|
|
584
|
+
marginTop: '20px',
|
|
585
|
+
}}
|
|
586
|
+
>
|
|
587
|
+
{[
|
|
588
|
+
'Quality Selection',
|
|
589
|
+
'Multi-language Subtitles',
|
|
590
|
+
'Playback Speed Control',
|
|
591
|
+
'Download & Share',
|
|
592
|
+
'Settings Menu',
|
|
593
|
+
'Keyboard Shortcuts',
|
|
594
|
+
].map(feature => (
|
|
595
|
+
<span
|
|
596
|
+
key={feature}
|
|
597
|
+
style={{
|
|
598
|
+
background: 'rgba(255,255,255,0.15)',
|
|
599
|
+
backdropFilter: 'blur(10px)',
|
|
600
|
+
border: '1px solid rgba(255,255,255,0.2)',
|
|
601
|
+
borderRadius: '20px',
|
|
602
|
+
padding: '8px 16px',
|
|
603
|
+
fontSize: '14px',
|
|
604
|
+
color: 'white',
|
|
605
|
+
fontWeight: '500',
|
|
606
|
+
textShadow: '0 1px 3px rgba(0,0,0,0.3)',
|
|
607
|
+
}}
|
|
608
|
+
>
|
|
609
|
+
✨ {feature}
|
|
610
|
+
</span>
|
|
611
|
+
))}
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
614
|
+
<div
|
|
615
|
+
style={{
|
|
616
|
+
borderRadius: '20px',
|
|
617
|
+
boxShadow: '0 25px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.15)',
|
|
618
|
+
transform: 'perspective(1000px) rotateX(2deg)',
|
|
619
|
+
}}
|
|
620
|
+
>
|
|
621
|
+
<Story />
|
|
622
|
+
</div>
|
|
623
|
+
</div>
|
|
499
624
|
),
|
|
500
625
|
],
|
|
501
626
|
parameters: {
|
|
@@ -509,14 +634,17 @@ export const AdvancedFeatures: Story = {
|
|
|
509
634
|
};
|
|
510
635
|
|
|
511
636
|
/**
|
|
512
|
-
* Ambient Mode
|
|
637
|
+
* 🌈 Ambient Mode - YouTube-Style Glow
|
|
638
|
+
*
|
|
639
|
+
* Ambient mode creates a YouTube-style background glow effect that extends
|
|
640
|
+
* the video colors beyond the player boundaries, creating an immersive viewing experience.
|
|
513
641
|
*/
|
|
514
642
|
export const AmbientMode: Story = {
|
|
515
643
|
args: {
|
|
516
644
|
src: videoSources.elephantsDream.src,
|
|
517
645
|
poster: samplePoster,
|
|
518
|
-
width: '
|
|
519
|
-
height: '
|
|
646
|
+
width: '900px',
|
|
647
|
+
height: '506px',
|
|
520
648
|
ambientMode: true,
|
|
521
649
|
autoplay: true,
|
|
522
650
|
muted: true,
|
|
@@ -531,16 +659,60 @@ export const AmbientMode: Story = {
|
|
|
531
659
|
},
|
|
532
660
|
decorators: [
|
|
533
661
|
Story => (
|
|
534
|
-
<
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
662
|
+
<div>
|
|
663
|
+
<div
|
|
664
|
+
style={{
|
|
665
|
+
display: 'flex',
|
|
666
|
+
flexDirection: 'column',
|
|
667
|
+
alignItems: 'center',
|
|
668
|
+
gap: '30px',
|
|
669
|
+
width: '100%',
|
|
670
|
+
}}
|
|
671
|
+
>
|
|
672
|
+
<div style={{ textAlign: 'center', maxWidth: '800px' }}>
|
|
673
|
+
<h2
|
|
674
|
+
style={{
|
|
675
|
+
margin: '0 0 16px 0',
|
|
676
|
+
fontSize: '42px',
|
|
677
|
+
fontWeight: '700',
|
|
678
|
+
color: 'white',
|
|
679
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.7)',
|
|
680
|
+
}}
|
|
681
|
+
>
|
|
682
|
+
🌈 Ambient Mode
|
|
683
|
+
</h2>
|
|
684
|
+
<p
|
|
685
|
+
style={{
|
|
686
|
+
margin: '0 0 8px 0',
|
|
687
|
+
fontSize: '20px',
|
|
688
|
+
color: 'rgba(255,255,255,0.95)',
|
|
689
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.5)',
|
|
690
|
+
fontWeight: '500',
|
|
691
|
+
}}
|
|
692
|
+
>
|
|
693
|
+
YouTube-style immersive viewing experience
|
|
694
|
+
</p>
|
|
695
|
+
<p
|
|
696
|
+
style={{
|
|
697
|
+
margin: 0,
|
|
698
|
+
fontSize: '16px',
|
|
699
|
+
color: 'rgba(255,255,255,0.75)',
|
|
700
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.4)',
|
|
701
|
+
}}
|
|
702
|
+
>
|
|
703
|
+
Watch how the video colors extend beyond the player boundaries
|
|
704
|
+
</p>
|
|
705
|
+
</div>
|
|
706
|
+
<div
|
|
707
|
+
style={{
|
|
708
|
+
borderRadius: '20px',
|
|
709
|
+
boxShadow: '0 30px 100px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
710
|
+
}}
|
|
711
|
+
>
|
|
712
|
+
<Story />
|
|
713
|
+
</div>
|
|
714
|
+
</div>
|
|
715
|
+
</div>
|
|
544
716
|
),
|
|
545
717
|
],
|
|
546
718
|
parameters: {
|
|
@@ -554,14 +726,17 @@ export const AmbientMode: Story = {
|
|
|
554
726
|
};
|
|
555
727
|
|
|
556
728
|
/**
|
|
557
|
-
* Glass Morphism
|
|
729
|
+
* ✨ Glass Morphism Effect
|
|
730
|
+
*
|
|
731
|
+
* VideoPlayer with glass morphism effects overlay. The translucent glass layer
|
|
732
|
+
* adds visual depth and modern aesthetics while maintaining full functionality.
|
|
558
733
|
*/
|
|
559
734
|
export const GlassEffect: Story = {
|
|
560
735
|
args: {
|
|
561
736
|
src: videoSources.forBiggerBlazes.src,
|
|
562
737
|
poster: videoSources.forBiggerBlazes.poster,
|
|
563
|
-
width: '
|
|
564
|
-
height: '
|
|
738
|
+
width: '900px',
|
|
739
|
+
height: '506px',
|
|
565
740
|
glass: true,
|
|
566
741
|
glassOpacity: 0.4,
|
|
567
742
|
controls: true,
|
|
@@ -579,9 +754,58 @@ export const GlassEffect: Story = {
|
|
|
579
754
|
},
|
|
580
755
|
decorators: [
|
|
581
756
|
Story => (
|
|
582
|
-
<
|
|
583
|
-
|
|
584
|
-
|
|
757
|
+
<div
|
|
758
|
+
style={{
|
|
759
|
+
display: 'flex',
|
|
760
|
+
flexDirection: 'column',
|
|
761
|
+
alignItems: 'center',
|
|
762
|
+
gap: '30px',
|
|
763
|
+
width: '100%',
|
|
764
|
+
}}
|
|
765
|
+
>
|
|
766
|
+
<div style={{ textAlign: 'center', maxWidth: '800px' }}>
|
|
767
|
+
<h2
|
|
768
|
+
style={{
|
|
769
|
+
margin: '0 0 16px 0',
|
|
770
|
+
fontSize: '42px',
|
|
771
|
+
fontWeight: '700',
|
|
772
|
+
color: 'white',
|
|
773
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
774
|
+
}}
|
|
775
|
+
>
|
|
776
|
+
✨ Glass Morphism
|
|
777
|
+
</h2>
|
|
778
|
+
<p
|
|
779
|
+
style={{
|
|
780
|
+
margin: '0 0 8px 0',
|
|
781
|
+
fontSize: '20px',
|
|
782
|
+
color: 'rgba(255,255,255,0.95)',
|
|
783
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
784
|
+
fontWeight: '500',
|
|
785
|
+
}}
|
|
786
|
+
>
|
|
787
|
+
Modern frosted glass effect overlay
|
|
788
|
+
</p>
|
|
789
|
+
<p
|
|
790
|
+
style={{
|
|
791
|
+
margin: 0,
|
|
792
|
+
fontSize: '16px',
|
|
793
|
+
color: 'rgba(255,255,255,0.75)',
|
|
794
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.4)',
|
|
795
|
+
}}
|
|
796
|
+
>
|
|
797
|
+
Translucent glass layer with blur and depth effects
|
|
798
|
+
</p>
|
|
799
|
+
</div>
|
|
800
|
+
<div
|
|
801
|
+
style={{
|
|
802
|
+
borderRadius: '20px',
|
|
803
|
+
boxShadow: '0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15)',
|
|
804
|
+
}}
|
|
805
|
+
>
|
|
806
|
+
<Story />
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
585
809
|
),
|
|
586
810
|
],
|
|
587
811
|
parameters: {
|
|
@@ -598,8 +822,8 @@ export const GlassCustom: Story = {
|
|
|
598
822
|
args: {
|
|
599
823
|
src: videoSources.tearsOfSteel.src,
|
|
600
824
|
poster: videoSources.tearsOfSteel.poster,
|
|
601
|
-
width: '
|
|
602
|
-
height: '
|
|
825
|
+
width: '900px',
|
|
826
|
+
height: '506px',
|
|
603
827
|
glass: {
|
|
604
828
|
displacementScale: 35,
|
|
605
829
|
blurAmount: 0.25,
|
|
@@ -627,16 +851,58 @@ export const GlassCustom: Story = {
|
|
|
627
851
|
},
|
|
628
852
|
decorators: [
|
|
629
853
|
Story => (
|
|
630
|
-
<
|
|
854
|
+
<div
|
|
631
855
|
style={{
|
|
632
|
-
|
|
856
|
+
display: 'flex',
|
|
857
|
+
flexDirection: 'column',
|
|
858
|
+
alignItems: 'center',
|
|
859
|
+
gap: '30px',
|
|
860
|
+
width: '100%',
|
|
633
861
|
}}
|
|
634
|
-
height="75vh"
|
|
635
|
-
width="90vw"
|
|
636
|
-
padding="60px"
|
|
637
862
|
>
|
|
638
|
-
<
|
|
639
|
-
|
|
863
|
+
<div style={{ textAlign: 'center', maxWidth: '800px' }}>
|
|
864
|
+
<h2
|
|
865
|
+
style={{
|
|
866
|
+
margin: '0 0 16px 0',
|
|
867
|
+
fontSize: '42px',
|
|
868
|
+
fontWeight: '700',
|
|
869
|
+
color: 'white',
|
|
870
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.7)',
|
|
871
|
+
}}
|
|
872
|
+
>
|
|
873
|
+
🎨 Custom Glass Configuration
|
|
874
|
+
</h2>
|
|
875
|
+
<p
|
|
876
|
+
style={{
|
|
877
|
+
margin: '0 0 8px 0',
|
|
878
|
+
fontSize: '20px',
|
|
879
|
+
color: 'rgba(255,255,255,0.95)',
|
|
880
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.5)',
|
|
881
|
+
fontWeight: '500',
|
|
882
|
+
}}
|
|
883
|
+
>
|
|
884
|
+
Fully customizable glass morphism effects
|
|
885
|
+
</p>
|
|
886
|
+
<p
|
|
887
|
+
style={{
|
|
888
|
+
margin: 0,
|
|
889
|
+
fontSize: '16px',
|
|
890
|
+
color: 'rgba(255,255,255,0.85)',
|
|
891
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.4)',
|
|
892
|
+
}}
|
|
893
|
+
>
|
|
894
|
+
Advanced displacement, blur, saturation, and aberration settings
|
|
895
|
+
</p>
|
|
896
|
+
</div>
|
|
897
|
+
<div
|
|
898
|
+
style={{
|
|
899
|
+
borderRadius: '20px',
|
|
900
|
+
boxShadow: '0 30px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.2)',
|
|
901
|
+
}}
|
|
902
|
+
>
|
|
903
|
+
<Story />
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
640
906
|
),
|
|
641
907
|
],
|
|
642
908
|
parameters: {
|
|
@@ -655,128 +921,160 @@ export const GlassWithInteractiveContent: Story = {
|
|
|
655
921
|
const [showOverlay, setShowOverlay] = useState(true);
|
|
656
922
|
|
|
657
923
|
return (
|
|
658
|
-
<
|
|
924
|
+
<div
|
|
659
925
|
style={{
|
|
660
|
-
|
|
926
|
+
display: 'flex',
|
|
927
|
+
flexDirection: 'column',
|
|
928
|
+
alignItems: 'center',
|
|
929
|
+
gap: '30px',
|
|
930
|
+
width: '100%',
|
|
661
931
|
}}
|
|
662
|
-
height="80vh"
|
|
663
|
-
width="90vw"
|
|
664
|
-
padding="60px"
|
|
665
932
|
>
|
|
666
|
-
<
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
textShadow: '0 1px 4px rgba(0, 0, 0, 0.5)',
|
|
700
|
-
}}
|
|
701
|
-
>
|
|
702
|
-
Immerse yourself in a cinematic journey with our advanced glass morphism effects,
|
|
703
|
-
premium video quality, and interactive features designed for the ultimate viewing
|
|
704
|
-
experience.
|
|
705
|
-
</p>
|
|
933
|
+
<div style={{ textAlign: 'center', maxWidth: '800px' }}>
|
|
934
|
+
<h2
|
|
935
|
+
style={{
|
|
936
|
+
margin: '0 0 16px 0',
|
|
937
|
+
fontSize: '42px',
|
|
938
|
+
fontWeight: '700',
|
|
939
|
+
color: 'white',
|
|
940
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.7)',
|
|
941
|
+
}}
|
|
942
|
+
>
|
|
943
|
+
🎭 Interactive Glass Content
|
|
944
|
+
</h2>
|
|
945
|
+
<p
|
|
946
|
+
style={{
|
|
947
|
+
margin: 0,
|
|
948
|
+
fontSize: '18px',
|
|
949
|
+
color: 'rgba(255,255,255,0.9)',
|
|
950
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.5)',
|
|
951
|
+
}}
|
|
952
|
+
>
|
|
953
|
+
Custom interactive overlays with call-to-action elements
|
|
954
|
+
</p>
|
|
955
|
+
</div>
|
|
956
|
+
<div
|
|
957
|
+
style={{
|
|
958
|
+
borderRadius: '20px',
|
|
959
|
+
boxShadow: '0 30px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.2)',
|
|
960
|
+
}}
|
|
961
|
+
>
|
|
962
|
+
<VideoPlayer
|
|
963
|
+
{...args}
|
|
964
|
+
glassContent={
|
|
965
|
+
showOverlay ? (
|
|
706
966
|
<div
|
|
707
967
|
style={{
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
968
|
+
background: 'rgba(255, 255, 255, 0.15)',
|
|
969
|
+
backdropFilter: 'blur(20px)',
|
|
970
|
+
borderRadius: '24px',
|
|
971
|
+
padding: '50px',
|
|
972
|
+
textAlign: 'center',
|
|
973
|
+
border: '1px solid rgba(255, 255, 255, 0.3)',
|
|
974
|
+
maxWidth: '550px',
|
|
975
|
+
boxShadow: '0 20px 60px rgba(0, 0, 0, 0.4)',
|
|
712
976
|
}}
|
|
713
977
|
>
|
|
714
|
-
<
|
|
715
|
-
onClick={() => setShowOverlay(false)}
|
|
978
|
+
<h2
|
|
716
979
|
style={{
|
|
717
|
-
|
|
718
|
-
'linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15))',
|
|
719
|
-
border: '1px solid rgba(255, 255, 255, 0.4)',
|
|
720
|
-
borderRadius: '14px',
|
|
980
|
+
margin: '0 0 24px 0',
|
|
721
981
|
color: 'white',
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
transition: 'all 0.3s ease',
|
|
727
|
-
textShadow: '0 1px 2px rgba(0, 0, 0, 0.5)',
|
|
728
|
-
boxShadow: '0 6px 20px rgba(0, 0, 0, 0.2)',
|
|
729
|
-
transform: 'translateY(0)',
|
|
730
|
-
}}
|
|
731
|
-
onMouseOver={e => {
|
|
732
|
-
const target = e.target as HTMLButtonElement;
|
|
733
|
-
target.style.background =
|
|
734
|
-
'linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.25))';
|
|
735
|
-
target.style.transform = 'translateY(-2px)';
|
|
736
|
-
target.style.boxShadow = '0 8px 25px rgba(0, 0, 0, 0.3)';
|
|
737
|
-
}}
|
|
738
|
-
onMouseOut={e => {
|
|
739
|
-
const target = e.target as HTMLButtonElement;
|
|
740
|
-
target.style.background =
|
|
741
|
-
'linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15))';
|
|
742
|
-
target.style.transform = 'translateY(0)';
|
|
743
|
-
target.style.boxShadow = '0 6px 20px rgba(0, 0, 0, 0.2)';
|
|
982
|
+
fontSize: '32px',
|
|
983
|
+
fontWeight: '700',
|
|
984
|
+
textShadow: '0 4px 12px rgba(0, 0, 0, 0.6)',
|
|
985
|
+
letterSpacing: '-0.02em',
|
|
744
986
|
}}
|
|
745
987
|
>
|
|
746
|
-
|
|
747
|
-
</
|
|
748
|
-
<
|
|
988
|
+
🎬 Premium Cinema Experience
|
|
989
|
+
</h2>
|
|
990
|
+
<p
|
|
749
991
|
style={{
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
cursor: 'pointer',
|
|
756
|
-
fontSize: '16px',
|
|
757
|
-
fontWeight: '500',
|
|
758
|
-
transition: 'all 0.3s ease',
|
|
759
|
-
textShadow: '0 1px 2px rgba(0, 0, 0, 0.5)',
|
|
992
|
+
margin: '0 0 36px 0',
|
|
993
|
+
color: 'rgba(255, 255, 255, 0.95)',
|
|
994
|
+
fontSize: '18px',
|
|
995
|
+
lineHeight: '1.7',
|
|
996
|
+
textShadow: '0 2px 8px rgba(0, 0, 0, 0.5)',
|
|
760
997
|
}}
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
998
|
+
>
|
|
999
|
+
Immerse yourself in a cinematic journey with our advanced glass morphism
|
|
1000
|
+
effects, premium video quality, and interactive features designed for the
|
|
1001
|
+
ultimate viewing experience.
|
|
1002
|
+
</p>
|
|
1003
|
+
<div
|
|
1004
|
+
style={{
|
|
1005
|
+
display: 'flex',
|
|
1006
|
+
gap: '20px',
|
|
1007
|
+
justifyContent: 'center',
|
|
1008
|
+
flexWrap: 'wrap',
|
|
770
1009
|
}}
|
|
771
1010
|
>
|
|
772
|
-
|
|
773
|
-
|
|
1011
|
+
<button
|
|
1012
|
+
onClick={() => setShowOverlay(false)}
|
|
1013
|
+
style={{
|
|
1014
|
+
background:
|
|
1015
|
+
'linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2))',
|
|
1016
|
+
border: '1px solid rgba(255, 255, 255, 0.4)',
|
|
1017
|
+
borderRadius: '16px',
|
|
1018
|
+
color: 'white',
|
|
1019
|
+
padding: '16px 32px',
|
|
1020
|
+
cursor: 'pointer',
|
|
1021
|
+
fontSize: '17px',
|
|
1022
|
+
fontWeight: '600',
|
|
1023
|
+
transition: 'all 0.3s ease',
|
|
1024
|
+
textShadow: '0 2px 4px rgba(0, 0, 0, 0.5)',
|
|
1025
|
+
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.3)',
|
|
1026
|
+
transform: 'translateY(0)',
|
|
1027
|
+
}}
|
|
1028
|
+
onMouseOver={e => {
|
|
1029
|
+
const target = e.target as HTMLButtonElement;
|
|
1030
|
+
target.style.background =
|
|
1031
|
+
'linear-gradient(135deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.3))';
|
|
1032
|
+
target.style.transform = 'translateY(-3px)';
|
|
1033
|
+
target.style.boxShadow = '0 12px 32px rgba(0, 0, 0, 0.4)';
|
|
1034
|
+
}}
|
|
1035
|
+
onMouseOut={e => {
|
|
1036
|
+
const target = e.target as HTMLButtonElement;
|
|
1037
|
+
target.style.background =
|
|
1038
|
+
'linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2))';
|
|
1039
|
+
target.style.transform = 'translateY(0)';
|
|
1040
|
+
target.style.boxShadow = '0 8px 24px rgba(0, 0, 0, 0.3)';
|
|
1041
|
+
}}
|
|
1042
|
+
>
|
|
1043
|
+
▶ Start Watching
|
|
1044
|
+
</button>
|
|
1045
|
+
<button
|
|
1046
|
+
style={{
|
|
1047
|
+
background: 'rgba(255, 255, 255, 0.15)',
|
|
1048
|
+
border: '1px solid rgba(255, 255, 255, 0.35)',
|
|
1049
|
+
borderRadius: '16px',
|
|
1050
|
+
color: 'white',
|
|
1051
|
+
padding: '16px 32px',
|
|
1052
|
+
cursor: 'pointer',
|
|
1053
|
+
fontSize: '17px',
|
|
1054
|
+
fontWeight: '500',
|
|
1055
|
+
transition: 'all 0.3s ease',
|
|
1056
|
+
textShadow: '0 2px 4px rgba(0, 0, 0, 0.5)',
|
|
1057
|
+
}}
|
|
1058
|
+
onMouseOver={e => {
|
|
1059
|
+
const target = e.target as HTMLButtonElement;
|
|
1060
|
+
target.style.background = 'rgba(255, 255, 255, 0.25)';
|
|
1061
|
+
target.style.transform = 'translateY(-2px)';
|
|
1062
|
+
}}
|
|
1063
|
+
onMouseOut={e => {
|
|
1064
|
+
const target = e.target as HTMLButtonElement;
|
|
1065
|
+
target.style.background = 'rgba(255, 255, 255, 0.15)';
|
|
1066
|
+
target.style.transform = 'translateY(0)';
|
|
1067
|
+
}}
|
|
1068
|
+
>
|
|
1069
|
+
Learn More
|
|
1070
|
+
</button>
|
|
1071
|
+
</div>
|
|
774
1072
|
</div>
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
</
|
|
1073
|
+
) : null
|
|
1074
|
+
}
|
|
1075
|
+
/>
|
|
1076
|
+
</div>
|
|
1077
|
+
</div>
|
|
780
1078
|
);
|
|
781
1079
|
},
|
|
782
1080
|
args: {
|
|
@@ -818,7 +1116,10 @@ export const GlassWithInteractiveContent: Story = {
|
|
|
818
1116
|
};
|
|
819
1117
|
|
|
820
1118
|
/**
|
|
821
|
-
* Responsive
|
|
1119
|
+
* 📱 Responsive Player - Fluid Layout
|
|
1120
|
+
*
|
|
1121
|
+
* Fully responsive video player that adapts to container width while maintaining aspect ratio.
|
|
1122
|
+
* Perfect for content management systems and responsive layouts.
|
|
822
1123
|
*/
|
|
823
1124
|
export const ResponsivePlayer: Story = {
|
|
824
1125
|
args: {
|
|
@@ -844,28 +1145,60 @@ export const ResponsivePlayer: Story = {
|
|
|
844
1145
|
<div
|
|
845
1146
|
style={{
|
|
846
1147
|
width: '100%',
|
|
847
|
-
maxWidth: '
|
|
1148
|
+
maxWidth: '1400px',
|
|
848
1149
|
margin: '0 auto',
|
|
849
|
-
padding: '
|
|
850
|
-
background: 'linear-gradient(135deg, #1e3c72 0%, #2a5298 100%)',
|
|
851
|
-
borderRadius: '
|
|
1150
|
+
padding: '40px',
|
|
1151
|
+
background: 'linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #667eea 100%)',
|
|
1152
|
+
borderRadius: '24px',
|
|
1153
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.3)',
|
|
852
1154
|
}}
|
|
853
1155
|
>
|
|
854
1156
|
<div
|
|
855
1157
|
style={{
|
|
856
|
-
marginBottom: '
|
|
1158
|
+
marginBottom: '30px',
|
|
857
1159
|
textAlign: 'center',
|
|
858
1160
|
color: 'white',
|
|
859
1161
|
}}
|
|
860
1162
|
>
|
|
861
|
-
<
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
1163
|
+
<h2
|
|
1164
|
+
style={{
|
|
1165
|
+
margin: '0 0 12px 0',
|
|
1166
|
+
fontSize: '36px',
|
|
1167
|
+
fontWeight: '700',
|
|
1168
|
+
textShadow: '0 4px 12px rgba(0,0,0,0.4)',
|
|
1169
|
+
}}
|
|
1170
|
+
>
|
|
1171
|
+
📱 Responsive Video Player
|
|
1172
|
+
</h2>
|
|
1173
|
+
<p
|
|
1174
|
+
style={{
|
|
1175
|
+
margin: '0 0 8px 0',
|
|
1176
|
+
fontSize: '18px',
|
|
1177
|
+
opacity: 0.95,
|
|
1178
|
+
textShadow: '0 2px 6px rgba(0,0,0,0.3)',
|
|
1179
|
+
}}
|
|
1180
|
+
>
|
|
865
1181
|
Adapts to any screen size with fluid width and maintained aspect ratio
|
|
866
1182
|
</p>
|
|
1183
|
+
<p
|
|
1184
|
+
style={{
|
|
1185
|
+
margin: 0,
|
|
1186
|
+
fontSize: '14px',
|
|
1187
|
+
opacity: 0.8,
|
|
1188
|
+
textShadow: '0 1px 3px rgba(0,0,0,0.3)',
|
|
1189
|
+
}}
|
|
1190
|
+
>
|
|
1191
|
+
Resize your browser window to see the responsive behavior
|
|
1192
|
+
</p>
|
|
1193
|
+
</div>
|
|
1194
|
+
<div
|
|
1195
|
+
style={{
|
|
1196
|
+
borderRadius: '16px',
|
|
1197
|
+
boxShadow: '0 15px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
1198
|
+
}}
|
|
1199
|
+
>
|
|
1200
|
+
<Story />
|
|
867
1201
|
</div>
|
|
868
|
-
<Story />
|
|
869
1202
|
</div>
|
|
870
1203
|
),
|
|
871
1204
|
],
|
|
@@ -884,8 +1217,9 @@ export const SquareFormat: Story = {
|
|
|
884
1217
|
src: videoSources.weAreGoingOnBullrun.src,
|
|
885
1218
|
poster: videoSources.weAreGoingOnBullrun.poster,
|
|
886
1219
|
aspectRatio: '1:1',
|
|
887
|
-
width: '
|
|
1220
|
+
width: '600px',
|
|
888
1221
|
controls: true,
|
|
1222
|
+
showSettings: true,
|
|
889
1223
|
onPlay: fn(),
|
|
890
1224
|
onPause: fn(),
|
|
891
1225
|
onEnded: fn(),
|
|
@@ -896,17 +1230,57 @@ export const SquareFormat: Story = {
|
|
|
896
1230
|
},
|
|
897
1231
|
decorators: [
|
|
898
1232
|
Story => (
|
|
899
|
-
<
|
|
1233
|
+
<div
|
|
1234
|
+
style={{
|
|
1235
|
+
display: 'flex',
|
|
1236
|
+
flexDirection: 'column',
|
|
1237
|
+
alignItems: 'center',
|
|
1238
|
+
gap: '30px',
|
|
1239
|
+
width: '100%',
|
|
1240
|
+
}}
|
|
1241
|
+
>
|
|
900
1242
|
<div style={{ textAlign: 'center', color: 'white' }}>
|
|
901
|
-
<
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
1243
|
+
<h2
|
|
1244
|
+
style={{
|
|
1245
|
+
margin: '0 0 16px 0',
|
|
1246
|
+
fontSize: '36px',
|
|
1247
|
+
fontWeight: '700',
|
|
1248
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
1249
|
+
}}
|
|
1250
|
+
>
|
|
1251
|
+
⬜ Square Format
|
|
1252
|
+
</h2>
|
|
1253
|
+
<p
|
|
1254
|
+
style={{
|
|
1255
|
+
margin: '0 0 8px 0',
|
|
1256
|
+
fontSize: '18px',
|
|
1257
|
+
opacity: 0.95,
|
|
1258
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
1259
|
+
fontWeight: '500',
|
|
1260
|
+
}}
|
|
1261
|
+
>
|
|
905
1262
|
Perfect for social media content and mobile-first designs
|
|
906
1263
|
</p>
|
|
1264
|
+
<p
|
|
1265
|
+
style={{
|
|
1266
|
+
margin: 0,
|
|
1267
|
+
fontSize: '14px',
|
|
1268
|
+
opacity: 0.8,
|
|
1269
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.3)',
|
|
1270
|
+
}}
|
|
1271
|
+
>
|
|
1272
|
+
Instagram-style videos optimized for mobile viewing
|
|
1273
|
+
</p>
|
|
1274
|
+
</div>
|
|
1275
|
+
<div
|
|
1276
|
+
style={{
|
|
1277
|
+
borderRadius: '20px',
|
|
1278
|
+
boxShadow: '0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15)',
|
|
1279
|
+
}}
|
|
1280
|
+
>
|
|
907
1281
|
<Story />
|
|
908
1282
|
</div>
|
|
909
|
-
</
|
|
1283
|
+
</div>
|
|
910
1284
|
),
|
|
911
1285
|
],
|
|
912
1286
|
parameters: {
|
|
@@ -924,7 +1298,7 @@ export const VerticalFormat: Story = {
|
|
|
924
1298
|
src: videoSources.bigBuckBunny.src,
|
|
925
1299
|
poster: videoSources.bigBuckBunny.poster,
|
|
926
1300
|
aspectRatio: '9:16',
|
|
927
|
-
width: '
|
|
1301
|
+
width: '400px',
|
|
928
1302
|
controls: true,
|
|
929
1303
|
showSettings: true,
|
|
930
1304
|
onPlay: fn(),
|
|
@@ -937,17 +1311,57 @@ export const VerticalFormat: Story = {
|
|
|
937
1311
|
},
|
|
938
1312
|
decorators: [
|
|
939
1313
|
Story => (
|
|
940
|
-
<
|
|
1314
|
+
<div
|
|
1315
|
+
style={{
|
|
1316
|
+
display: 'flex',
|
|
1317
|
+
flexDirection: 'column',
|
|
1318
|
+
alignItems: 'center',
|
|
1319
|
+
gap: '30px',
|
|
1320
|
+
width: '100%',
|
|
1321
|
+
}}
|
|
1322
|
+
>
|
|
941
1323
|
<div style={{ textAlign: 'center', color: 'white' }}>
|
|
942
|
-
<
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
1324
|
+
<h2
|
|
1325
|
+
style={{
|
|
1326
|
+
margin: '0 0 16px 0',
|
|
1327
|
+
fontSize: '36px',
|
|
1328
|
+
fontWeight: '700',
|
|
1329
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
1330
|
+
}}
|
|
1331
|
+
>
|
|
1332
|
+
📱 Vertical/Portrait Format
|
|
1333
|
+
</h2>
|
|
1334
|
+
<p
|
|
1335
|
+
style={{
|
|
1336
|
+
margin: '0 0 8px 0',
|
|
1337
|
+
fontSize: '18px',
|
|
1338
|
+
opacity: 0.95,
|
|
1339
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
1340
|
+
fontWeight: '500',
|
|
1341
|
+
}}
|
|
1342
|
+
>
|
|
946
1343
|
Optimized for mobile viewing and story-style content
|
|
947
1344
|
</p>
|
|
1345
|
+
<p
|
|
1346
|
+
style={{
|
|
1347
|
+
margin: 0,
|
|
1348
|
+
fontSize: '14px',
|
|
1349
|
+
opacity: 0.8,
|
|
1350
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.3)',
|
|
1351
|
+
}}
|
|
1352
|
+
>
|
|
1353
|
+
TikTok-style videos and story formats
|
|
1354
|
+
</p>
|
|
1355
|
+
</div>
|
|
1356
|
+
<div
|
|
1357
|
+
style={{
|
|
1358
|
+
borderRadius: '20px',
|
|
1359
|
+
boxShadow: '0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15)',
|
|
1360
|
+
}}
|
|
1361
|
+
>
|
|
948
1362
|
<Story />
|
|
949
1363
|
</div>
|
|
950
|
-
</
|
|
1364
|
+
</div>
|
|
951
1365
|
),
|
|
952
1366
|
],
|
|
953
1367
|
parameters: {
|
|
@@ -961,14 +1375,14 @@ export const VerticalFormat: Story = {
|
|
|
961
1375
|
};
|
|
962
1376
|
|
|
963
1377
|
/**
|
|
964
|
-
* Specialized Configurations
|
|
1378
|
+
* 🎯 Specialized Configurations
|
|
965
1379
|
*/
|
|
966
1380
|
export const MinimalPlayer: Story = {
|
|
967
1381
|
args: {
|
|
968
1382
|
src: videoSources.elephantsDream.src,
|
|
969
1383
|
poster: videoSources.elephantsDream.poster,
|
|
970
|
-
width: '
|
|
971
|
-
height: '
|
|
1384
|
+
width: '700px',
|
|
1385
|
+
height: '394px',
|
|
972
1386
|
controls: true,
|
|
973
1387
|
showDownload: false,
|
|
974
1388
|
showShare: false,
|
|
@@ -983,17 +1397,57 @@ export const MinimalPlayer: Story = {
|
|
|
983
1397
|
},
|
|
984
1398
|
decorators: [
|
|
985
1399
|
Story => (
|
|
986
|
-
<
|
|
1400
|
+
<div
|
|
1401
|
+
style={{
|
|
1402
|
+
display: 'flex',
|
|
1403
|
+
flexDirection: 'column',
|
|
1404
|
+
alignItems: 'center',
|
|
1405
|
+
gap: '30px',
|
|
1406
|
+
width: '100%',
|
|
1407
|
+
}}
|
|
1408
|
+
>
|
|
987
1409
|
<div style={{ textAlign: 'center', color: 'white' }}>
|
|
988
|
-
<
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
1410
|
+
<h2
|
|
1411
|
+
style={{
|
|
1412
|
+
margin: '0 0 16px 0',
|
|
1413
|
+
fontSize: '36px',
|
|
1414
|
+
fontWeight: '700',
|
|
1415
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
1416
|
+
}}
|
|
1417
|
+
>
|
|
1418
|
+
🎯 Minimal Configuration
|
|
1419
|
+
</h2>
|
|
1420
|
+
<p
|
|
1421
|
+
style={{
|
|
1422
|
+
margin: '0 0 8px 0',
|
|
1423
|
+
fontSize: '18px',
|
|
1424
|
+
opacity: 0.95,
|
|
1425
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
1426
|
+
fontWeight: '500',
|
|
1427
|
+
}}
|
|
1428
|
+
>
|
|
992
1429
|
Clean, distraction-free video playback with essential controls only
|
|
993
1430
|
</p>
|
|
1431
|
+
<p
|
|
1432
|
+
style={{
|
|
1433
|
+
margin: 0,
|
|
1434
|
+
fontSize: '14px',
|
|
1435
|
+
opacity: 0.8,
|
|
1436
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.3)',
|
|
1437
|
+
}}
|
|
1438
|
+
>
|
|
1439
|
+
Perfect for situations where simplicity and focus are priorities
|
|
1440
|
+
</p>
|
|
1441
|
+
</div>
|
|
1442
|
+
<div
|
|
1443
|
+
style={{
|
|
1444
|
+
borderRadius: '16px',
|
|
1445
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
1446
|
+
}}
|
|
1447
|
+
>
|
|
994
1448
|
<Story />
|
|
995
1449
|
</div>
|
|
996
|
-
</
|
|
1450
|
+
</div>
|
|
997
1451
|
),
|
|
998
1452
|
],
|
|
999
1453
|
parameters: {
|
|
@@ -1013,8 +1467,8 @@ export const AutoplayMuted: Story = {
|
|
|
1013
1467
|
autoplay: true,
|
|
1014
1468
|
muted: true,
|
|
1015
1469
|
loop: true,
|
|
1016
|
-
width: '
|
|
1017
|
-
height: '
|
|
1470
|
+
width: '800px',
|
|
1471
|
+
height: '450px',
|
|
1018
1472
|
controls: true,
|
|
1019
1473
|
onPlay: fn(),
|
|
1020
1474
|
onPause: fn(),
|
|
@@ -1026,17 +1480,57 @@ export const AutoplayMuted: Story = {
|
|
|
1026
1480
|
},
|
|
1027
1481
|
decorators: [
|
|
1028
1482
|
Story => (
|
|
1029
|
-
<
|
|
1483
|
+
<div
|
|
1484
|
+
style={{
|
|
1485
|
+
display: 'flex',
|
|
1486
|
+
flexDirection: 'column',
|
|
1487
|
+
alignItems: 'center',
|
|
1488
|
+
gap: '30px',
|
|
1489
|
+
width: '100%',
|
|
1490
|
+
}}
|
|
1491
|
+
>
|
|
1030
1492
|
<div style={{ textAlign: 'center', color: 'white' }}>
|
|
1031
|
-
<
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1493
|
+
<h2
|
|
1494
|
+
style={{
|
|
1495
|
+
margin: '0 0 16px 0',
|
|
1496
|
+
fontSize: '36px',
|
|
1497
|
+
fontWeight: '700',
|
|
1498
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
1499
|
+
}}
|
|
1500
|
+
>
|
|
1501
|
+
🔄 Autoplay & Loop
|
|
1502
|
+
</h2>
|
|
1503
|
+
<p
|
|
1504
|
+
style={{
|
|
1505
|
+
margin: '0 0 8px 0',
|
|
1506
|
+
fontSize: '18px',
|
|
1507
|
+
opacity: 0.95,
|
|
1508
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
1509
|
+
fontWeight: '500',
|
|
1510
|
+
}}
|
|
1511
|
+
>
|
|
1035
1512
|
Perfect for background videos and promotional content
|
|
1036
1513
|
</p>
|
|
1514
|
+
<p
|
|
1515
|
+
style={{
|
|
1516
|
+
margin: 0,
|
|
1517
|
+
fontSize: '14px',
|
|
1518
|
+
opacity: 0.8,
|
|
1519
|
+
textShadow: '0 1px 5px rgba(0,0,0,0.3)',
|
|
1520
|
+
}}
|
|
1521
|
+
>
|
|
1522
|
+
Ideal for hero sections and promotional displays
|
|
1523
|
+
</p>
|
|
1524
|
+
</div>
|
|
1525
|
+
<div
|
|
1526
|
+
style={{
|
|
1527
|
+
borderRadius: '16px',
|
|
1528
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1)',
|
|
1529
|
+
}}
|
|
1530
|
+
>
|
|
1037
1531
|
<Story />
|
|
1038
1532
|
</div>
|
|
1039
|
-
</
|
|
1533
|
+
</div>
|
|
1040
1534
|
),
|
|
1041
1535
|
],
|
|
1042
1536
|
parameters: {
|
|
@@ -1050,14 +1544,14 @@ export const AutoplayMuted: Story = {
|
|
|
1050
1544
|
};
|
|
1051
1545
|
|
|
1052
1546
|
/**
|
|
1053
|
-
* Accessibility and Internationalization
|
|
1547
|
+
* 🌍 Accessibility and Internationalization
|
|
1054
1548
|
*/
|
|
1055
1549
|
export const WithSubtitles: Story = {
|
|
1056
1550
|
args: {
|
|
1057
1551
|
src: videoSources.tearsOfSteel.src,
|
|
1058
1552
|
poster: videoSources.tearsOfSteel.poster,
|
|
1059
|
-
width: '
|
|
1060
|
-
height: '
|
|
1553
|
+
width: '900px',
|
|
1554
|
+
height: '506px',
|
|
1061
1555
|
subtitles: sampleSubtitles,
|
|
1062
1556
|
controls: true,
|
|
1063
1557
|
showSettings: true,
|
|
@@ -1071,17 +1565,75 @@ export const WithSubtitles: Story = {
|
|
|
1071
1565
|
},
|
|
1072
1566
|
decorators: [
|
|
1073
1567
|
Story => (
|
|
1074
|
-
<
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1568
|
+
<div
|
|
1569
|
+
style={{
|
|
1570
|
+
display: 'flex',
|
|
1571
|
+
flexDirection: 'column',
|
|
1572
|
+
alignItems: 'center',
|
|
1573
|
+
gap: '30px',
|
|
1574
|
+
width: '100%',
|
|
1575
|
+
}}
|
|
1576
|
+
>
|
|
1577
|
+
<div style={{ textAlign: 'center', color: 'white', maxWidth: '800px' }}>
|
|
1578
|
+
<h2
|
|
1579
|
+
style={{
|
|
1580
|
+
margin: '0 0 16px 0',
|
|
1581
|
+
fontSize: '36px',
|
|
1582
|
+
fontWeight: '700',
|
|
1583
|
+
textShadow: '0 4px 20px rgba(0,0,0,0.6)',
|
|
1584
|
+
}}
|
|
1585
|
+
>
|
|
1586
|
+
🌍 Multi-Language Subtitles
|
|
1587
|
+
</h2>
|
|
1588
|
+
<p
|
|
1589
|
+
style={{
|
|
1590
|
+
margin: '0 0 12px 0',
|
|
1591
|
+
fontSize: '18px',
|
|
1592
|
+
opacity: 0.95,
|
|
1593
|
+
textShadow: '0 2px 10px rgba(0,0,0,0.4)',
|
|
1594
|
+
fontWeight: '500',
|
|
1595
|
+
}}
|
|
1596
|
+
>
|
|
1597
|
+
Accessibility support with multiple language options
|
|
1081
1598
|
</p>
|
|
1599
|
+
<div
|
|
1600
|
+
style={{
|
|
1601
|
+
display: 'flex',
|
|
1602
|
+
flexWrap: 'wrap',
|
|
1603
|
+
gap: '10px',
|
|
1604
|
+
justifyContent: 'center',
|
|
1605
|
+
marginTop: '16px',
|
|
1606
|
+
}}
|
|
1607
|
+
>
|
|
1608
|
+
{['English', 'Español', 'বাংলা'].map(lang => (
|
|
1609
|
+
<span
|
|
1610
|
+
key={lang}
|
|
1611
|
+
style={{
|
|
1612
|
+
background: 'rgba(255,255,255,0.15)',
|
|
1613
|
+
backdropFilter: 'blur(10px)',
|
|
1614
|
+
border: '1px solid rgba(255,255,255,0.2)',
|
|
1615
|
+
borderRadius: '16px',
|
|
1616
|
+
padding: '6px 14px',
|
|
1617
|
+
fontSize: '13px',
|
|
1618
|
+
color: 'white',
|
|
1619
|
+
fontWeight: '500',
|
|
1620
|
+
textShadow: '0 1px 3px rgba(0,0,0,0.3)',
|
|
1621
|
+
}}
|
|
1622
|
+
>
|
|
1623
|
+
{lang}
|
|
1624
|
+
</span>
|
|
1625
|
+
))}
|
|
1626
|
+
</div>
|
|
1082
1627
|
</div>
|
|
1083
|
-
<
|
|
1084
|
-
|
|
1628
|
+
<div
|
|
1629
|
+
style={{
|
|
1630
|
+
borderRadius: '20px',
|
|
1631
|
+
boxShadow: '0 25px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15)',
|
|
1632
|
+
}}
|
|
1633
|
+
>
|
|
1634
|
+
<Story />
|
|
1635
|
+
</div>
|
|
1636
|
+
</div>
|
|
1085
1637
|
),
|
|
1086
1638
|
],
|
|
1087
1639
|
parameters: {
|
|
@@ -1095,7 +1647,10 @@ export const WithSubtitles: Story = {
|
|
|
1095
1647
|
};
|
|
1096
1648
|
|
|
1097
1649
|
/**
|
|
1098
|
-
* Interactive Playground
|
|
1650
|
+
* 🎮 Interactive Playground - Live Customization
|
|
1651
|
+
*
|
|
1652
|
+
* Interactive playground allowing real-time experimentation with all VideoPlayer properties.
|
|
1653
|
+
* Use the control panel to adjust settings and see how they affect the player appearance and behavior.
|
|
1099
1654
|
*/
|
|
1100
1655
|
export const InteractivePlayground: Story = {
|
|
1101
1656
|
render: () => {
|
|
@@ -1112,7 +1667,6 @@ export const InteractivePlayground: Story = {
|
|
|
1112
1667
|
ambientMode: false,
|
|
1113
1668
|
glass: false,
|
|
1114
1669
|
glassOpacity: 0.4,
|
|
1115
|
-
backgroundIndex: 0,
|
|
1116
1670
|
});
|
|
1117
1671
|
|
|
1118
1672
|
const handleChange = (property: string, value: any) => {
|
|
@@ -1125,135 +1679,158 @@ export const InteractivePlayground: Story = {
|
|
|
1125
1679
|
const aspectRatios = ['16:9', '4:3', '21:9', '1:1', '9:16'] as const;
|
|
1126
1680
|
|
|
1127
1681
|
return (
|
|
1128
|
-
<
|
|
1129
|
-
backgroundIndex={settings.backgroundIndex}
|
|
1130
|
-
height="90vh"
|
|
1131
|
-
width="95vw"
|
|
1132
|
-
style={{ position: 'relative' }}
|
|
1133
|
-
>
|
|
1682
|
+
<div style={{ display: 'flex', flexDirection: 'row', gap: '80px' }}>
|
|
1134
1683
|
{/* Control Panel */}
|
|
1135
1684
|
<div
|
|
1136
1685
|
style={{
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
background: 'rgba(0,0,0,0.8)',
|
|
1144
|
-
backdropFilter: 'blur(20px)',
|
|
1145
|
-
border: '1px solid rgba(255,255,255,0.2)',
|
|
1686
|
+
width: '320px',
|
|
1687
|
+
padding: '24px',
|
|
1688
|
+
borderRadius: '16px',
|
|
1689
|
+
background: 'rgba(0,0,0,0.85)',
|
|
1690
|
+
backdropFilter: 'blur(30px)',
|
|
1691
|
+
border: '1px solid rgba(255,255,255,0.25)',
|
|
1146
1692
|
color: 'white',
|
|
1147
1693
|
fontSize: '14px',
|
|
1148
1694
|
zIndex: 10,
|
|
1695
|
+
boxShadow: '0 20px 60px rgba(0,0,0,0.5)',
|
|
1149
1696
|
}}
|
|
1150
1697
|
>
|
|
1151
|
-
<h3
|
|
1152
|
-
|
|
1698
|
+
<h3
|
|
1699
|
+
style={{
|
|
1700
|
+
margin: '0 0 24px 0',
|
|
1701
|
+
fontSize: '20px',
|
|
1702
|
+
textAlign: 'center',
|
|
1703
|
+
fontWeight: '700',
|
|
1704
|
+
textShadow: '0 2px 8px rgba(0,0,0,0.5)',
|
|
1705
|
+
}}
|
|
1706
|
+
>
|
|
1707
|
+
🎮 Live Controls
|
|
1153
1708
|
</h3>
|
|
1154
1709
|
|
|
1155
1710
|
{/* Aspect Ratio */}
|
|
1156
|
-
<div style={{ marginBottom: '
|
|
1157
|
-
<label
|
|
1158
|
-
|
|
1711
|
+
<div style={{ marginBottom: '18px' }}>
|
|
1712
|
+
<label
|
|
1713
|
+
style={{
|
|
1714
|
+
display: 'block',
|
|
1715
|
+
marginBottom: '8px',
|
|
1716
|
+
fontWeight: '600',
|
|
1717
|
+
fontSize: '13px',
|
|
1718
|
+
textTransform: 'uppercase',
|
|
1719
|
+
letterSpacing: '0.5px',
|
|
1720
|
+
opacity: 0.9,
|
|
1721
|
+
}}
|
|
1722
|
+
>
|
|
1723
|
+
📐 Aspect Ratio
|
|
1159
1724
|
</label>
|
|
1160
1725
|
<select
|
|
1161
1726
|
value={settings.aspectRatio}
|
|
1162
1727
|
onChange={e => handleChange('aspectRatio', e.target.value)}
|
|
1163
1728
|
style={{
|
|
1164
1729
|
width: '100%',
|
|
1165
|
-
padding: '
|
|
1166
|
-
backgroundColor: 'rgba(255,255,255,0.
|
|
1730
|
+
padding: '10px 12px',
|
|
1731
|
+
backgroundColor: 'rgba(255,255,255,0.12)',
|
|
1167
1732
|
color: 'white',
|
|
1168
|
-
border: '1px solid rgba(255,255,255,0.
|
|
1169
|
-
borderRadius: '
|
|
1733
|
+
border: '1px solid rgba(255,255,255,0.25)',
|
|
1734
|
+
borderRadius: '8px',
|
|
1735
|
+
fontSize: '14px',
|
|
1736
|
+
cursor: 'pointer',
|
|
1737
|
+
transition: 'all 0.2s ease',
|
|
1738
|
+
}}
|
|
1739
|
+
onMouseOver={e => {
|
|
1740
|
+
e.currentTarget.style.backgroundColor = 'rgba(255,255,255,0.18)';
|
|
1741
|
+
e.currentTarget.style.borderColor = 'rgba(255,255,255,0.35)';
|
|
1742
|
+
}}
|
|
1743
|
+
onMouseOut={e => {
|
|
1744
|
+
e.currentTarget.style.backgroundColor = 'rgba(255,255,255,0.12)';
|
|
1745
|
+
e.currentTarget.style.borderColor = 'rgba(255,255,255,0.25)';
|
|
1170
1746
|
}}
|
|
1171
1747
|
>
|
|
1172
1748
|
{aspectRatios.map(ratio => (
|
|
1173
|
-
<option
|
|
1749
|
+
<option
|
|
1750
|
+
key={ratio}
|
|
1751
|
+
value={ratio}
|
|
1752
|
+
style={{ backgroundColor: '#1a1a2e', color: 'white' }}
|
|
1753
|
+
>
|
|
1174
1754
|
{ratio}
|
|
1175
1755
|
</option>
|
|
1176
1756
|
))}
|
|
1177
1757
|
</select>
|
|
1178
1758
|
</div>
|
|
1179
1759
|
|
|
1180
|
-
{/*
|
|
1181
|
-
<div
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
max="4"
|
|
1189
|
-
value={settings.backgroundIndex}
|
|
1190
|
-
onChange={e => handleChange('backgroundIndex', parseInt(e.target.value))}
|
|
1191
|
-
style={{ width: '100%', accentColor: '#6366f1' }}
|
|
1192
|
-
/>
|
|
1193
|
-
</div>
|
|
1194
|
-
|
|
1195
|
-
{/* Glass Opacity */}
|
|
1196
|
-
{settings.glass && (
|
|
1197
|
-
<div style={{ marginBottom: '16px' }}>
|
|
1198
|
-
<label style={{ display: 'block', marginBottom: '6px', fontWeight: '500' }}>
|
|
1199
|
-
Glass Opacity ({settings.glassOpacity})
|
|
1200
|
-
</label>
|
|
1201
|
-
<input
|
|
1202
|
-
type="range"
|
|
1203
|
-
min="0"
|
|
1204
|
-
max="1"
|
|
1205
|
-
step="0.05"
|
|
1206
|
-
value={settings.glassOpacity}
|
|
1207
|
-
onChange={e => handleChange('glassOpacity', parseFloat(e.target.value))}
|
|
1208
|
-
style={{ width: '100%', accentColor: '#6366f1' }}
|
|
1209
|
-
/>
|
|
1210
|
-
</div>
|
|
1211
|
-
)}
|
|
1760
|
+
{/* Divider */}
|
|
1761
|
+
<div
|
|
1762
|
+
style={{
|
|
1763
|
+
height: '1px',
|
|
1764
|
+
background: 'rgba(255,255,255,0.15)',
|
|
1765
|
+
margin: '20px 0',
|
|
1766
|
+
}}
|
|
1767
|
+
/>
|
|
1212
1768
|
|
|
1213
1769
|
{/* Checkboxes */}
|
|
1214
|
-
{
|
|
1215
|
-
{
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
{
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1770
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '12px' }}>
|
|
1771
|
+
{[
|
|
1772
|
+
{ key: 'autoplay', label: '▶️ Autoplay', emoji: '▶️' },
|
|
1773
|
+
{ key: 'muted', label: '🔇 Muted', emoji: '🔇' },
|
|
1774
|
+
{ key: 'loop', label: '🔁 Loop', emoji: '🔁' },
|
|
1775
|
+
{ key: 'controls', label: '🎛️ Controls', emoji: '🎛️' },
|
|
1776
|
+
{ key: 'showDownload', label: '⬇️ Download Button', emoji: '⬇️' },
|
|
1777
|
+
{ key: 'showShare', label: '🔗 Share Button', emoji: '🔗' },
|
|
1778
|
+
{ key: 'showSettings', label: '⚙️ Settings Menu', emoji: '⚙️' },
|
|
1779
|
+
{ key: 'ambientMode', label: '🌈 Ambient Mode', emoji: '🌈' },
|
|
1780
|
+
{ key: 'glass', label: '✨ Glass Effect', emoji: '✨' },
|
|
1781
|
+
].map(({ key, label }) => (
|
|
1782
|
+
<div
|
|
1783
|
+
key={key}
|
|
1784
|
+
style={{
|
|
1785
|
+
display: 'flex',
|
|
1786
|
+
alignItems: 'center',
|
|
1787
|
+
gap: '10px',
|
|
1788
|
+
padding: '8px',
|
|
1789
|
+
borderRadius: '8px',
|
|
1790
|
+
transition: 'background 0.2s ease',
|
|
1791
|
+
cursor: 'pointer',
|
|
1792
|
+
}}
|
|
1793
|
+
onMouseOver={e => {
|
|
1794
|
+
e.currentTarget.style.background = 'rgba(255,255,255,0.08)';
|
|
1795
|
+
}}
|
|
1796
|
+
onMouseOut={e => {
|
|
1797
|
+
e.currentTarget.style.background = 'transparent';
|
|
1798
|
+
}}
|
|
1799
|
+
>
|
|
1800
|
+
<input
|
|
1801
|
+
type="checkbox"
|
|
1802
|
+
id={key}
|
|
1803
|
+
checked={settings[key as keyof typeof settings] as boolean}
|
|
1804
|
+
onChange={e => handleChange(key, e.target.checked)}
|
|
1805
|
+
style={{
|
|
1806
|
+
width: '18px',
|
|
1807
|
+
height: '18px',
|
|
1808
|
+
cursor: 'pointer',
|
|
1809
|
+
accentColor: '#7AFFD7',
|
|
1810
|
+
}}
|
|
1811
|
+
/>
|
|
1812
|
+
<label
|
|
1813
|
+
htmlFor={key}
|
|
1814
|
+
style={{
|
|
1815
|
+
fontSize: '13px',
|
|
1816
|
+
cursor: 'pointer',
|
|
1817
|
+
fontWeight: '500',
|
|
1818
|
+
flex: 1,
|
|
1819
|
+
}}
|
|
1820
|
+
>
|
|
1821
|
+
{label}
|
|
1822
|
+
</label>
|
|
1823
|
+
</div>
|
|
1824
|
+
))}
|
|
1825
|
+
</div>
|
|
1241
1826
|
</div>
|
|
1242
1827
|
|
|
1243
1828
|
{/* Video Player */}
|
|
1244
|
-
<div
|
|
1245
|
-
style={{
|
|
1246
|
-
display: 'flex',
|
|
1247
|
-
justifyContent: 'center',
|
|
1248
|
-
alignItems: 'center',
|
|
1249
|
-
height: '100%',
|
|
1250
|
-
paddingLeft: '340px',
|
|
1251
|
-
}}
|
|
1252
|
-
>
|
|
1829
|
+
<div>
|
|
1253
1830
|
<VideoPlayer
|
|
1254
|
-
src={videoSources.
|
|
1255
|
-
poster={videoSources.
|
|
1256
|
-
width="
|
|
1831
|
+
src={videoSources.snow.src}
|
|
1832
|
+
poster={videoSources.snow.poster}
|
|
1833
|
+
width="800px"
|
|
1257
1834
|
aspectRatio={settings.aspectRatio}
|
|
1258
1835
|
autoplay={settings.autoplay}
|
|
1259
1836
|
muted={settings.muted}
|
|
@@ -1276,14 +1853,14 @@ export const InteractivePlayground: Story = {
|
|
|
1276
1853
|
onError={fn()}
|
|
1277
1854
|
/>
|
|
1278
1855
|
</div>
|
|
1279
|
-
</
|
|
1856
|
+
</div>
|
|
1280
1857
|
);
|
|
1281
1858
|
},
|
|
1282
1859
|
parameters: {
|
|
1283
1860
|
docs: {
|
|
1284
1861
|
description: {
|
|
1285
1862
|
story:
|
|
1286
|
-
'Interactive playground allowing real-time experimentation with all VideoPlayer properties. Use the control panel to adjust settings and see how they affect the player appearance and behavior.',
|
|
1863
|
+
'Interactive playground allowing real-time experimentation with all VideoPlayer properties. Use the control panel to adjust settings and see how they affect the player appearance and behavior. Perfect for developers to explore all features and configurations.',
|
|
1287
1864
|
},
|
|
1288
1865
|
},
|
|
1289
1866
|
},
|