@remotion/promo-pages 4.0.314 → 4.0.317

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.
Files changed (50) hide show
  1. package/.turbo/turbo-make.log +2 -2
  2. package/dist/Homepage.js +11958 -12155
  3. package/dist/components/Homepage.js +4 -4
  4. package/dist/components/homepage/BackgroundAnimation.js +1 -1
  5. package/dist/components/homepage/CommunityStats.js +1 -1
  6. package/dist/components/homepage/CommunityStatsItems.js +1 -1
  7. package/dist/components/homepage/Counter.d.ts +1 -0
  8. package/dist/components/homepage/Counter.js +15 -7
  9. package/dist/components/homepage/Demo/DisplayedEmoji.js +17 -3
  10. package/dist/components/homepage/FreePricing.js +20 -25
  11. package/dist/components/homepage/GitHubButton.js +1 -1
  12. package/dist/components/homepage/IconForTemplate.js +4 -0
  13. package/dist/components/homepage/IfYouKnowReact.js +5 -2
  14. package/dist/components/homepage/MoreVideoPowerSection.d.ts +2 -0
  15. package/dist/components/homepage/MoreVideoPowerSection.js +16 -0
  16. package/dist/components/homepage/NewsletterButton.js +3 -2
  17. package/dist/components/homepage/ParameterizeAndEdit.d.ts +2 -0
  18. package/dist/components/homepage/ParameterizeAndEdit.js +22 -0
  19. package/dist/components/homepage/RealMp4Videos.js +10 -1
  20. package/dist/components/homepage/VideoAppsShowcase.js +6 -3
  21. package/dist/components/homepage/VideoAppsTitle.d.ts +0 -1
  22. package/dist/components/homepage/VideoAppsTitle.js +1 -4
  23. package/dist/components/icons/recorder.d.ts +3 -0
  24. package/dist/components/icons/recorder.js +4 -0
  25. package/dist/homepage/Pricing.js +131 -90
  26. package/dist/tailwind.css +115 -55
  27. package/package.json +10 -10
  28. package/public/img/editing-safari.mp4 +0 -0
  29. package/public/img/editing-vp9-chrome.webm +0 -0
  30. package/public/img/media-parser.png +0 -0
  31. package/public/img/recorder.png +0 -0
  32. package/public/img/webcodecs.png +0 -0
  33. package/src/components/Homepage.tsx +12 -12
  34. package/src/components/homepage/CommunityStats.tsx +1 -1
  35. package/src/components/homepage/Counter.tsx +17 -7
  36. package/src/components/homepage/Demo/DisplayedEmoji.tsx +22 -4
  37. package/src/components/homepage/FreePricing.tsx +88 -65
  38. package/src/components/homepage/IconForTemplate.tsx +5 -0
  39. package/src/components/homepage/IfYouKnowReact.tsx +26 -14
  40. package/src/components/homepage/MoreVideoPowerSection.tsx +95 -0
  41. package/src/components/homepage/NewsletterButton.tsx +6 -5
  42. package/src/components/homepage/ParameterizeAndEdit.tsx +89 -0
  43. package/src/components/homepage/RealMp4Videos.tsx +55 -13
  44. package/src/components/homepage/VideoAppsShowcase.tsx +21 -10
  45. package/src/components/homepage/VideoAppsTitle.tsx +0 -13
  46. package/src/components/icons/recorder.tsx +23 -0
  47. package/dist/components/homepage/Editor.d.ts +0 -2
  48. package/dist/components/homepage/Editor.js +0 -37
  49. package/public/img/player-demo.mp4 +0 -0
  50. package/src/components/homepage/Editor.tsx +0 -67
package/dist/tailwind.css CHANGED
@@ -70,6 +70,7 @@
70
70
  --font-weight-black: 900;
71
71
  --leading-snug: 1.375;
72
72
  --leading-relaxed: 1.625;
73
+ --radius-sm: 0.25rem;
73
74
  --radius-lg: 0.5rem;
74
75
  --radius-xl: 0.75rem;
75
76
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
@@ -153,32 +154,38 @@
153
154
  .-mt-2 {
154
155
  margin-top: calc(var(--spacing) * -2);
155
156
  }
156
- .-mt-10 {
157
- margin-top: calc(var(--spacing) * -10);
157
+ .-mt-4 {
158
+ margin-top: calc(var(--spacing) * -4);
158
159
  }
159
160
  .-mt-20 {
160
161
  margin-top: calc(var(--spacing) * -20);
161
162
  }
162
- .mt-1 {
163
- margin-top: calc(var(--spacing) * 1);
163
+ .mt-0 {
164
+ margin-top: calc(var(--spacing) * 0);
164
165
  }
165
166
  .mt-2 {
166
167
  margin-top: calc(var(--spacing) * 2);
167
168
  }
169
+ .mt-3 {
170
+ margin-top: calc(var(--spacing) * 3);
171
+ }
168
172
  .mt-4 {
169
173
  margin-top: calc(var(--spacing) * 4);
170
174
  }
175
+ .mt-8 {
176
+ margin-top: calc(var(--spacing) * 8);
177
+ }
171
178
  .mt-20 {
172
179
  margin-top: calc(var(--spacing) * 20);
173
180
  }
181
+ .mt-40 {
182
+ margin-top: calc(var(--spacing) * 40);
183
+ }
174
184
  .mt-\[3px\] {
175
185
  margin-top: 3px;
176
186
  }
177
- .-mb-20 {
178
- margin-bottom: calc(var(--spacing) * -20);
179
- }
180
- .-mb-50 {
181
- margin-bottom: calc(var(--spacing) * -50);
187
+ .-mb-40 {
188
+ margin-bottom: calc(var(--spacing) * -40);
182
189
  }
183
190
  .mb-4 {
184
191
  margin-bottom: calc(var(--spacing) * 4);
@@ -243,26 +250,20 @@
243
250
  .h-2 {
244
251
  height: calc(var(--spacing) * 2);
245
252
  }
253
+ .h-4 {
254
+ height: calc(var(--spacing) * 4);
255
+ }
246
256
  .h-5 {
247
257
  height: calc(var(--spacing) * 5);
248
258
  }
249
- .h-7 {
250
- height: calc(var(--spacing) * 7);
251
- }
252
259
  .h-8 {
253
260
  height: calc(var(--spacing) * 8);
254
261
  }
255
- .h-10 {
256
- height: calc(var(--spacing) * 10);
257
- }
258
262
  .h-12 {
259
263
  height: calc(var(--spacing) * 12);
260
264
  }
261
- .h-\[550px\] {
262
- height: 550px;
263
- }
264
- .h-\[600px\] {
265
- height: 600px;
265
+ .h-auto {
266
+ height: auto;
266
267
  }
267
268
  .h-full {
268
269
  height: 100%;
@@ -294,15 +295,15 @@
294
295
  .w-\[90vw\] {
295
296
  width: 90vw;
296
297
  }
297
- .w-\[110px\] {
298
- width: 110px;
298
+ .w-\[140px\] {
299
+ width: 140px;
300
+ }
301
+ .w-\[500px\] {
302
+ width: 500px;
299
303
  }
300
304
  .w-\[550px\] {
301
305
  width: 550px;
302
306
  }
303
- .w-\[600px\] {
304
- width: 600px;
305
- }
306
307
  .w-auto {
307
308
  width: auto;
308
309
  }
@@ -321,9 +322,6 @@
321
322
  .min-w-0 {
322
323
  min-width: calc(var(--spacing) * 0);
323
324
  }
324
- .min-w-\[60px\] {
325
- min-width: 60px;
326
- }
327
325
  .min-w-\[80px\] {
328
326
  min-width: 80px;
329
327
  }
@@ -362,15 +360,15 @@
362
360
  .grid-flow-col {
363
361
  grid-auto-flow: column;
364
362
  }
363
+ .grid-cols-1 {
364
+ grid-template-columns: repeat(1, minmax(0, 1fr));
365
+ }
365
366
  .grid-rows-1 {
366
367
  grid-template-rows: repeat(1, minmax(0, 1fr));
367
368
  }
368
369
  .flex-col {
369
370
  flex-direction: column;
370
371
  }
371
- .flex-col-reverse {
372
- flex-direction: column-reverse;
373
- }
374
372
  .flex-row {
375
373
  flex-direction: row;
376
374
  }
@@ -401,6 +399,9 @@
401
399
  .justify-start {
402
400
  justify-content: flex-start;
403
401
  }
402
+ .gap-1 {
403
+ gap: calc(var(--spacing) * 1);
404
+ }
404
405
  .gap-2 {
405
406
  gap: calc(var(--spacing) * 2);
406
407
  }
@@ -413,6 +414,9 @@
413
414
  .gap-4 {
414
415
  gap: calc(var(--spacing) * 4);
415
416
  }
417
+ .gap-6 {
418
+ gap: calc(var(--spacing) * 6);
419
+ }
416
420
  .gap-10 {
417
421
  gap: calc(var(--spacing) * 10);
418
422
  }
@@ -449,6 +453,9 @@
449
453
  .rounded-lg {
450
454
  border-radius: var(--radius-lg);
451
455
  }
456
+ .rounded-sm {
457
+ border-radius: var(--radius-sm);
458
+ }
452
459
  .rounded-xl {
453
460
  border-radius: var(--radius-xl);
454
461
  }
@@ -474,6 +481,10 @@
474
481
  border-style: var(--tw-border-style);
475
482
  border-width: 5px;
476
483
  }
484
+ .border-b {
485
+ border-bottom-style: var(--tw-border-style);
486
+ border-bottom-width: 1px;
487
+ }
477
488
  .border-b-2 {
478
489
  border-bottom-style: var(--tw-border-style);
479
490
  border-bottom-width: 2px;
@@ -494,6 +505,9 @@
494
505
  --tw-border-style: solid;
495
506
  border-style: solid;
496
507
  }
508
+ .border-\[var\(--border\)\] {
509
+ border-color: var(--border);
510
+ }
497
511
  .border-black {
498
512
  border-color: var(--color-black);
499
513
  }
@@ -563,9 +577,15 @@
563
577
  .p-3 {
564
578
  padding: calc(var(--spacing) * 3);
565
579
  }
580
+ .p-4 {
581
+ padding: calc(var(--spacing) * 4);
582
+ }
566
583
  .p-5 {
567
584
  padding: calc(var(--spacing) * 5);
568
585
  }
586
+ .p-6 {
587
+ padding: calc(var(--spacing) * 6);
588
+ }
569
589
  .px-3 {
570
590
  padding-inline: calc(var(--spacing) * 3);
571
591
  }
@@ -578,8 +598,8 @@
578
598
  .py-3 {
579
599
  padding-block: calc(var(--spacing) * 3);
580
600
  }
581
- .pt-8 {
582
- padding-top: calc(var(--spacing) * 8);
601
+ .pt-4 {
602
+ padding-top: calc(var(--spacing) * 4);
583
603
  }
584
604
  .pt-20 {
585
605
  padding-top: calc(var(--spacing) * 20);
@@ -590,9 +610,6 @@
590
610
  .pr-5 {
591
611
  padding-right: calc(var(--spacing) * 5);
592
612
  }
593
- .pb-6 {
594
- padding-bottom: calc(var(--spacing) * 6);
595
- }
596
613
  .pl-4 {
597
614
  padding-left: calc(var(--spacing) * 4);
598
615
  }
@@ -615,6 +632,9 @@
615
632
  font-family: 'GTPlanar', sans-serif;
616
633
  font-feature-settings: 'ss03' on;
617
634
  }
635
+ .font-brand {
636
+ font-family: 'GTPlanar', sans-serif;
637
+ }
618
638
  .font-mono {
619
639
  font-family: var(--font-mono);
620
640
  }
@@ -653,6 +673,10 @@
653
673
  font-size: var(--text-xs);
654
674
  line-height: var(--tw-leading, var(--text-xs--line-height));
655
675
  }
676
+ .leading-6 {
677
+ --tw-leading: calc(var(--spacing) * 6);
678
+ line-height: calc(var(--spacing) * 6);
679
+ }
656
680
  .leading-none {
657
681
  --tw-leading: 1;
658
682
  line-height: 1;
@@ -775,6 +799,20 @@
775
799
  --tw-outline-style: none;
776
800
  outline-style: none;
777
801
  }
802
+ .group-hover\:opacity-100 {
803
+ &:is(:where(.group):hover *) {
804
+ @media (hover: hover) {
805
+ opacity: 100%;
806
+ }
807
+ }
808
+ }
809
+ .hover\:bg-\[var\(--hover\)\] {
810
+ &:hover {
811
+ @media (hover: hover) {
812
+ background-color: var(--hover);
813
+ }
814
+ }
815
+ }
778
816
  .hover\:text-brand {
779
817
  &:hover {
780
818
  @media (hover: hover) {
@@ -804,11 +842,31 @@
804
842
  opacity: 100%;
805
843
  }
806
844
  }
845
+ .md\:mt-0 {
846
+ @media (width >= 48rem) {
847
+ margin-top: calc(var(--spacing) * 0);
848
+ }
849
+ }
850
+ .md\:block {
851
+ @media (width >= 48rem) {
852
+ display: block;
853
+ }
854
+ }
807
855
  .md\:w-auto {
808
856
  @media (width >= 48rem) {
809
857
  width: auto;
810
858
  }
811
859
  }
860
+ .md\:flex-row {
861
+ @media (width >= 48rem) {
862
+ flex-direction: row;
863
+ }
864
+ }
865
+ .md\:items-center {
866
+ @media (width >= 48rem) {
867
+ align-items: center;
868
+ }
869
+ }
812
870
  .md\:overflow-x-visible {
813
871
  @media (width >= 48rem) {
814
872
  overflow-x: visible;
@@ -834,6 +892,11 @@
834
892
  margin-top: calc(var(--spacing) * 0);
835
893
  }
836
894
  }
895
+ .lg\:mt-30 {
896
+ @media (width >= 64rem) {
897
+ margin-top: calc(var(--spacing) * 30);
898
+ }
899
+ }
837
900
  .lg\:mb-0 {
838
901
  @media (width >= 64rem) {
839
902
  margin-bottom: calc(var(--spacing) * 0);
@@ -869,11 +932,6 @@
869
932
  min-width: 700px;
870
933
  }
871
934
  }
872
- .lg\:flex-1 {
873
- @media (width >= 64rem) {
874
- flex: 1;
875
- }
876
- }
877
935
  .lg\:-translate-x-8 {
878
936
  @media (width >= 64rem) {
879
937
  --tw-translate-x: calc(var(--spacing) * -8);
@@ -892,39 +950,41 @@
892
950
  translate: var(--tw-translate-x) var(--tw-translate-y);
893
951
  }
894
952
  }
895
- .lg\:flex-row {
953
+ .lg\:grid-cols-3 {
896
954
  @media (width >= 64rem) {
897
- flex-direction: row;
955
+ grid-template-columns: repeat(3, minmax(0, 1fr));
898
956
  }
899
957
  }
900
- .lg\:flex-row-reverse {
958
+ .lg\:flex-row {
901
959
  @media (width >= 64rem) {
902
- flex-direction: row-reverse;
960
+ flex-direction: row;
903
961
  }
904
962
  }
905
- .lg\:items-center {
963
+ .lg\:justify-end {
906
964
  @media (width >= 64rem) {
907
- align-items: center;
965
+ justify-content: flex-end;
908
966
  }
909
967
  }
910
- .lg\:justify-end {
968
+ .lg\:justify-start {
911
969
  @media (width >= 64rem) {
912
- justify-content: flex-end;
970
+ justify-content: flex-start;
913
971
  }
914
972
  }
915
- .lg\:stroke-\[0\.035\] {
973
+ .lg\:border-r-2 {
916
974
  @media (width >= 64rem) {
917
- stroke-width: 0.035;
975
+ border-right-style: var(--tw-border-style);
976
+ border-right-width: 2px;
918
977
  }
919
978
  }
920
- .lg\:pl-4 {
979
+ .lg\:border-b-0 {
921
980
  @media (width >= 64rem) {
922
- padding-left: calc(var(--spacing) * 4);
981
+ border-bottom-style: var(--tw-border-style);
982
+ border-bottom-width: 0px;
923
983
  }
924
984
  }
925
- .lg\:text-right {
985
+ .lg\:stroke-\[0\.035\] {
926
986
  @media (width >= 64rem) {
927
- text-align: right;
987
+ stroke-width: 0.035;
928
988
  }
929
989
  }
930
990
  .lg\:text-\[5em\] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/promo-pages",
3
- "version": "4.0.314",
3
+ "version": "4.0.317",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,14 +10,14 @@
10
10
  "polished": "4.3.1",
11
11
  "zod": "3.22.3",
12
12
  "bun-plugin-tailwind": "0.0.15",
13
- "@remotion/animated-emoji": "4.0.314",
14
- "@remotion/lambda": "4.0.314",
15
- "@remotion/paths": "4.0.314",
16
- "@remotion/player": "4.0.314",
17
- "@remotion/shapes": "4.0.314",
18
- "create-video": "4.0.314",
19
- "@remotion/lottie": "4.0.314",
20
- "remotion": "4.0.314"
13
+ "@remotion/lambda": "4.0.317",
14
+ "@remotion/lottie": "4.0.317",
15
+ "@remotion/player": "4.0.317",
16
+ "@remotion/animated-emoji": "4.0.317",
17
+ "create-video": "4.0.317",
18
+ "remotion": "4.0.317",
19
+ "@remotion/shapes": "4.0.317",
20
+ "@remotion/paths": "4.0.317"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@eslint/eslintrc": "3.1.0",
@@ -34,7 +34,7 @@
34
34
  "tailwind-merge": "2.5.2",
35
35
  "bun-plugin-tailwind": "0.0.13",
36
36
  "clsx": "2.1.1",
37
- "@remotion/eslint-config-internal": "4.0.314"
37
+ "@remotion/eslint-config-internal": "4.0.317"
38
38
  },
39
39
  "repository": {
40
40
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/promo-pages"
Binary file
Binary file
Binary file
Binary file
@@ -4,18 +4,18 @@ import React from 'react';
4
4
  import {BackgroundAnimation} from './homepage/BackgroundAnimation';
5
5
  import CommunityStats from './homepage/CommunityStats';
6
6
  import {Demo} from './homepage/Demo';
7
- import {LightningFastEditor} from './homepage/Editor';
8
7
  import EvaluateRemotionSection from './homepage/EvaluateRemotion';
9
8
  import {IfYouKnowReact} from './homepage/IfYouKnowReact';
10
9
  import type {ColorMode} from './homepage/layout/use-color-mode';
11
10
  import {ColorModeProvider} from './homepage/layout/use-color-mode';
11
+ import {MoreVideoPowerSection} from './homepage/MoreVideoPowerSection';
12
12
  import {NewsletterButton} from './homepage/NewsletterButton';
13
+ import {ParameterizeAndEdit} from './homepage/ParameterizeAndEdit';
13
14
  import {Pricing} from './homepage/Pricing';
14
15
  import {RealMP4Videos} from './homepage/RealMp4Videos';
15
16
  import TrustedByBanner from './homepage/TrustedByBanner';
16
- import {VideoApps} from './homepage/VideoApps';
17
17
  import VideoAppsShowcase from './homepage/VideoAppsShowcase';
18
- import {SectionTitle, VideoAppsTitle} from './homepage/VideoAppsTitle';
18
+ import {SectionTitle} from './homepage/VideoAppsTitle';
19
19
  import {WriteInReact} from './homepage/WriteInReact';
20
20
 
21
21
  export const NewLanding: React.FC<{
@@ -37,19 +37,11 @@ export const NewLanding: React.FC<{
37
37
  <WriteInReact />
38
38
  <br />
39
39
  <IfYouKnowReact />
40
+ <ParameterizeAndEdit />
40
41
  <RealMP4Videos />
41
42
  <br />
42
43
  <br />
43
44
  <br />
44
- <br />
45
- <LightningFastEditor />
46
- <br />
47
- <br />
48
- <br />
49
- <VideoAppsTitle />
50
- <VideoApps active="remotion" />
51
- <br />
52
- <br />
53
45
  <VideoAppsShowcase />
54
46
  <br />
55
47
  <br />
@@ -69,6 +61,14 @@ export const NewLanding: React.FC<{
69
61
  <br />
70
62
  <br />
71
63
  <br />
64
+ <SectionTitle>Even more power to developers</SectionTitle>
65
+ <div className={'fontbrand text-center mb-10 -mt-4'}>
66
+ Innovative video products that you might enjoy.
67
+ </div>
68
+ <MoreVideoPowerSection />
69
+ <br />
70
+ <br />
71
+ <br />
72
72
  <NewsletterButton />
73
73
  <br />
74
74
  <br />
@@ -25,7 +25,7 @@ const SectionLink: React.FC<{
25
25
  const CommunityStats: React.FC = () => (
26
26
  <div className={'m-auto max-w-[700px] text-center'}>
27
27
  <SectionTitle>Never build alone</SectionTitle>
28
- <div className={'fontbrand text-center mb-10'}>
28
+ <div className={'fontbrand text-center mb-10 -mt-4'}>
29
29
  Join a thriving community of developers.
30
30
  </div>
31
31
  <div className={'flex flex-wrap justify-between gap-4 w-full items-center'}>
@@ -47,40 +47,50 @@ interface CounterProps {
47
47
  readonly count: number;
48
48
  readonly setCount: (count: number) => void;
49
49
  readonly minCount?: number;
50
+ readonly step?: number;
50
51
  }
51
52
 
52
53
  export const Counter: React.FC<CounterProps> = ({
53
54
  count,
54
55
  setCount,
55
56
  minCount = 0,
57
+ step = 1,
56
58
  }) => {
57
59
  const decrement = () => {
58
60
  if (count > minCount) {
59
- setCount(count - 1);
61
+ setCount(Math.max(minCount, count - step));
60
62
  }
61
63
  };
62
64
 
63
65
  const increment = () => {
64
- setCount(count + 1);
66
+ setCount(count + step);
65
67
  };
66
68
 
67
69
  return (
68
- <div style={container} className={cn('border-effect w-[110px] text-text')}>
70
+ <div style={container} className={cn('border-effect w-[140px] text-text')}>
69
71
  <input
70
72
  className={
71
- 'fontbrand text-2xl font-medium min-w-[60px] border-0 text-end bg-transparent outline-0 text-text'
73
+ 'fontbrand text-2xl font-medium min-w-[80px] border-0 text-end bg-transparent outline-0 text-text'
72
74
  }
73
75
  type="number"
74
76
  onClick={(e) => e.currentTarget.select()}
75
77
  value={count}
76
78
  onChange={(e: ChangeEvent<HTMLInputElement>) => {
77
79
  if (e.target.value.trim() === '') {
78
- setCount(1);
80
+ setCount(step === 1 ? 1 : minCount);
79
81
  return;
80
82
  }
81
83
 
82
- const max = Math.max(parseInt(e.target.value, 10), 1);
83
- setCount(max);
84
+ const inputValue = parseInt(e.target.value, 10);
85
+ const validValue = Math.max(inputValue, minCount);
86
+
87
+ // For steps > 1, round to the nearest valid step
88
+ if (step > 1) {
89
+ const roundedValue = Math.round(validValue / step) * step;
90
+ setCount(Math.max(roundedValue, minCount));
91
+ } else {
92
+ setCount(validValue);
93
+ }
84
94
  }}
85
95
  />
86
96
  <div className="flex flex-col ml-3 h-full">
@@ -1,6 +1,5 @@
1
1
  import type {EmojiName} from '@remotion/animated-emoji';
2
- import type {LottieAnimationData} from '@remotion/lottie';
3
- import {Lottie, getLottieMetadata} from '@remotion/lottie';
2
+ import type {Lottie, LottieAnimationData} from '@remotion/lottie';
4
3
  import React, {useEffect, useMemo, useState} from 'react';
5
4
  import {
6
5
  cancelRender,
@@ -20,6 +19,9 @@ export const DisplayedEmoji: React.FC<{
20
19
  }> = ({emoji}) => {
21
20
  const [data, setData] = useState<Data | null>(null);
22
21
  const {durationInFrames, fps} = useVideoConfig();
22
+ const [browser, setBrowser] = useState<boolean>(
23
+ typeof document !== 'undefined',
24
+ );
23
25
 
24
26
  const src = useMemo(() => {
25
27
  if (emoji === 'melting') {
@@ -40,8 +42,14 @@ export const DisplayedEmoji: React.FC<{
40
42
  const [handle] = useState(() => delayRender());
41
43
 
42
44
  useEffect(() => {
43
- Promise.all([fetch(src).then((res) => res.json())])
44
- .then(([json]) => {
45
+ Promise.all([
46
+ fetch(src).then((res) => res.json()),
47
+ import('@remotion/lottie').then(({Lottie, getLottieMetadata}) => ({
48
+ Lottie,
49
+ getLottieMetadata,
50
+ })),
51
+ ])
52
+ .then(([json, {Lottie, getLottieMetadata}]) => {
45
53
  setData({
46
54
  Lottie,
47
55
  duration: getLottieMetadata(json)?.durationInSeconds as number,
@@ -54,6 +62,16 @@ export const DisplayedEmoji: React.FC<{
54
62
  });
55
63
  }, [handle, src]);
56
64
 
65
+ useEffect(() => {
66
+ if (typeof document !== 'undefined') {
67
+ setBrowser(true);
68
+ }
69
+ }, []);
70
+
71
+ if (!browser) {
72
+ return null;
73
+ }
74
+
57
75
  if (!data) {
58
76
  return null;
59
77
  }