@remotion/studio 4.0.397 → 4.0.398

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.
@@ -3,5 +3,6 @@ export declare const Checkbox: React.FC<{
3
3
  readonly checked: boolean;
4
4
  readonly onChange: React.ChangeEventHandler<HTMLInputElement>;
5
5
  readonly name: string;
6
+ readonly rounded?: boolean;
6
7
  readonly disabled?: boolean;
7
8
  }>;
@@ -11,6 +11,12 @@ const background = {
11
11
  width: size,
12
12
  position: 'relative',
13
13
  };
14
+ const bullet = {
15
+ width: 10,
16
+ height: 10,
17
+ backgroundColor: colors_1.LIGHT_TEXT,
18
+ borderRadius: '50%',
19
+ };
14
20
  const box = {
15
21
  display: 'flex',
16
22
  justifyContent: 'center',
@@ -23,7 +29,8 @@ const box = {
23
29
  pointerEvents: 'none',
24
30
  color: 'white',
25
31
  };
26
- const Checkbox = ({ checked, onChange, disabled, name }) => {
32
+ const Checkbox = ({ checked, onChange, disabled, name, rounded }) => {
33
+ const ref = (0, react_1.useRef)(null);
27
34
  const input = (0, react_1.useMemo)(() => {
28
35
  return {
29
36
  appearance: 'none',
@@ -37,6 +44,11 @@ const Checkbox = ({ checked, onChange, disabled, name }) => {
37
44
  margin: 0,
38
45
  };
39
46
  }, [disabled]);
40
- return ((0, jsx_runtime_1.jsxs)("div", { style: background, children: [(0, jsx_runtime_1.jsx)("input", { style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), (0, jsx_runtime_1.jsx)("div", { style: box, children: checked ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null })] }));
47
+ (0, react_1.useEffect)(() => {
48
+ if (ref.current) {
49
+ ref.current.style.setProperty('border-radius', rounded ? '50%' : '0%', 'important');
50
+ }
51
+ }, [rounded]);
52
+ return ((0, jsx_runtime_1.jsxs)("div", { style: background, children: [(0, jsx_runtime_1.jsx)("input", { ref: ref, style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), (0, jsx_runtime_1.jsx)("div", { style: box, children: checked ? rounded ? (0, jsx_runtime_1.jsx)("div", { style: bullet }) : (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null })] }));
41
53
  };
42
54
  exports.Checkbox = Checkbox;
@@ -23,7 +23,7 @@ const Modals = ({ readOnlyStudio }) => {
23
23
  const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
24
24
  const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState.type ===
25
25
  'connected';
26
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && ((0, jsx_runtime_1.jsx)(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && ((0, jsx_runtime_1.jsx)(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && ((0, jsx_runtime_1.jsx)(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'input-props-override' && ((0, jsx_runtime_1.jsx)(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'web-render' && ((0, jsx_runtime_1.jsx)(WebRenderModal_1.WebRenderModalWithLoader, { type: "web-render", initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialLogLevel: modalContextType.initialLogLevel })), modalContextType &&
26
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'duplicate-comp' && ((0, jsx_runtime_1.jsx)(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && ((0, jsx_runtime_1.jsx)(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && ((0, jsx_runtime_1.jsx)(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'input-props-override' && ((0, jsx_runtime_1.jsx)(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'web-render' && ((0, jsx_runtime_1.jsx)(WebRenderModal_1.WebRenderModalWithLoader, { type: "web-render", initialFrame: modalContextType.initialFrame, compositionId: modalContextType.compositionId, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, initialLogLevel: modalContextType.initialLogLevel, initialLicenseKey: modalContextType.initialLicenseKey })), modalContextType &&
27
27
  canRender &&
28
28
  modalContextType.type === 'server-render' && ((0, jsx_runtime_1.jsx)(ServerRenderModal_1.RenderModalWithLoader, { initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })), modalContextType &&
29
29
  canRender &&
@@ -196,6 +196,7 @@ const RenderButton = ({ readOnlyStudio, }) => {
196
196
  inFrameMark: inFrame,
197
197
  outFrameMark: outFrame,
198
198
  initialLogLevel: defaults.logLevel,
199
+ initialLicenseKey: defaults.publicLicenseKey,
199
200
  });
200
201
  }, [video, setSelectedModal, getCurrentFrame, props, inFrame, outFrame]);
201
202
  const onClick = (0, react_1.useCallback)(() => {
@@ -7,9 +7,11 @@ const web_renderer_1 = require("@remotion/web-renderer");
7
7
  const react_1 = require("react");
8
8
  const ShortcutHint_1 = require("../../error-overlay/remotion-overlay/ShortcutHint");
9
9
  const audio_1 = require("../../icons/audio");
10
+ const certificate_1 = require("../../icons/certificate");
10
11
  const data_1 = require("../../icons/data");
11
12
  const file_1 = require("../../icons/file");
12
13
  const frame_1 = require("../../icons/frame");
14
+ const gear_1 = require("../../icons/gear");
13
15
  const Button_1 = require("../Button");
14
16
  const is_menu_item_1 = require("../Menu/is-menu-item");
15
17
  const ModalHeader_1 = require("../ModalHeader");
@@ -20,9 +22,11 @@ const DataEditor_1 = require("./DataEditor");
20
22
  const get_string_before_suffix_1 = require("./get-string-before-suffix");
21
23
  const render_modals_1 = require("./render-modals");
22
24
  const ResolveCompositionBeforeModal_1 = require("./ResolveCompositionBeforeModal");
25
+ const WebRendererExperimentalBadge_1 = require("./WebRendererExperimentalBadge");
23
26
  const WebRenderModalAdvanced_1 = require("./WebRenderModalAdvanced");
24
27
  const WebRenderModalAudio_1 = require("./WebRenderModalAudio");
25
28
  const WebRenderModalBasic_1 = require("./WebRenderModalBasic");
29
+ const WebRenderModalLicense_1 = require("./WebRenderModalLicense");
26
30
  const WebRenderModalPicture_1 = require("./WebRenderModalPicture");
27
31
  const invalidCharacters = ['?', '*', '+', ':', '%'];
28
32
  const isValidStillExtension = (extension, stillImageFormat) => {
@@ -72,7 +76,7 @@ const validateOutnameForStill = ({ outName, stillImageFormat, }) => {
72
76
  // TODO: Shortcut: Shift + R
73
77
  // TODO: Apply defaultCodec
74
78
  // TODO: Apply defaultOutName
75
- const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, }) => {
79
+ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark, initialLogLevel, initialLicenseKey, }) => {
76
80
  const context = (0, react_1.useContext)(ResolveCompositionBeforeModal_1.ResolvedCompositionContext);
77
81
  if (!context) {
78
82
  throw new Error('Should not be able to render without resolving comp first');
@@ -103,6 +107,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
103
107
  const [renderProgress, setRenderProgress] = (0, react_1.useState)(null);
104
108
  const [transparent, setTransparent] = (0, react_1.useState)(false);
105
109
  const [muted, setMuted] = (0, react_1.useState)(false);
110
+ const [licenseKey, setLicenseKey] = (0, react_1.useState)(initialLicenseKey);
106
111
  const finalEndFrame = (0, react_1.useMemo)(() => {
107
112
  if (endFrame === null) {
108
113
  return resolvedComposition.durationInFrames - 1;
@@ -264,6 +269,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
264
269
  delayRenderTimeoutInMilliseconds: delayRenderTimeout,
265
270
  mediaCacheSizeInBytes,
266
271
  logLevel,
272
+ licenseKey: licenseKey !== null && licenseKey !== void 0 ? licenseKey : undefined,
267
273
  });
268
274
  const url = URL.createObjectURL(blob);
269
275
  const a = document.createElement('a');
@@ -291,6 +297,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
291
297
  resolvedComposition.defaultProps,
292
298
  unresolvedComposition.calculateMetadata,
293
299
  resolvedComposition.id,
300
+ licenseKey,
294
301
  ]);
295
302
  const onRenderVideo = (0, react_1.useCallback)(async () => {
296
303
  setRenderProgress({ renderedFrames: 0, encodedFrames: 0 });
@@ -309,7 +316,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
309
316
  delayRenderTimeoutInMilliseconds: delayRenderTimeout,
310
317
  mediaCacheSizeInBytes,
311
318
  logLevel,
312
- codec,
319
+ videoCodec: codec,
313
320
  container,
314
321
  videoBitrate,
315
322
  hardwareAcceleration,
@@ -321,6 +328,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
321
328
  transparent,
322
329
  muted,
323
330
  outputTarget: 'web-fs',
331
+ licenseKey: licenseKey !== null && licenseKey !== void 0 ? licenseKey : undefined,
324
332
  });
325
333
  setRenderProgress(null);
326
334
  const blob = await getBlob();
@@ -356,6 +364,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
356
364
  resolvedComposition.defaultProps,
357
365
  resolvedComposition.id,
358
366
  unresolvedComposition.calculateMetadata,
367
+ licenseKey,
359
368
  ]);
360
369
  const onRender = (0, react_1.useCallback)(async () => {
361
370
  if (renderMode === 'still') {
@@ -367,7 +376,7 @@ const WebRenderModal = ({ initialFrame, defaultProps, inFrameMark, outFrameMark,
367
376
  }, [renderMode, onRenderStill, onRenderVideo]);
368
377
  return ((0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.outerModalStyle, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.ModalHeader, { title: `Render ${resolvedComposition.id}` }), (0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.container, children: [(0, jsx_runtime_1.jsx)(SegmentedControl_1.SegmentedControl, { items: renderTabOptions, needsWrapping: false }), (0, jsx_runtime_1.jsx)("div", { style: render_modals_1.flexer }), (0, jsx_runtime_1.jsxs)(Button_1.Button, { autoFocus: true, onClick: onRender, style: render_modals_1.buttonStyle, disabled: !outnameValidation.valid, children: [renderProgress
369
378
  ? `Rendering... ${renderProgress.renderedFrames}/${finalEndFrame}`
370
- : `Render ${renderMode}`, (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.leftSidebar, children: [(0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: render_modals_1.icon }) }), "General"] }), (0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: render_modals_1.icon }) }), "Input Props"] }), renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: render_modals_1.icon }) }), "Picture"] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: render_modals_1.icon }) }), "Audio"] })) : null, (0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: render_modals_1.icon }) }), "Advanced"] })] }), (0, jsx_runtime_1.jsx)("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, codec: codec, setCodec: setCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving, readOnlyStudio: false })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(WebRenderModalAudio_1.WebRenderModalAudio, { muted: muted, setMuted: setMuted })) : ((0, jsx_runtime_1.jsx)(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration })) })] })] }));
379
+ : `Render ${renderMode}`, (0, jsx_runtime_1.jsx)(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })] }), (0, jsx_runtime_1.jsx)("div", { style: render_modals_1.container, children: (0, jsx_runtime_1.jsx)(WebRendererExperimentalBadge_1.WebRendererExperimentalBadge, {}) }), (0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.horizontalLayout, children: [(0, jsx_runtime_1.jsxs)("div", { style: render_modals_1.leftSidebar, children: [(0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'general', onClick: () => setTab('general'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(file_1.FileIcon, { style: render_modals_1.icon }) }), "General"] }), (0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'data', onClick: () => setTab('data'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(data_1.DataIcon, { style: render_modals_1.icon }) }), "Input Props"] }), renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'picture', onClick: () => setTab('picture'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(frame_1.PicIcon, { style: render_modals_1.icon }) }), "Picture"] })) : null, renderMode === 'video' ? ((0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'audio', onClick: () => setTab('audio'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(audio_1.AudioIcon, { style: render_modals_1.icon }) }), "Audio"] })) : null, (0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(gear_1.GearIcon, { style: render_modals_1.icon }) }), "Other"] }), (0, jsx_runtime_1.jsxs)(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => setTab('license'), children: [(0, jsx_runtime_1.jsx)("div", { style: render_modals_1.iconContainer, children: (0, jsx_runtime_1.jsx)(certificate_1.CertificateIcon, { style: render_modals_1.icon }) }), "License"] })] }), (0, jsx_runtime_1.jsx)("div", { style: render_modals_1.optionsPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: tab === 'general' ? ((0, jsx_runtime_1.jsx)(WebRenderModalBasic_1.WebRenderModalBasic, { renderMode: renderMode, resolvedComposition: resolvedComposition, imageFormat: imageFormat, setStillFormat: setStillFormat, frame: frame, onFrameChanged: onFrameChanged, onFrameSetDirectly: onFrameSetDirectly, container: container, setContainerFormat: setContainerFormat, codec: codec, setCodec: setCodec, startFrame: finalStartFrame, setStartFrame: setStartFrame, endFrame: finalEndFrame, setEndFrame: setEndFrame, outName: outName, onOutNameChange: onOutNameChange, validationMessage: outnameValidation.valid ? null : outnameValidation.error.message, logLevel: logLevel, setLogLevel: setLogLevel })) : tab === 'data' ? ((0, jsx_runtime_1.jsx)(DataEditor_1.DataEditor, { defaultProps: inputProps, setDefaultProps: setInputProps, unresolvedComposition: unresolvedComposition, mayShowSaveButton: false, propsEditType: "input-props", saving: saving, setSaving: setSaving, readOnlyStudio: false })) : tab === 'picture' ? ((0, jsx_runtime_1.jsx)(WebRenderModalPicture_1.WebRenderModalPicture, { renderMode: renderMode, videoBitrate: videoBitrate, setVideoBitrate: setVideoBitrate, keyframeIntervalInSeconds: keyframeIntervalInSeconds, setKeyframeIntervalInSeconds: setKeyframeIntervalInSeconds, transparent: transparent, setTransparent: setTransparent })) : tab === 'audio' ? ((0, jsx_runtime_1.jsx)(WebRenderModalAudio_1.WebRenderModalAudio, { muted: muted, setMuted: setMuted })) : tab === 'advanced' ? ((0, jsx_runtime_1.jsx)(WebRenderModalAdvanced_1.WebRenderModalAdvanced, { renderMode: renderMode, delayRenderTimeout: delayRenderTimeout, setDelayRenderTimeout: setDelayRenderTimeout, mediaCacheSizeInBytes: mediaCacheSizeInBytes, setMediaCacheSizeInBytes: setMediaCacheSizeInBytes, hardwareAcceleration: hardwareAcceleration, setHardwareAcceleration: setHardwareAcceleration })) : ((0, jsx_runtime_1.jsx)(WebRenderModalLicense_1.WebRenderModalLicense, { licenseKey: licenseKey, setLicenseKey: setLicenseKey, initialPublicLicenseKey: initialLicenseKey })) })] })] }));
371
380
  };
372
381
  const WebRenderModalWithLoader = (props) => {
373
382
  return ((0, jsx_runtime_1.jsx)(DismissableModal_1.DismissableModal, { children: (0, jsx_runtime_1.jsx)(ResolveCompositionBeforeModal_1.ResolveCompositionBeforeModal, { compositionId: props.compositionId, children: (0, jsx_runtime_1.jsx)(WebRenderModal, { ...props }) }) }));
@@ -1,20 +1,20 @@
1
1
  import type { LogLevel } from '@remotion/renderer';
2
- import type { RenderStillImageFormat, WebRendererCodec, WebRendererContainer } from '@remotion/web-renderer';
2
+ import type { RenderStillOnWebImageFormat, WebRendererContainer, WebRendererVideoCodec } from '@remotion/web-renderer';
3
3
  import type React from 'react';
4
4
  import type { VideoConfig } from 'remotion';
5
5
  import type { RenderType } from './WebRenderModal';
6
6
  type WebRenderModalBasicProps = {
7
7
  readonly renderMode: RenderType;
8
8
  readonly resolvedComposition: VideoConfig;
9
- readonly imageFormat: RenderStillImageFormat;
10
- readonly setStillFormat: (format: RenderStillImageFormat) => void;
9
+ readonly imageFormat: RenderStillOnWebImageFormat;
10
+ readonly setStillFormat: (format: RenderStillOnWebImageFormat) => void;
11
11
  readonly frame: number;
12
12
  readonly onFrameChanged: (e: string) => void;
13
13
  readonly onFrameSetDirectly: (newFrame: number) => void;
14
14
  readonly container: WebRendererContainer;
15
15
  readonly setContainerFormat: (container: WebRendererContainer) => void;
16
- readonly codec: WebRendererCodec;
17
- readonly setCodec: (codec: WebRendererCodec) => void;
16
+ readonly codec: WebRendererVideoCodec;
17
+ readonly setCodec: (codec: WebRendererVideoCodec) => void;
18
18
  readonly startFrame: number | null;
19
19
  readonly setStartFrame: React.Dispatch<React.SetStateAction<number | null>>;
20
20
  readonly endFrame: number | null;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type WebRenderModalLicenseProps = {
3
+ readonly licenseKey: string | null;
4
+ readonly setLicenseKey: React.Dispatch<React.SetStateAction<string | null>>;
5
+ readonly initialPublicLicenseKey: string | null;
6
+ };
7
+ export declare const row: React.CSSProperties;
8
+ export declare const WebRenderModalLicense: React.FC<WebRenderModalLicenseProps>;
9
+ export {};
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebRenderModalLicense = exports.row = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const colors_1 = require("../../helpers/colors");
7
+ const Checkbox_1 = require("../Checkbox");
8
+ const RemInput_1 = require("../NewComposition/RemInput");
9
+ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
10
+ const layout_1 = require("../layout");
11
+ exports.row = {
12
+ display: 'flex',
13
+ flexDirection: 'row',
14
+ paddingLeft: 16,
15
+ paddingRight: 16,
16
+ };
17
+ const tabContainer = {
18
+ flex: 1,
19
+ };
20
+ const descriptionStyle = {
21
+ color: colors_1.LIGHT_TEXT,
22
+ fontSize: 14,
23
+ fontFamily: 'sans-serif',
24
+ paddingLeft: 16,
25
+ paddingRight: 16,
26
+ paddingTop: 16,
27
+ paddingBottom: 8,
28
+ lineHeight: 1.5,
29
+ };
30
+ const paddedDescriptionStyle = {
31
+ color: colors_1.LIGHT_TEXT,
32
+ fontSize: 14,
33
+ fontFamily: 'sans-serif',
34
+ padding: 9,
35
+ border: '1px solid ' + colors_1.INPUT_BORDER_COLOR_UNHOVERED,
36
+ borderRadius: 8,
37
+ lineHeight: 1.5,
38
+ marginLeft: 16,
39
+ marginRight: 16,
40
+ };
41
+ const descriptionLink = {
42
+ color: 'white',
43
+ fontSize: 14,
44
+ };
45
+ const checkboxLabel = {
46
+ fontSize: 14,
47
+ lineHeight: '40px',
48
+ color: colors_1.LIGHT_TEXT,
49
+ flex: 1,
50
+ fontFamily: 'sans-serif',
51
+ cursor: 'pointer',
52
+ userSelect: 'none',
53
+ };
54
+ const inputStyle = {
55
+ minWidth: 250,
56
+ };
57
+ const justifyCenter = {
58
+ display: 'flex',
59
+ alignItems: 'center',
60
+ gap: 10,
61
+ flex: 1,
62
+ };
63
+ const codeStyle = {
64
+ fontSize: 14,
65
+ fontFamily: 'monospace',
66
+ color: colors_1.BLUE,
67
+ };
68
+ const codeLine = {
69
+ fontSize: 14,
70
+ fontFamily: 'monospace',
71
+ color: colors_1.LIGHT_TEXT,
72
+ backgroundColor: colors_1.INPUT_BACKGROUND,
73
+ padding: 6,
74
+ borderRadius: 3,
75
+ marginTop: 6,
76
+ overflowX: 'auto',
77
+ maxWidth: '100%',
78
+ };
79
+ const codeLineSmall = {
80
+ ...codeLine,
81
+ fontSize: 11,
82
+ };
83
+ const LICENSE_KEY_LENGTH = 55;
84
+ const LICENSE_KEY_PREFIX = 'rm_pub_';
85
+ const validateLicenseKey = (key) => {
86
+ if (key.length === 0) {
87
+ return { valid: false, message: null };
88
+ }
89
+ if (!key.startsWith(LICENSE_KEY_PREFIX)) {
90
+ return {
91
+ valid: false,
92
+ message: `License key must start with "${LICENSE_KEY_PREFIX}"`,
93
+ };
94
+ }
95
+ const afterPrefix = key.slice(LICENSE_KEY_PREFIX.length);
96
+ if (!/^[a-zA-Z0-9]*$/.test(afterPrefix)) {
97
+ return {
98
+ valid: false,
99
+ message: 'License key must contain only alphanumeric characters after the prefix',
100
+ };
101
+ }
102
+ if (key.length !== LICENSE_KEY_LENGTH) {
103
+ return {
104
+ valid: false,
105
+ message: `License key must be ${LICENSE_KEY_LENGTH} characters long`,
106
+ };
107
+ }
108
+ return { valid: true, message: null };
109
+ };
110
+ const WebRenderModalLicense = ({ licenseKey, setLicenseKey, initialPublicLicenseKey, }) => {
111
+ const onFreeLicenseChange = (0, react_1.useCallback)(() => {
112
+ setLicenseKey('free-license');
113
+ }, [setLicenseKey]);
114
+ const onCompanyLicenseChange = (0, react_1.useCallback)(() => {
115
+ setLicenseKey(initialPublicLicenseKey !== null && initialPublicLicenseKey !== void 0 ? initialPublicLicenseKey : '');
116
+ }, [initialPublicLicenseKey, setLicenseKey]);
117
+ const onLicenseKeyChange = (0, react_1.useCallback)((e) => {
118
+ setLicenseKey(e.target.value);
119
+ }, [setLicenseKey]);
120
+ const licenseValidation = (0, react_1.useMemo)(() => {
121
+ if (licenseKey === null || licenseKey === 'free-license') {
122
+ return { valid: true, message: null };
123
+ }
124
+ return validateLicenseKey(licenseKey);
125
+ }, [licenseKey]);
126
+ return ((0, jsx_runtime_1.jsxs)("div", { style: tabContainer, children: [(0, jsx_runtime_1.jsxs)("div", { style: descriptionStyle, children: ["Remotion is free if you are an individual or company with a headcount of 3 or less. See", ' ', (0, jsx_runtime_1.jsx)("a", { style: descriptionLink, href: "https://remotion.dev/license", children: "LICENSE.md" }), "."] }), (0, jsx_runtime_1.jsx)("div", { style: exports.row, children: (0, jsx_runtime_1.jsxs)("div", { style: justifyCenter, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: licenseKey === 'free-license', onChange: onFreeLicenseChange, name: "free-license", rounded: true }), (0, jsx_runtime_1.jsxs)("div", { style: checkboxLabel, onClick: onFreeLicenseChange, children: ["I am eligible for the Free License, ", "don't", " print a warning"] })] }) }), licenseKey === 'free-license' ? ((0, jsx_runtime_1.jsxs)("div", { style: paddedDescriptionStyle, children: ["Enjoy Remotion! Add the following to", ' ', (0, jsx_runtime_1.jsx)("code", { style: codeStyle, children: "remotion.config.ts" }), " to persist this setting:", (0, jsx_runtime_1.jsx)("div", { style: codeLine, children: "Config.setPublicLicenseKey('free-license');" })] })) : null, (0, jsx_runtime_1.jsx)("div", { style: exports.row, children: (0, jsx_runtime_1.jsxs)("div", { style: justifyCenter, children: [(0, jsx_runtime_1.jsx)(Checkbox_1.Checkbox, { checked: licenseKey !== 'free-license' && licenseKey !== null, onChange: onCompanyLicenseChange, name: "company-license", rounded: true }), (0, jsx_runtime_1.jsx)("div", { style: checkboxLabel, onClick: onCompanyLicenseChange, children: "I have a Company License" })] }) }), licenseKey !== 'free-license' && licenseKey !== null ? ((0, jsx_runtime_1.jsxs)("div", { style: paddedDescriptionStyle, children: ["Add your public license from", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.pro/dashboard", target: "_blank", style: descriptionLink, children: "remotion.pro" }), ' ', "key below.", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: licenseKey, onChange: onLicenseKeyChange, placeholder: "remotion.pro public license key (starts with rm_pub_)", status: licenseValidation.valid || licenseKey.length === 0
127
+ ? 'ok'
128
+ : 'error', rightAlign: false, style: inputStyle, autoFocus: true }), licenseValidation.message ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), (0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: licenseValidation.message, align: "flex-start", type: "error" })] })) : null, licenseValidation.valid && licenseKey.length > 0 ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1, block: true }), "Add the following to", ' ', (0, jsx_runtime_1.jsx)("code", { style: codeStyle, children: "remotion.config.ts" }), " to persist this setting:", (0, jsx_runtime_1.jsx)("div", { style: codeLineSmall, children: "Config.setPublicLicenseKey('" + licenseKey + "');" })] })) : null] })) : null, licenseKey === null ? ((0, jsx_runtime_1.jsxs)("div", { style: descriptionStyle, children: ["If you are not eligible for the free license, you need to obtain a", ' ', (0, jsx_runtime_1.jsx)("a", { style: descriptionLink, target: "_blank", href: "https://remotion.pro/license", children: "Company License" }), "."] })) : null] }));
129
+ };
130
+ exports.WebRenderModalLicense = WebRenderModalLicense;
@@ -0,0 +1 @@
1
+ export declare const WebRendererExperimentalBadge: React.FC;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebRendererExperimentalBadge = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../../helpers/colors");
6
+ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
7
+ const row = {
8
+ display: 'flex',
9
+ flexDirection: 'row',
10
+ alignItems: 'center',
11
+ justifyContent: 'center',
12
+ };
13
+ const text = {
14
+ fontSize: 14,
15
+ fontFamily: 'sans-serif',
16
+ color: colors_1.LIGHT_TEXT,
17
+ };
18
+ const icon = {
19
+ width: 14,
20
+ height: 14,
21
+ flexShrink: 0,
22
+ fill: colors_1.WARNING_COLOR,
23
+ marginRight: 8,
24
+ };
25
+ const link = {
26
+ color: 'inherit',
27
+ textDecoration: 'underline',
28
+ fontSize: 14,
29
+ };
30
+ const WebRendererExperimentalBadge = () => {
31
+ return ((0, jsx_runtime_1.jsxs)("div", { style: row, children: [(0, jsx_runtime_1.jsx)(ValidationMessage_1.WarningTriangle, { type: "warning", style: icon }), (0, jsx_runtime_1.jsxs)("div", { style: text, children: ["The Remotion Web Renderer is experimental.", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://github.com/remotion-dev/remotion/issues/5913", target: "_blank", rel: "noopener noreferrer", style: link, children: "Track progress on GitHub" }), ' ', "and discuss in the", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/discord", target: "_blank", rel: "noopener noreferrer", style: link, children: "#web-renderer" }), ' ', "channel on Discord."] })] }));
32
+ };
33
+ exports.WebRendererExperimentalBadge = WebRendererExperimentalBadge;