@remotion/studio 4.0.351 → 4.0.352

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.
@@ -2600,7 +2600,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
2600
2600
  renderTypeOfLastRender: null,
2601
2601
  defaulMetadata: defaults.metadata,
2602
2602
  initialHardwareAcceleration: defaults.hardwareAcceleration,
2603
- initialChromeMode: defaults.chromeMode
2603
+ initialChromeMode: defaults.chromeMode,
2604
+ initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
2604
2605
  });
2605
2606
  if (isMobileLayout) {
2606
2607
  setSidebarCollapsedState({ left: "collapsed", right: "collapsed" });
@@ -3230,7 +3231,8 @@ var addStillRenderJob = ({
3230
3231
  multiProcessOnLinux,
3231
3232
  beepOnFinish,
3232
3233
  metadata,
3233
- chromeMode
3234
+ chromeMode,
3235
+ mediaCacheSizeInBytes
3234
3236
  }) => {
3235
3237
  return callApi("/api/render", {
3236
3238
  compositionId,
@@ -3254,7 +3256,8 @@ var addStillRenderJob = ({
3254
3256
  multiProcessOnLinux,
3255
3257
  beepOnFinish,
3256
3258
  metadata,
3257
- chromeMode
3259
+ chromeMode,
3260
+ mediaCacheSizeInBytes
3258
3261
  });
3259
3262
  };
3260
3263
  var addSequenceRenderJob = ({
@@ -3278,7 +3281,8 @@ var addSequenceRenderJob = ({
3278
3281
  beepOnFinish,
3279
3282
  repro,
3280
3283
  metadata,
3281
- chromeMode
3284
+ chromeMode,
3285
+ mediaCacheSizeInBytes
3282
3286
  }) => {
3283
3287
  return callApi("/api/render", {
3284
3288
  compositionId,
@@ -3306,7 +3310,8 @@ var addSequenceRenderJob = ({
3306
3310
  beepOnFinish,
3307
3311
  repro,
3308
3312
  metadata,
3309
- chromeMode
3313
+ chromeMode,
3314
+ mediaCacheSizeInBytes
3310
3315
  });
3311
3316
  };
3312
3317
  var addVideoRenderJob = ({
@@ -3348,7 +3353,8 @@ var addVideoRenderJob = ({
3348
3353
  separateAudioTo,
3349
3354
  metadata,
3350
3355
  hardwareAcceleration,
3351
- chromeMode
3356
+ chromeMode,
3357
+ mediaCacheSizeInBytes
3352
3358
  }) => {
3353
3359
  return callApi("/api/render", {
3354
3360
  compositionId,
@@ -3394,7 +3400,8 @@ var addVideoRenderJob = ({
3394
3400
  separateAudioTo,
3395
3401
  metadata,
3396
3402
  hardwareAcceleration,
3397
- chromeMode
3403
+ chromeMode,
3404
+ mediaCacheSizeInBytes
3398
3405
  });
3399
3406
  };
3400
3407
  var unsubscribeFromFileExistenceWatcher = ({
@@ -15784,7 +15791,8 @@ var makeRetryPayload = (job) => {
15784
15791
  defaulMetadata: job.metadata,
15785
15792
  renderTypeOfLastRender: "still",
15786
15793
  initialHardwareAcceleration: defaults.hardwareAcceleration,
15787
- initialChromeMode: job.chromeMode
15794
+ initialChromeMode: job.chromeMode,
15795
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
15788
15796
  };
15789
15797
  }
15790
15798
  if (job.type === "sequence") {
@@ -15833,7 +15841,8 @@ var makeRetryPayload = (job) => {
15833
15841
  defaulMetadata: job.metadata,
15834
15842
  renderTypeOfLastRender: "sequence",
15835
15843
  initialHardwareAcceleration: defaults.hardwareAcceleration,
15836
- initialChromeMode: job.chromeMode
15844
+ initialChromeMode: job.chromeMode,
15845
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
15837
15846
  };
15838
15847
  }
15839
15848
  if (job.type === "video") {
@@ -15882,7 +15891,8 @@ var makeRetryPayload = (job) => {
15882
15891
  defaulMetadata: job.metadata,
15883
15892
  renderTypeOfLastRender: "video",
15884
15893
  initialHardwareAcceleration: job.hardwareAcceleration,
15885
- initialChromeMode: job.chromeMode
15894
+ initialChromeMode: job.chromeMode,
15895
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
15886
15896
  };
15887
15897
  }
15888
15898
  throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
@@ -17579,7 +17589,8 @@ var RenderButton = () => {
17579
17589
  renderTypeOfLastRender: null,
17580
17590
  defaulMetadata: defaults.metadata,
17581
17591
  initialHardwareAcceleration: defaults.hardwareAcceleration,
17582
- initialChromeMode: defaults.chromeMode
17592
+ initialChromeMode: defaults.chromeMode,
17593
+ initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
17583
17594
  });
17584
17595
  }, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
17585
17596
  if (!video) {
@@ -42321,6 +42332,8 @@ var RenderModalAdvanced = ({
42321
42332
  setx264Preset,
42322
42333
  x264Preset,
42323
42334
  codec,
42335
+ setMediaCacheSizeInBytes,
42336
+ mediaCacheSizeInBytes,
42324
42337
  offthreadVideoCacheSizeInBytes,
42325
42338
  setOffthreadVideoCacheSizeInBytes,
42326
42339
  offthreadVideoThreads,
@@ -42349,6 +42362,14 @@ var RenderModalAdvanced = ({
42349
42362
  "default"
42350
42363
  ];
42351
42364
  }, []);
42365
+ const toggleCustomMediaCacheSizeInBytes = useCallback113(() => {
42366
+ setMediaCacheSizeInBytes((previous) => {
42367
+ if (previous === null) {
42368
+ return 1000 * 1000 * 1000;
42369
+ }
42370
+ return null;
42371
+ });
42372
+ }, [setMediaCacheSizeInBytes]);
42352
42373
  const toggleCustomOffthreadVideoCacheSizeInBytes = useCallback113(() => {
42353
42374
  setOffthreadVideoCacheSizeInBytes((previous) => {
42354
42375
  if (previous === null) {
@@ -42460,6 +42481,17 @@ var RenderModalAdvanced = ({
42460
42481
  };
42461
42482
  });
42462
42483
  }, [hardwareAcceleration, setHardwareAcceleration]);
42484
+ const changeMediaCacheSizeInBytes = useCallback113((cb) => {
42485
+ setMediaCacheSizeInBytes((prev) => {
42486
+ if (prev === null) {
42487
+ throw new TypeError("Expected previous value");
42488
+ }
42489
+ if (typeof cb === "function") {
42490
+ return cb(prev);
42491
+ }
42492
+ return cb;
42493
+ });
42494
+ }, [setMediaCacheSizeInBytes]);
42463
42495
  const changeOffthreadVideoCacheSizeInBytes = useCallback113((cb) => {
42464
42496
  setOffthreadVideoCacheSizeInBytes((prev) => {
42465
42497
  if (prev === null) {
@@ -42572,6 +42604,38 @@ var RenderModalAdvanced = ({
42572
42604
  })
42573
42605
  ]
42574
42606
  }),
42607
+ renderMode === "audio" ? null : /* @__PURE__ */ jsxs117("div", {
42608
+ style: optionRow,
42609
+ children: [
42610
+ /* @__PURE__ */ jsx237("div", {
42611
+ style: label5,
42612
+ children: "Custom @remotion/media cache size"
42613
+ }),
42614
+ /* @__PURE__ */ jsx237(Spacing, {
42615
+ x: 0.5
42616
+ }),
42617
+ /* @__PURE__ */ jsx237(OptionExplainerBubble, {
42618
+ id: "mediaCacheSizeInBytesOption"
42619
+ }),
42620
+ /* @__PURE__ */ jsx237("div", {
42621
+ style: rightRow,
42622
+ children: /* @__PURE__ */ jsx237(Checkbox, {
42623
+ checked: mediaCacheSizeInBytes !== null,
42624
+ onChange: toggleCustomMediaCacheSizeInBytes,
42625
+ name: "media-cache-size"
42626
+ })
42627
+ })
42628
+ ]
42629
+ }),
42630
+ renderMode === "audio" || mediaCacheSizeInBytes === null ? null : /* @__PURE__ */ jsx237(NumberSetting, {
42631
+ min: 0,
42632
+ max: 2000 * 1024 * 1024,
42633
+ step: 1024,
42634
+ name: "@remotion/media cache size",
42635
+ formatter: (w) => `${w} bytes`,
42636
+ onValueChanged: changeMediaCacheSizeInBytes,
42637
+ value: mediaCacheSizeInBytes
42638
+ }),
42575
42639
  renderMode === "audio" ? null : /* @__PURE__ */ jsxs117("div", {
42576
42640
  style: optionRow,
42577
42641
  children: [
@@ -44474,6 +44538,7 @@ var RenderModal = ({
44474
44538
  initialEncodingBufferSize,
44475
44539
  initialEncodingMaxRate,
44476
44540
  initialOffthreadVideoThreads,
44541
+ initialMediaCacheSizeInBytes,
44477
44542
  initialUserAgent,
44478
44543
  defaultProps,
44479
44544
  inFrameMark,
@@ -44594,6 +44659,7 @@ var RenderModal = ({
44594
44659
  const [delayRenderTimeout, setDelayRenderTimeout] = useState77(() => initialDelayRenderTimeout);
44595
44660
  const [chromeMode, setChromeMode] = useState77(() => initialChromeMode);
44596
44661
  const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState77(initialOffthreadVideoCacheSizeInBytes);
44662
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState77(initialMediaCacheSizeInBytes);
44597
44663
  const [offthreadVideoThreads, setOffthreadVideoThreads] = useState77(() => initialOffthreadVideoThreads);
44598
44664
  const codec = useMemo125(() => {
44599
44665
  if (renderMode === "audio") {
@@ -44777,7 +44843,8 @@ var RenderModal = ({
44777
44843
  beepOnFinish,
44778
44844
  metadata,
44779
44845
  chromeMode,
44780
- offthreadVideoThreads
44846
+ offthreadVideoThreads,
44847
+ mediaCacheSizeInBytes
44781
44848
  }).then(() => {
44782
44849
  dispatchIfMounted({ type: "succeed" });
44783
44850
  setSelectedModal(null);
@@ -44804,7 +44871,8 @@ var RenderModal = ({
44804
44871
  setSelectedModal,
44805
44872
  metadata,
44806
44873
  chromeMode,
44807
- offthreadVideoThreads
44874
+ offthreadVideoThreads,
44875
+ mediaCacheSizeInBytes
44808
44876
  ]);
44809
44877
  const [everyNthFrameSetting, setEveryNthFrameSetting] = useState77(() => initialEveryNthFrame);
44810
44878
  const everyNthFrame = useMemo125(() => {
@@ -44867,7 +44935,8 @@ var RenderModal = ({
44867
44935
  metadata,
44868
44936
  hardwareAcceleration,
44869
44937
  chromeMode,
44870
- offthreadVideoThreads
44938
+ offthreadVideoThreads,
44939
+ mediaCacheSizeInBytes
44871
44940
  }).then(() => {
44872
44941
  dispatchIfMounted({ type: "succeed" });
44873
44942
  setSelectedModal(null);
@@ -44918,7 +44987,8 @@ var RenderModal = ({
44918
44987
  metadata,
44919
44988
  hardwareAcceleration,
44920
44989
  chromeMode,
44921
- offthreadVideoThreads
44990
+ offthreadVideoThreads,
44991
+ mediaCacheSizeInBytes
44922
44992
  ]);
44923
44993
  const onClickSequence = useCallback124(() => {
44924
44994
  setSidebarCollapsedState({ left: null, right: "expanded" });
@@ -44946,7 +45016,8 @@ var RenderModal = ({
44946
45016
  repro,
44947
45017
  metadata,
44948
45018
  chromeMode,
44949
- offthreadVideoThreads
45019
+ offthreadVideoThreads,
45020
+ mediaCacheSizeInBytes
44950
45021
  }).then(() => {
44951
45022
  dispatchIfMounted({ type: "succeed" });
44952
45023
  setSelectedModal(null);
@@ -44977,7 +45048,8 @@ var RenderModal = ({
44977
45048
  setSelectedModal,
44978
45049
  metadata,
44979
45050
  chromeMode,
44980
- offthreadVideoThreads
45051
+ offthreadVideoThreads,
45052
+ mediaCacheSizeInBytes
44981
45053
  ]);
44982
45054
  useEffect75(() => {
44983
45055
  return () => {
@@ -45416,6 +45488,8 @@ var RenderModal = ({
45416
45488
  setEnvVariables,
45417
45489
  envVariables,
45418
45490
  offthreadVideoCacheSizeInBytes,
45491
+ setMediaCacheSizeInBytes,
45492
+ mediaCacheSizeInBytes,
45419
45493
  setOffthreadVideoCacheSizeInBytes,
45420
45494
  offthreadVideoThreads,
45421
45495
  setOffthreadVideoThreads,
@@ -46078,6 +46152,7 @@ var Modals = ({ readOnlyStudio }) => {
46078
46152
  initialLogLevel: modalContextType.initialLogLevel,
46079
46153
  initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes,
46080
46154
  initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads,
46155
+ initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes,
46081
46156
  initialConcurrency: modalContextType.initialConcurrency,
46082
46157
  maxConcurrency: modalContextType.maxConcurrency,
46083
46158
  minConcurrency: modalContextType.minConcurrency,
@@ -46753,15 +46828,6 @@ var getServerDisconnectedDomElement = () => {
46753
46828
  return document.getElementById("server-disconnected-overlay");
46754
46829
  };
46755
46830
  var Studio = ({ rootComponent, readOnly }) => {
46756
- useLayoutEffect2(() => {
46757
- window.remotion_isStudio = true;
46758
- window.remotion_isReadOnlyStudio = readOnly;
46759
- Internals66.enableSequenceStackTraces();
46760
- return () => {
46761
- window.remotion_isStudio = false;
46762
- window.remotion_isReadOnlyStudio = false;
46763
- };
46764
- }, [readOnly]);
46765
46831
  useLayoutEffect2(() => {
46766
46832
  injectCSS();
46767
46833
  }, []);
@@ -2605,7 +2605,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
2605
2605
  renderTypeOfLastRender: null,
2606
2606
  defaulMetadata: defaults.metadata,
2607
2607
  initialHardwareAcceleration: defaults.hardwareAcceleration,
2608
- initialChromeMode: defaults.chromeMode
2608
+ initialChromeMode: defaults.chromeMode,
2609
+ initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
2609
2610
  });
2610
2611
  if (isMobileLayout) {
2611
2612
  setSidebarCollapsedState({ left: "collapsed", right: "collapsed" });
@@ -3235,7 +3236,8 @@ var addStillRenderJob = ({
3235
3236
  multiProcessOnLinux,
3236
3237
  beepOnFinish,
3237
3238
  metadata,
3238
- chromeMode
3239
+ chromeMode,
3240
+ mediaCacheSizeInBytes
3239
3241
  }) => {
3240
3242
  return callApi("/api/render", {
3241
3243
  compositionId,
@@ -3259,7 +3261,8 @@ var addStillRenderJob = ({
3259
3261
  multiProcessOnLinux,
3260
3262
  beepOnFinish,
3261
3263
  metadata,
3262
- chromeMode
3264
+ chromeMode,
3265
+ mediaCacheSizeInBytes
3263
3266
  });
3264
3267
  };
3265
3268
  var addSequenceRenderJob = ({
@@ -3283,7 +3286,8 @@ var addSequenceRenderJob = ({
3283
3286
  beepOnFinish,
3284
3287
  repro,
3285
3288
  metadata,
3286
- chromeMode
3289
+ chromeMode,
3290
+ mediaCacheSizeInBytes
3287
3291
  }) => {
3288
3292
  return callApi("/api/render", {
3289
3293
  compositionId,
@@ -3311,7 +3315,8 @@ var addSequenceRenderJob = ({
3311
3315
  beepOnFinish,
3312
3316
  repro,
3313
3317
  metadata,
3314
- chromeMode
3318
+ chromeMode,
3319
+ mediaCacheSizeInBytes
3315
3320
  });
3316
3321
  };
3317
3322
  var addVideoRenderJob = ({
@@ -3353,7 +3358,8 @@ var addVideoRenderJob = ({
3353
3358
  separateAudioTo,
3354
3359
  metadata,
3355
3360
  hardwareAcceleration,
3356
- chromeMode
3361
+ chromeMode,
3362
+ mediaCacheSizeInBytes
3357
3363
  }) => {
3358
3364
  return callApi("/api/render", {
3359
3365
  compositionId,
@@ -3399,7 +3405,8 @@ var addVideoRenderJob = ({
3399
3405
  separateAudioTo,
3400
3406
  metadata,
3401
3407
  hardwareAcceleration,
3402
- chromeMode
3408
+ chromeMode,
3409
+ mediaCacheSizeInBytes
3403
3410
  });
3404
3411
  };
3405
3412
  var unsubscribeFromFileExistenceWatcher = ({
@@ -16064,7 +16071,8 @@ var makeRetryPayload = (job) => {
16064
16071
  defaulMetadata: job.metadata,
16065
16072
  renderTypeOfLastRender: "still",
16066
16073
  initialHardwareAcceleration: defaults.hardwareAcceleration,
16067
- initialChromeMode: job.chromeMode
16074
+ initialChromeMode: job.chromeMode,
16075
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
16068
16076
  };
16069
16077
  }
16070
16078
  if (job.type === "sequence") {
@@ -16113,7 +16121,8 @@ var makeRetryPayload = (job) => {
16113
16121
  defaulMetadata: job.metadata,
16114
16122
  renderTypeOfLastRender: "sequence",
16115
16123
  initialHardwareAcceleration: defaults.hardwareAcceleration,
16116
- initialChromeMode: job.chromeMode
16124
+ initialChromeMode: job.chromeMode,
16125
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
16117
16126
  };
16118
16127
  }
16119
16128
  if (job.type === "video") {
@@ -16162,7 +16171,8 @@ var makeRetryPayload = (job) => {
16162
16171
  defaulMetadata: job.metadata,
16163
16172
  renderTypeOfLastRender: "video",
16164
16173
  initialHardwareAcceleration: job.hardwareAcceleration,
16165
- initialChromeMode: job.chromeMode
16174
+ initialChromeMode: job.chromeMode,
16175
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes
16166
16176
  };
16167
16177
  }
16168
16178
  throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
@@ -17859,7 +17869,8 @@ var RenderButton = () => {
17859
17869
  renderTypeOfLastRender: null,
17860
17870
  defaulMetadata: defaults.metadata,
17861
17871
  initialHardwareAcceleration: defaults.hardwareAcceleration,
17862
- initialChromeMode: defaults.chromeMode
17872
+ initialChromeMode: defaults.chromeMode,
17873
+ initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes
17863
17874
  });
17864
17875
  }, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
17865
17876
  if (!video) {
@@ -42601,6 +42612,8 @@ var RenderModalAdvanced = ({
42601
42612
  setx264Preset,
42602
42613
  x264Preset,
42603
42614
  codec,
42615
+ setMediaCacheSizeInBytes,
42616
+ mediaCacheSizeInBytes,
42604
42617
  offthreadVideoCacheSizeInBytes,
42605
42618
  setOffthreadVideoCacheSizeInBytes,
42606
42619
  offthreadVideoThreads,
@@ -42629,6 +42642,14 @@ var RenderModalAdvanced = ({
42629
42642
  "default"
42630
42643
  ];
42631
42644
  }, []);
42645
+ const toggleCustomMediaCacheSizeInBytes = useCallback114(() => {
42646
+ setMediaCacheSizeInBytes((previous) => {
42647
+ if (previous === null) {
42648
+ return 1000 * 1000 * 1000;
42649
+ }
42650
+ return null;
42651
+ });
42652
+ }, [setMediaCacheSizeInBytes]);
42632
42653
  const toggleCustomOffthreadVideoCacheSizeInBytes = useCallback114(() => {
42633
42654
  setOffthreadVideoCacheSizeInBytes((previous) => {
42634
42655
  if (previous === null) {
@@ -42740,6 +42761,17 @@ var RenderModalAdvanced = ({
42740
42761
  };
42741
42762
  });
42742
42763
  }, [hardwareAcceleration, setHardwareAcceleration]);
42764
+ const changeMediaCacheSizeInBytes = useCallback114((cb) => {
42765
+ setMediaCacheSizeInBytes((prev) => {
42766
+ if (prev === null) {
42767
+ throw new TypeError("Expected previous value");
42768
+ }
42769
+ if (typeof cb === "function") {
42770
+ return cb(prev);
42771
+ }
42772
+ return cb;
42773
+ });
42774
+ }, [setMediaCacheSizeInBytes]);
42743
42775
  const changeOffthreadVideoCacheSizeInBytes = useCallback114((cb) => {
42744
42776
  setOffthreadVideoCacheSizeInBytes((prev) => {
42745
42777
  if (prev === null) {
@@ -42852,6 +42884,38 @@ var RenderModalAdvanced = ({
42852
42884
  })
42853
42885
  ]
42854
42886
  }),
42887
+ renderMode === "audio" ? null : /* @__PURE__ */ jsxs117("div", {
42888
+ style: optionRow,
42889
+ children: [
42890
+ /* @__PURE__ */ jsx238("div", {
42891
+ style: label5,
42892
+ children: "Custom @remotion/media cache size"
42893
+ }),
42894
+ /* @__PURE__ */ jsx238(Spacing, {
42895
+ x: 0.5
42896
+ }),
42897
+ /* @__PURE__ */ jsx238(OptionExplainerBubble, {
42898
+ id: "mediaCacheSizeInBytesOption"
42899
+ }),
42900
+ /* @__PURE__ */ jsx238("div", {
42901
+ style: rightRow,
42902
+ children: /* @__PURE__ */ jsx238(Checkbox, {
42903
+ checked: mediaCacheSizeInBytes !== null,
42904
+ onChange: toggleCustomMediaCacheSizeInBytes,
42905
+ name: "media-cache-size"
42906
+ })
42907
+ })
42908
+ ]
42909
+ }),
42910
+ renderMode === "audio" || mediaCacheSizeInBytes === null ? null : /* @__PURE__ */ jsx238(NumberSetting, {
42911
+ min: 0,
42912
+ max: 2000 * 1024 * 1024,
42913
+ step: 1024,
42914
+ name: "@remotion/media cache size",
42915
+ formatter: (w) => `${w} bytes`,
42916
+ onValueChanged: changeMediaCacheSizeInBytes,
42917
+ value: mediaCacheSizeInBytes
42918
+ }),
42855
42919
  renderMode === "audio" ? null : /* @__PURE__ */ jsxs117("div", {
42856
42920
  style: optionRow,
42857
42921
  children: [
@@ -44754,6 +44818,7 @@ var RenderModal = ({
44754
44818
  initialEncodingBufferSize,
44755
44819
  initialEncodingMaxRate,
44756
44820
  initialOffthreadVideoThreads,
44821
+ initialMediaCacheSizeInBytes,
44757
44822
  initialUserAgent,
44758
44823
  defaultProps,
44759
44824
  inFrameMark,
@@ -44874,6 +44939,7 @@ var RenderModal = ({
44874
44939
  const [delayRenderTimeout, setDelayRenderTimeout] = useState78(() => initialDelayRenderTimeout);
44875
44940
  const [chromeMode, setChromeMode] = useState78(() => initialChromeMode);
44876
44941
  const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState78(initialOffthreadVideoCacheSizeInBytes);
44942
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState78(initialMediaCacheSizeInBytes);
44877
44943
  const [offthreadVideoThreads, setOffthreadVideoThreads] = useState78(() => initialOffthreadVideoThreads);
44878
44944
  const codec = useMemo125(() => {
44879
44945
  if (renderMode === "audio") {
@@ -45057,7 +45123,8 @@ var RenderModal = ({
45057
45123
  beepOnFinish,
45058
45124
  metadata,
45059
45125
  chromeMode,
45060
- offthreadVideoThreads
45126
+ offthreadVideoThreads,
45127
+ mediaCacheSizeInBytes
45061
45128
  }).then(() => {
45062
45129
  dispatchIfMounted({ type: "succeed" });
45063
45130
  setSelectedModal(null);
@@ -45084,7 +45151,8 @@ var RenderModal = ({
45084
45151
  setSelectedModal,
45085
45152
  metadata,
45086
45153
  chromeMode,
45087
- offthreadVideoThreads
45154
+ offthreadVideoThreads,
45155
+ mediaCacheSizeInBytes
45088
45156
  ]);
45089
45157
  const [everyNthFrameSetting, setEveryNthFrameSetting] = useState78(() => initialEveryNthFrame);
45090
45158
  const everyNthFrame = useMemo125(() => {
@@ -45147,7 +45215,8 @@ var RenderModal = ({
45147
45215
  metadata,
45148
45216
  hardwareAcceleration,
45149
45217
  chromeMode,
45150
- offthreadVideoThreads
45218
+ offthreadVideoThreads,
45219
+ mediaCacheSizeInBytes
45151
45220
  }).then(() => {
45152
45221
  dispatchIfMounted({ type: "succeed" });
45153
45222
  setSelectedModal(null);
@@ -45198,7 +45267,8 @@ var RenderModal = ({
45198
45267
  metadata,
45199
45268
  hardwareAcceleration,
45200
45269
  chromeMode,
45201
- offthreadVideoThreads
45270
+ offthreadVideoThreads,
45271
+ mediaCacheSizeInBytes
45202
45272
  ]);
45203
45273
  const onClickSequence = useCallback125(() => {
45204
45274
  setSidebarCollapsedState({ left: null, right: "expanded" });
@@ -45226,7 +45296,8 @@ var RenderModal = ({
45226
45296
  repro,
45227
45297
  metadata,
45228
45298
  chromeMode,
45229
- offthreadVideoThreads
45299
+ offthreadVideoThreads,
45300
+ mediaCacheSizeInBytes
45230
45301
  }).then(() => {
45231
45302
  dispatchIfMounted({ type: "succeed" });
45232
45303
  setSelectedModal(null);
@@ -45257,7 +45328,8 @@ var RenderModal = ({
45257
45328
  setSelectedModal,
45258
45329
  metadata,
45259
45330
  chromeMode,
45260
- offthreadVideoThreads
45331
+ offthreadVideoThreads,
45332
+ mediaCacheSizeInBytes
45261
45333
  ]);
45262
45334
  useEffect75(() => {
45263
45335
  return () => {
@@ -45696,6 +45768,8 @@ var RenderModal = ({
45696
45768
  setEnvVariables,
45697
45769
  envVariables,
45698
45770
  offthreadVideoCacheSizeInBytes,
45771
+ setMediaCacheSizeInBytes,
45772
+ mediaCacheSizeInBytes,
45699
45773
  setOffthreadVideoCacheSizeInBytes,
45700
45774
  offthreadVideoThreads,
45701
45775
  setOffthreadVideoThreads,
@@ -46358,6 +46432,7 @@ var Modals = ({ readOnlyStudio }) => {
46358
46432
  initialLogLevel: modalContextType.initialLogLevel,
46359
46433
  initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes,
46360
46434
  initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads,
46435
+ initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes,
46361
46436
  initialConcurrency: modalContextType.initialConcurrency,
46362
46437
  maxConcurrency: modalContextType.maxConcurrency,
46363
46438
  minConcurrency: modalContextType.minConcurrency,
@@ -47033,15 +47108,6 @@ var getServerDisconnectedDomElement = () => {
47033
47108
  return document.getElementById("server-disconnected-overlay");
47034
47109
  };
47035
47110
  var Studio = ({ rootComponent, readOnly }) => {
47036
- useLayoutEffect2(() => {
47037
- window.remotion_isStudio = true;
47038
- window.remotion_isReadOnlyStudio = readOnly;
47039
- Internals66.enableSequenceStackTraces();
47040
- return () => {
47041
- window.remotion_isStudio = false;
47042
- window.remotion_isReadOnlyStudio = false;
47043
- };
47044
- }, [readOnly]);
47045
47111
  useLayoutEffect2(() => {
47046
47112
  injectCSS();
47047
47113
  }, []);
@@ -47456,6 +47522,9 @@ var renderToDOM = (content7) => {
47456
47522
  };
47457
47523
  renderToDOM(/* @__PURE__ */ jsx275(NoRegisterRoot, {}));
47458
47524
  Internals67.waitForRoot((NewRoot) => {
47525
+ window.remotion_isStudio = true;
47526
+ window.remotion_isReadOnlyStudio = false;
47527
+ Internals67.enableSequenceStackTraces();
47459
47528
  renderToDOM(/* @__PURE__ */ jsx275(Studio, {
47460
47529
  readOnly: false,
47461
47530
  rootComponent: NewRoot
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __require,
3
3
  __toESM
4
- } from "./chunk-bgfkgcmg.js";
4
+ } from "./chunk-cf4g1482.js";
5
5
 
6
6
  // src/renderEntry.tsx
7
7
  import { useContext, useEffect, useRef, useState } from "react";
@@ -185,7 +185,10 @@ var renderContent = (Root) => {
185
185
  renderToDOM(/* @__PURE__ */ jsx("div", {
186
186
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
187
187
  }));
188
- import("./chunk-d89d4a1t.js").then(({ StudioInternals }) => {
188
+ import("./chunk-h0d5z5fq.js").then(({ StudioInternals }) => {
189
+ window.remotion_isStudio = true;
190
+ window.remotion_isReadOnlyStudio = true;
191
+ Internals.enableSequenceStackTraces();
189
192
  renderToDOM(/* @__PURE__ */ jsx(StudioInternals.Studio, {
190
193
  readOnly: true,
191
194
  rootComponent: Root
@@ -55,6 +55,7 @@ const makeRetryPayload = (job) => {
55
55
  renderTypeOfLastRender: 'still',
56
56
  initialHardwareAcceleration: defaults.hardwareAcceleration,
57
57
  initialChromeMode: job.chromeMode,
58
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
58
59
  };
59
60
  }
60
61
  if (job.type === 'sequence') {
@@ -104,6 +105,7 @@ const makeRetryPayload = (job) => {
104
105
  renderTypeOfLastRender: 'sequence',
105
106
  initialHardwareAcceleration: defaults.hardwareAcceleration,
106
107
  initialChromeMode: job.chromeMode,
108
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
107
109
  };
108
110
  }
109
111
  if (job.type === 'video') {
@@ -153,6 +155,7 @@ const makeRetryPayload = (job) => {
153
155
  renderTypeOfLastRender: 'video',
154
156
  initialHardwareAcceleration: job.hardwareAcceleration,
155
157
  initialChromeMode: job.chromeMode,
158
+ initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
156
159
  };
157
160
  }
158
161
  throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
@@ -33,6 +33,9 @@ const renderToDOM = (content) => {
33
33
  };
34
34
  renderToDOM((0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {}));
35
35
  remotion_1.Internals.waitForRoot((NewRoot) => {
36
+ window.remotion_isStudio = true;
37
+ window.remotion_isReadOnlyStudio = false;
38
+ remotion_1.Internals.enableSequenceStackTraces();
36
39
  renderToDOM((0, jsx_runtime_1.jsx)(Studio_1.Studio, { readOnly: false, rootComponent: NewRoot }));
37
40
  });
38
41
  (0, entry_basic_1.startErrorOverlay)();
@@ -197,6 +197,9 @@ const renderContent = (Root) => {
197
197
  }
198
198
  renderToDOM((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(DelayedSpinner, {}) }));
199
199
  Promise.resolve().then(() => __importStar(require('./internals'))).then(({ StudioInternals }) => {
200
+ window.remotion_isStudio = true;
201
+ window.remotion_isReadOnlyStudio = true;
202
+ remotion_1.Internals.enableSequenceStackTraces();
200
203
  renderToDOM((0, jsx_runtime_1.jsx)(StudioInternals.Studio, { readOnly: true, rootComponent: Root }));
201
204
  })
202
205
  .catch((err) => {
@@ -31,6 +31,7 @@ export type RenderModalState = {
31
31
  initialOpenGlRenderer: OpenGlRenderer | null;
32
32
  initialIgnoreCertificateErrors: boolean;
33
33
  initialHeadless: boolean;
34
+ initialMediaCacheSizeInBytes: number | null;
34
35
  initialOffthreadVideoCacheSizeInBytes: number | null;
35
36
  initialOffthreadVideoThreads: number | null;
36
37
  initialColorSpace: ColorSpace;