@remotion/studio 4.0.477 → 4.0.479
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/dist/components/AssetSelector.js +8 -14
- package/dist/components/Button.d.ts +1 -0
- package/dist/components/Button.js +8 -5
- package/dist/components/CanvasIfSizeIsAvailable.js +2 -6
- package/dist/components/CompactExplanation.d.ts +12 -0
- package/dist/components/CompactExplanation.js +52 -0
- package/dist/components/CompositionSelector.js +2 -4
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +42 -34
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +38 -31
- package/dist/components/DefaultPropsEditor.d.ts +12 -2
- package/dist/components/DefaultPropsEditor.js +2 -2
- package/dist/components/EditorGuides/Guide.js +37 -9
- package/dist/components/EditorRuler/Ruler.js +4 -14
- package/dist/components/EditorRuler/index.js +9 -4
- package/dist/components/EffectPickerModal.d.ts +5 -0
- package/dist/components/EffectPickerModal.js +179 -0
- package/dist/components/InlineAction.js +1 -0
- package/dist/components/InspectorInfoHeader.d.ts +11 -0
- package/dist/components/InspectorInfoHeader.js +55 -0
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
- package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/EasingInspector.js +41 -0
- package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/GuideInspector.js +55 -0
- package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
- package/dist/components/InspectorPanel/common.d.ts +15 -0
- package/dist/components/InspectorPanel/common.js +18 -0
- package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
- package/dist/components/InspectorPanel/inspector-selection.js +34 -0
- package/dist/components/InspectorPanel/styles.d.ts +27 -0
- package/dist/components/InspectorPanel/styles.js +178 -0
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
- package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
- package/dist/components/InspectorPanel.d.ts +8 -0
- package/dist/components/InspectorPanel.js +26 -0
- package/dist/components/InspectorPanelLayout.d.ts +1 -0
- package/dist/components/InspectorPanelLayout.js +4 -0
- package/dist/components/InspectorSequenceSection.d.ts +16 -0
- package/dist/components/InspectorSequenceSection.js +147 -0
- package/dist/components/InspectorSourceLocation.d.ts +7 -0
- package/dist/components/InspectorSourceLocation.js +71 -0
- package/dist/components/MenuToolbar.d.ts +1 -0
- package/dist/components/MenuToolbar.js +4 -1
- package/dist/components/Modals.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +1 -1
- package/dist/components/NewComposition/RemInput.d.ts +1 -0
- package/dist/components/NewComposition/RemInput.js +8 -2
- package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
- package/dist/components/NewComposition/RemTextarea.js +8 -2
- package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
- package/dist/components/NewComposition/ValidationMessage.js +16 -5
- package/dist/components/OptionsPanel.d.ts +1 -1
- package/dist/components/OptionsPanel.js +8 -17
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
- package/dist/components/QuickSwitcher/shared.d.ts +4 -0
- package/dist/components/QuickSwitcher/shared.js +24 -0
- package/dist/components/RenderModal/DataEditor.d.ts +29 -2
- package/dist/components/RenderModal/DataEditor.js +107 -56
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
- package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
- package/dist/components/RendersTab.js +1 -1
- package/dist/components/SegmentedControl.d.ts +3 -0
- package/dist/components/SegmentedControl.js +11 -5
- package/dist/components/SelectedOutlineElement.js +135 -31
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +45 -29
- package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
- package/dist/components/SelectedOutlineUvControls.js +64 -10
- package/dist/components/Tabs/index.js +4 -4
- package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
- package/dist/components/Timeline/EasingEditorModal.js +597 -124
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
- package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
- package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
- package/dist/components/Timeline/TimelineNumberField.js +5 -11
- package/dist/components/Timeline/TimelineRotationField.js +5 -6
- package/dist/components/Timeline/TimelineScaleField.js +4 -8
- package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
- package/dist/components/Timeline/TimelineSelection.js +109 -14
- package/dist/components/Timeline/TimelineSequence.js +22 -14
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
- package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
- package/dist/components/Timeline/TimelineTranslateField.js +4 -5
- package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +93 -8
- package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +7 -0
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +32 -3
- package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
- package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
- package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
- package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
- package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
- package/dist/components/Timeline/timeline-video-filmstrip-times.d.ts +17 -0
- package/dist/components/Timeline/timeline-video-filmstrip-times.js +22 -0
- package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
- package/dist/components/Timeline/update-selected-easing.js +40 -9
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
- package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
- package/dist/components/VisualControls/VisualControlsContent.js +4 -5
- package/dist/components/effect-drag-and-drop.d.ts +10 -0
- package/dist/components/effect-drag-and-drop.js +17 -8
- package/dist/components/effect-picker-search.d.ts +5 -0
- package/dist/components/effect-picker-search.js +77 -0
- package/dist/components/import-assets.d.ts +11 -2
- package/dist/components/import-assets.js +61 -6
- package/dist/components/selected-outline-drag.d.ts +44 -2
- package/dist/components/selected-outline-drag.js +74 -1
- package/dist/components/selected-outline-types.d.ts +7 -7
- package/dist/components/selected-outline-uv.d.ts +4 -3
- package/dist/components/selected-outline-uv.js +6 -2
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -0
- package/dist/esm/{chunk-t8fjnw2d.js → chunk-fge2mq5p.js} +17004 -13432
- package/dist/esm/internals.mjs +17004 -13432
- package/dist/esm/previewEntry.mjs +26617 -23041
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/editor-guide-selection.js +1 -1
- package/dist/helpers/get-preview-file-type.js +1 -1
- package/dist/helpers/render-codec-label.d.ts +2 -0
- package/dist/helpers/render-codec-label.js +49 -0
- package/dist/helpers/ruler-canvas-size.d.ts +5 -0
- package/dist/helpers/ruler-canvas-size.js +17 -0
- package/dist/helpers/timeline-layout.d.ts +4 -4
- package/dist/helpers/use-media-metadata.d.ts +8 -2
- package/dist/helpers/use-media-metadata.js +17 -4
- package/dist/state/modals.d.ts +9 -4
- package/package.json +12 -12
|
@@ -63,6 +63,7 @@ const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
|
63
63
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
64
64
|
const TimelineSequenceName_1 = require("./TimelineSequenceName");
|
|
65
65
|
const use_open_sequence_in_editor_1 = require("./use-open-sequence-in-editor");
|
|
66
|
+
const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
|
|
66
67
|
const labelContainerStyle = {
|
|
67
68
|
alignItems: 'center',
|
|
68
69
|
alignSelf: 'stretch',
|
|
@@ -139,7 +140,7 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
|
139
140
|
};
|
|
140
141
|
const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, trackIndex, }) => {
|
|
141
142
|
var _a, _b, _c;
|
|
142
|
-
var _d, _e;
|
|
143
|
+
var _d, _e, _f;
|
|
143
144
|
const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
|
|
144
145
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
145
146
|
const previewConnected = previewServerState.type === 'connected';
|
|
@@ -616,59 +617,18 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
616
617
|
}
|
|
617
618
|
setIsRenaming(true);
|
|
618
619
|
}, [canRenameThisSequence]);
|
|
619
|
-
const
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
Boolean(sequence.controls) &&
|
|
624
|
-
nodePath !== null &&
|
|
625
|
-
validatedLocation !== null &&
|
|
626
|
-
freezeStatus !== undefined &&
|
|
627
|
-
freezeStatus !== null &&
|
|
628
|
-
freezeStatus.status === 'static';
|
|
629
|
-
const onToggleFreezeFrame = (0, react_1.useCallback)(() => {
|
|
630
|
-
if (!canToggleFreeze ||
|
|
631
|
-
!sequence.controls ||
|
|
632
|
-
!nodePath ||
|
|
633
|
-
!validatedLocation ||
|
|
634
|
-
previewServerState.type !== 'connected') {
|
|
635
|
-
return;
|
|
636
|
-
}
|
|
637
|
-
const rawFreezeFrame = Math.round(timelinePosition - sequence.from + sequenceFrameOffset);
|
|
638
|
-
const maxFrame = Number.isFinite(sequence.duration)
|
|
639
|
-
? Math.max(0, sequence.duration - 1)
|
|
640
|
-
: rawFreezeFrame;
|
|
641
|
-
const freezeFrame = Math.min(Math.max(0, rawFreezeFrame), maxFrame);
|
|
642
|
-
const remove = isFrozen;
|
|
643
|
-
(0, save_sequence_prop_1.saveSequenceProps)({
|
|
644
|
-
changes: [
|
|
645
|
-
{
|
|
646
|
-
fileName: validatedLocation.source,
|
|
647
|
-
nodePath,
|
|
648
|
-
fieldKey: 'freeze',
|
|
649
|
-
value: remove ? null : freezeFrame,
|
|
650
|
-
defaultValue: null,
|
|
651
|
-
schema: sequence.controls.schema,
|
|
652
|
-
},
|
|
653
|
-
],
|
|
654
|
-
setPropStatuses,
|
|
655
|
-
clientId: previewServerState.clientId,
|
|
656
|
-
undoLabel: remove ? 'Unfreeze sequence' : 'Freeze sequence',
|
|
657
|
-
redoLabel: remove ? 'Freeze sequence again' : 'Unfreeze sequence again',
|
|
658
|
-
});
|
|
659
|
-
}, [
|
|
660
|
-
canToggleFreeze,
|
|
661
|
-
isFrozen,
|
|
620
|
+
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.useSequenceFreezeFrameMenuItem)({
|
|
621
|
+
clientId: previewServerState.type === 'connected'
|
|
622
|
+
? previewServerState.clientId
|
|
623
|
+
: null,
|
|
662
624
|
nodePath,
|
|
663
|
-
|
|
664
|
-
sequence
|
|
665
|
-
sequence.duration,
|
|
666
|
-
sequence.from,
|
|
625
|
+
propStatusesForOverride,
|
|
626
|
+
sequence,
|
|
667
627
|
sequenceFrameOffset,
|
|
668
628
|
setPropStatuses,
|
|
669
629
|
timelinePosition,
|
|
670
|
-
validatedLocation,
|
|
671
|
-
|
|
630
|
+
validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
|
|
631
|
+
});
|
|
672
632
|
const contextMenuValues = (0, react_1.useMemo)(() => {
|
|
673
633
|
if (!previewConnected) {
|
|
674
634
|
return [];
|
|
@@ -703,37 +663,22 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
|
|
|
703
663
|
subMenu: null,
|
|
704
664
|
value: 'rename-sequence',
|
|
705
665
|
},
|
|
706
|
-
|
|
707
|
-
type: 'item',
|
|
708
|
-
id: 'toggle-freeze-frame',
|
|
709
|
-
keyHint: null,
|
|
710
|
-
label: isFrozen ? 'Unfreeze frame' : 'Freeze frame',
|
|
711
|
-
leftItem: null,
|
|
712
|
-
disabled: !canToggleFreeze,
|
|
713
|
-
onClick: () => {
|
|
714
|
-
onToggleFreezeFrame();
|
|
715
|
-
},
|
|
716
|
-
quickSwitcherLabel: null,
|
|
717
|
-
subMenu: null,
|
|
718
|
-
value: 'toggle-freeze-frame',
|
|
719
|
-
},
|
|
666
|
+
freezeFrameMenuItem,
|
|
720
667
|
],
|
|
721
668
|
});
|
|
722
669
|
}, [
|
|
723
670
|
assetLinkInfo,
|
|
724
671
|
canOpenInEditor,
|
|
725
672
|
canRenameThisSequence,
|
|
726
|
-
canToggleFreeze,
|
|
727
673
|
deleteDisabled,
|
|
728
674
|
disableInteractivityDisabled,
|
|
729
675
|
duplicateDisabled,
|
|
730
676
|
fileLocation,
|
|
731
|
-
|
|
677
|
+
freezeFrameMenuItem,
|
|
732
678
|
onDeleteSequenceFromSource,
|
|
733
679
|
onDisableSequenceInteractivity,
|
|
734
680
|
onDuplicateSequenceFromSource,
|
|
735
681
|
onRenameSequence,
|
|
736
|
-
onToggleFreezeFrame,
|
|
737
682
|
openInEditor,
|
|
738
683
|
originalLocation,
|
|
739
684
|
previewConnected,
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SequencePropsSubscriptionKey,
|
|
2
|
+
import type { CanUpdateSequencePropStatusKeyframed, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
6
|
+
import { type TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
7
|
+
export declare const TimelineSequenceKeyframedValue: React.FC<{
|
|
8
|
+
readonly field: SchemaFieldInfo;
|
|
9
|
+
readonly fileName: string;
|
|
10
|
+
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
|
+
readonly schema: InteractivitySchema;
|
|
12
|
+
readonly propStatus: CanUpdateSequencePropStatusKeyframed;
|
|
13
|
+
readonly sourceFrame: number;
|
|
14
|
+
}>;
|
|
6
15
|
export declare const TimelineSequencePropItem: React.FC<{
|
|
7
16
|
readonly field: SchemaFieldInfo;
|
|
8
17
|
readonly validatedLocation: CodePosition;
|
|
9
18
|
readonly rowDepth: number;
|
|
10
19
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
20
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
12
|
-
readonly schema:
|
|
21
|
+
readonly schema: InteractivitySchema;
|
|
13
22
|
readonly keyframeDisplayOffset: number;
|
|
23
|
+
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
14
24
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineSequencePropItem = void 0;
|
|
3
|
+
exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -115,34 +115,73 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
115
115
|
}, [clearDragOverrides, nodePath]);
|
|
116
116
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
117
117
|
};
|
|
118
|
-
const
|
|
119
|
-
var _a, _b;
|
|
120
|
-
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
118
|
+
const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propStatus, sourceFrame }) => {
|
|
121
119
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
122
120
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
123
121
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
124
|
-
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
125
|
-
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
126
122
|
const clientId = previewServerState.type === 'connected'
|
|
127
123
|
? previewServerState.clientId
|
|
128
124
|
: null;
|
|
125
|
+
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
126
|
+
var _a;
|
|
127
|
+
return ((_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {})[field.key];
|
|
128
|
+
}, [getDragOverrides, nodePath, field.key]);
|
|
129
|
+
const onSaveKeyframed = (0, react_1.useCallback)((value, frame) => {
|
|
130
|
+
if (!clientId) {
|
|
131
|
+
return Promise.reject(new Error('Not connected to studio server'));
|
|
132
|
+
}
|
|
133
|
+
return (0, call_add_keyframe_1.callAddSequenceKeyframe)({
|
|
134
|
+
fileName,
|
|
135
|
+
nodePath,
|
|
136
|
+
fieldKey: field.key,
|
|
137
|
+
sourceFrame: frame,
|
|
138
|
+
value,
|
|
139
|
+
schema,
|
|
140
|
+
setPropStatuses,
|
|
141
|
+
clientId,
|
|
142
|
+
});
|
|
143
|
+
}, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
|
|
144
|
+
const onKeyframedDragValueChange = (0, react_1.useCallback)((value) => {
|
|
145
|
+
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
|
|
146
|
+
status: propStatus,
|
|
147
|
+
frame: sourceFrame,
|
|
148
|
+
value,
|
|
149
|
+
}));
|
|
150
|
+
}, [propStatus, field.key, nodePath, setDragOverrides, sourceFrame]);
|
|
151
|
+
const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
|
|
152
|
+
clearDragOverrides(nodePath);
|
|
153
|
+
}, [clearDragOverrides, nodePath]);
|
|
154
|
+
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSaveKeyframed, onDragValueChange: onKeyframedDragValueChange, onDragEnd: onKeyframedDragEnd, scaleLockNodePath: nodePath }));
|
|
155
|
+
};
|
|
156
|
+
exports.TimelineSequenceKeyframedValue = TimelineSequenceKeyframedValue;
|
|
157
|
+
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
158
|
+
var _a, _b;
|
|
159
|
+
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
160
|
+
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
161
|
+
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
162
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
163
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
164
|
+
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
165
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
166
|
+
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
129
167
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
130
168
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
131
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
132
|
-
const jsxFrame = timelinePosition - keyframeDisplayOffset;
|
|
133
169
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
134
170
|
var _a;
|
|
135
171
|
return ((_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {})[field.key];
|
|
136
172
|
}, [getDragOverrides, nodePath, field.key]);
|
|
173
|
+
const keyframable = (0, studio_shared_1.isSchemaFieldKeyframable)({
|
|
174
|
+
schema,
|
|
175
|
+
key: field.key,
|
|
176
|
+
});
|
|
137
177
|
const keyframeControls = propStatus !== null &&
|
|
138
|
-
(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
}) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo })) : null;
|
|
178
|
+
(keyframeControlsMode === 'inspector'
|
|
179
|
+
? keyframable
|
|
180
|
+
: (0, TimelineKeyframeControls_1.shouldShowTimelineKeyframeControls)({
|
|
181
|
+
propStatus,
|
|
182
|
+
selected: selection.selected,
|
|
183
|
+
keyframable,
|
|
184
|
+
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
146
185
|
const style = (0, react_1.useMemo)(() => {
|
|
147
186
|
return {
|
|
148
187
|
...fieldRowBase,
|
|
@@ -203,41 +242,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
203
242
|
validatedLocation.source,
|
|
204
243
|
propStatus,
|
|
205
244
|
]);
|
|
206
|
-
const onSaveKeyframed = (0, react_1.useCallback)((value, sourceFrame) => {
|
|
207
|
-
if (!clientId) {
|
|
208
|
-
return Promise.reject(new Error('Not connected to studio server'));
|
|
209
|
-
}
|
|
210
|
-
return (0, call_add_keyframe_1.callAddSequenceKeyframe)({
|
|
211
|
-
fileName: validatedLocation.source,
|
|
212
|
-
nodePath,
|
|
213
|
-
fieldKey: field.key,
|
|
214
|
-
sourceFrame,
|
|
215
|
-
value,
|
|
216
|
-
schema,
|
|
217
|
-
setPropStatuses,
|
|
218
|
-
clientId,
|
|
219
|
-
});
|
|
220
|
-
}, [
|
|
221
|
-
clientId,
|
|
222
|
-
field.key,
|
|
223
|
-
nodePath,
|
|
224
|
-
schema,
|
|
225
|
-
setPropStatuses,
|
|
226
|
-
validatedLocation.source,
|
|
227
|
-
]);
|
|
228
|
-
const onKeyframedDragValueChange = (0, react_1.useCallback)((value) => {
|
|
229
|
-
if (propStatus === null || !isKeyframedStatus(propStatus)) {
|
|
230
|
-
throw new Error('Expected keyframed status');
|
|
231
|
-
}
|
|
232
|
-
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
|
|
233
|
-
status: propStatus,
|
|
234
|
-
frame: jsxFrame,
|
|
235
|
-
value,
|
|
236
|
-
}));
|
|
237
|
-
}, [propStatus, field.key, jsxFrame, nodePath, setDragOverrides]);
|
|
238
|
-
const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
|
|
239
|
-
clearDragOverrides(nodePath);
|
|
240
|
-
}, [clearDragOverrides, nodePath]);
|
|
241
245
|
const onOpenKeyframeSettings = (0, react_1.useCallback)(() => {
|
|
242
246
|
var _a;
|
|
243
247
|
if (propStatus === null || !isKeyframedStatus(propStatus)) {
|
|
@@ -303,7 +307,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
303
307
|
return null;
|
|
304
308
|
}
|
|
305
309
|
const row = (jsx_runtime_1.jsxs(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
|
|
306
|
-
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_b = field.description) !== null && _b !== void 0 ? _b : field.key }), isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(
|
|
310
|
+
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_b = field.description) !== null && _b !== void 0 ? _b : field.key }), isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame }) })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus }) })) : (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }) }))] }));
|
|
307
311
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
|
|
308
312
|
};
|
|
309
313
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -4,6 +4,7 @@ exports.TimelineTransformOriginField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
|
+
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
7
8
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
8
9
|
const TimelineSchemaField_1 = require("./TimelineSchemaField");
|
|
9
10
|
const transform_origin_utils_1 = require("./transform-origin-utils");
|
|
@@ -31,13 +32,11 @@ const TimelineTransformOriginField = ({ field, propStatus, effectiveValue, onSav
|
|
|
31
32
|
step: configuredStep,
|
|
32
33
|
}), [configuredStep]);
|
|
33
34
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fixed: false,
|
|
35
|
+
return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
36
|
+
fieldSchema: field.fieldSchema,
|
|
37
37
|
value: v,
|
|
38
38
|
});
|
|
39
|
-
|
|
40
|
-
}, [decimalPlaces]);
|
|
39
|
+
}, [field.fieldSchema]);
|
|
41
40
|
const serialize = (0, react_1.useCallback)((x, y) => {
|
|
42
41
|
var _a;
|
|
43
42
|
return (0, transform_origin_utils_1.serializeTransformOrigin)({
|
|
@@ -4,6 +4,7 @@ exports.TimelineTranslateField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
|
+
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
7
8
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
8
9
|
const timeline_translate_utils_1 = require("./timeline-translate-utils");
|
|
9
10
|
const leftDraggerStyle = {
|
|
@@ -27,13 +28,11 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
|
|
|
27
28
|
step: configuredStep,
|
|
28
29
|
}), [configuredStep]);
|
|
29
30
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fixed: false,
|
|
31
|
+
return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
32
|
+
fieldSchema: field.fieldSchema,
|
|
33
33
|
value: v,
|
|
34
34
|
});
|
|
35
|
-
|
|
36
|
-
}, [decimalPlaces]);
|
|
35
|
+
}, [field.fieldSchema]);
|
|
37
36
|
// --- X callbacks ---
|
|
38
37
|
const onXChange = (0, react_1.useCallback)((newVal) => {
|
|
39
38
|
setDragX(newVal);
|
|
@@ -4,6 +4,7 @@ exports.TimelineUvCoordinateField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
|
+
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
7
8
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
8
9
|
const leftDraggerStyle = {
|
|
9
10
|
paddingLeft: 0,
|
|
@@ -49,12 +50,11 @@ const TimelineUvCoordinateField = ({ field, propStatus, effectiveValue, onSave,
|
|
|
49
50
|
step: configuredStep,
|
|
50
51
|
}), [configuredStep]);
|
|
51
52
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
52
|
-
return (0,
|
|
53
|
-
|
|
54
|
-
fixed: true,
|
|
53
|
+
return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
54
|
+
fieldSchema: field.fieldSchema,
|
|
55
55
|
value: v,
|
|
56
56
|
});
|
|
57
|
-
}, [
|
|
57
|
+
}, [field.fieldSchema]);
|
|
58
58
|
const onXChange = (0, react_1.useCallback)((newVal) => {
|
|
59
59
|
setDragX(newVal);
|
|
60
60
|
const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
|
|
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
9
9
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
10
10
|
const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
|
|
11
|
+
const timeline_video_filmstrip_times_1 = require("./timeline-video-filmstrip-times");
|
|
11
12
|
const outerStyle = {
|
|
12
13
|
width: '100%',
|
|
13
14
|
height: '100%',
|
|
@@ -22,7 +23,8 @@ const filmstripContainerStyle = {
|
|
|
22
23
|
fontSize: 10,
|
|
23
24
|
fontFamily: 'Arial, Helvetica',
|
|
24
25
|
};
|
|
25
|
-
const
|
|
26
|
+
const MAX_FROZEN_FRAME_CACHE_DEVIATION = timeline_utils_1.WEBCODECS_TIMESCALE * 0.05;
|
|
27
|
+
const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore, durationInFrames, playbackRate, volume, doesVolumeChange, premountWidth, postmountWidth, loopDisplay, frozenMediaFrame, }) => {
|
|
26
28
|
const { fps } = (0, remotion_1.useVideoConfig)();
|
|
27
29
|
const ref = (0, react_1.useRef)(null);
|
|
28
30
|
const [error, setError] = (0, react_1.useState)(null);
|
|
@@ -53,6 +55,94 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
57
|
current.appendChild(canvas);
|
|
58
|
+
const drawRepeatedFrame = (frame) => {
|
|
59
|
+
const thumbnailWidth = Math.max(1, frame.displayWidth / window.devicePixelRatio);
|
|
60
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
61
|
+
for (let x = 0; x < canvas.width; x += thumbnailWidth) {
|
|
62
|
+
ctx.drawImage(frame, x, 0, thumbnailWidth, timeline_layout_1.TIMELINE_LAYER_FILMSTRIP_HEIGHT);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const getCachedFrozenFrame = (timestamp) => {
|
|
66
|
+
const prefix = (0, timeline_utils_1.getFrameDatabaseKeyPrefix)(src);
|
|
67
|
+
const keys = Array.from(timeline_utils_1.frameDatabase.keys()).filter((k) => k.startsWith(prefix));
|
|
68
|
+
let bestDistance = Infinity;
|
|
69
|
+
let bestFrame = null;
|
|
70
|
+
for (const key of keys) {
|
|
71
|
+
const frame = timeline_utils_1.frameDatabase.get(key);
|
|
72
|
+
if (!frame) {
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
const distance = Math.abs((0, timeline_utils_1.getTimestampFromFrameDatabaseKey)(key) - timestamp);
|
|
76
|
+
if (distance < bestDistance) {
|
|
77
|
+
bestDistance = distance;
|
|
78
|
+
bestFrame = frame.frame;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return bestDistance <= MAX_FROZEN_FRAME_CACHE_DEVIATION
|
|
82
|
+
? bestFrame
|
|
83
|
+
: null;
|
|
84
|
+
};
|
|
85
|
+
const times = (0, timeline_video_filmstrip_times_1.getTimelineVideoFilmstripTimes)({
|
|
86
|
+
trimBefore,
|
|
87
|
+
durationInFrames,
|
|
88
|
+
playbackRate,
|
|
89
|
+
fps,
|
|
90
|
+
loopDisplay,
|
|
91
|
+
frozenMediaFrame,
|
|
92
|
+
});
|
|
93
|
+
if (times.type === 'frozen') {
|
|
94
|
+
const timestamp = times.timestampInSeconds * timeline_utils_1.WEBCODECS_TIMESCALE;
|
|
95
|
+
const cachedFrame = getCachedFrozenFrame(timestamp);
|
|
96
|
+
if (cachedFrame) {
|
|
97
|
+
drawRepeatedFrame(cachedFrame);
|
|
98
|
+
return () => {
|
|
99
|
+
current.removeChild(canvas);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
(0, timeline_utils_1.extractFrames)({
|
|
103
|
+
timestampsInSeconds: ({ track, }) => {
|
|
104
|
+
aspectRatio.current = track.width / track.height;
|
|
105
|
+
timeline_utils_1.aspectRatioCache.set(src, aspectRatio.current);
|
|
106
|
+
return [times.timestampInSeconds];
|
|
107
|
+
},
|
|
108
|
+
src,
|
|
109
|
+
onVideoSample: (sample) => {
|
|
110
|
+
let frame;
|
|
111
|
+
try {
|
|
112
|
+
frame = sample.toVideoFrame();
|
|
113
|
+
const scale = (timeline_layout_1.TIMELINE_LAYER_FILMSTRIP_HEIGHT / frame.displayHeight) *
|
|
114
|
+
window.devicePixelRatio;
|
|
115
|
+
const transformed = (0, timeline_utils_1.resizeVideoFrame)({
|
|
116
|
+
frame,
|
|
117
|
+
scale,
|
|
118
|
+
});
|
|
119
|
+
if (transformed !== frame) {
|
|
120
|
+
frame.close();
|
|
121
|
+
}
|
|
122
|
+
frame = undefined;
|
|
123
|
+
const databaseKey = (0, timeline_utils_1.makeFrameDatabaseKey)(src, transformed.timestamp);
|
|
124
|
+
(0, timeline_utils_1.addFrameToCache)(databaseKey, transformed);
|
|
125
|
+
drawRepeatedFrame(transformed);
|
|
126
|
+
}
|
|
127
|
+
catch (e) {
|
|
128
|
+
if (frame) {
|
|
129
|
+
frame.close();
|
|
130
|
+
}
|
|
131
|
+
throw e;
|
|
132
|
+
}
|
|
133
|
+
finally {
|
|
134
|
+
sample.close();
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
signal: controller.signal,
|
|
138
|
+
}).catch((e) => {
|
|
139
|
+
setError(e);
|
|
140
|
+
});
|
|
141
|
+
return () => {
|
|
142
|
+
controller.abort();
|
|
143
|
+
current.removeChild(canvas);
|
|
144
|
+
};
|
|
145
|
+
}
|
|
56
146
|
const loopWidth = (0, timeline_utils_1.getLoopDisplayWidth)({
|
|
57
147
|
visualizationWidth: mediaNaturalWidth,
|
|
58
148
|
loopDisplay,
|
|
@@ -85,13 +175,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
85
175
|
};
|
|
86
176
|
// desired-timestamp -> filled-timestamp
|
|
87
177
|
const filledSlots = new Map();
|
|
88
|
-
const fromSeconds
|
|
89
|
-
const visibleDurationInFrames = shouldRepeatVideo && loopDisplay
|
|
90
|
-
? loopDisplay.durationInFrames
|
|
91
|
-
: durationInFrames;
|
|
92
|
-
// Trim is applied first, then playbackRate. Each composition frame
|
|
93
|
-
// advances the source video by `playbackRate` source frames.
|
|
94
|
-
const toSeconds = fromSeconds + (visibleDurationInFrames * playbackRate) / fps;
|
|
178
|
+
const { fromSeconds, toSeconds } = times;
|
|
95
179
|
const targetWidth = shouldRepeatVideo
|
|
96
180
|
? targetCanvas.width
|
|
97
181
|
: mediaNaturalWidth;
|
|
@@ -216,6 +300,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
216
300
|
durationInFrames,
|
|
217
301
|
error,
|
|
218
302
|
fps,
|
|
303
|
+
frozenMediaFrame,
|
|
219
304
|
loopDisplay,
|
|
220
305
|
mediaNaturalWidth,
|
|
221
306
|
mediaVisualizationWidth,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SequencePropsSubscriptionKey,
|
|
1
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
2
2
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
3
3
|
export type AddSequenceKeyframeChange = {
|
|
4
4
|
fileName: string;
|
|
@@ -6,7 +6,7 @@ export type AddSequenceKeyframeChange = {
|
|
|
6
6
|
fieldKey: string;
|
|
7
7
|
sourceFrame: number;
|
|
8
8
|
value: unknown;
|
|
9
|
-
schema:
|
|
9
|
+
schema: InteractivitySchema;
|
|
10
10
|
};
|
|
11
11
|
export type AddEffectKeyframeChange = AddSequenceKeyframeChange & {
|
|
12
12
|
effectIndex: number;
|
|
@@ -17,7 +17,7 @@ export declare const callAddSequenceKeyframe: ({ fileName, nodePath, fieldKey, s
|
|
|
17
17
|
fieldKey: string;
|
|
18
18
|
sourceFrame: number;
|
|
19
19
|
value: unknown;
|
|
20
|
-
schema:
|
|
20
|
+
schema: InteractivitySchema;
|
|
21
21
|
setPropStatuses: SetPropStatuses;
|
|
22
22
|
clientId: string;
|
|
23
23
|
}) => Promise<void>;
|
|
@@ -34,7 +34,7 @@ export declare const callAddEffectKeyframe: ({ fileName, nodePath, effectIndex,
|
|
|
34
34
|
fieldKey: string;
|
|
35
35
|
sourceFrame: number;
|
|
36
36
|
value: unknown;
|
|
37
|
-
schema:
|
|
37
|
+
schema: InteractivitySchema;
|
|
38
38
|
setPropStatuses: SetPropStatuses;
|
|
39
39
|
clientId: string;
|
|
40
40
|
}) => Promise<void>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { SequencePropsSubscriptionKey,
|
|
1
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
2
2
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
3
3
|
export type DeleteSequenceKeyframeChange = {
|
|
4
4
|
fileName: string;
|
|
5
5
|
nodePath: SequencePropsSubscriptionKey;
|
|
6
6
|
fieldKey: string;
|
|
7
7
|
sourceFrame: number;
|
|
8
|
-
schema:
|
|
8
|
+
schema: InteractivitySchema;
|
|
9
9
|
};
|
|
10
10
|
export type DeleteEffectKeyframeChange = DeleteSequenceKeyframeChange & {
|
|
11
11
|
effectIndex: number;
|
|
@@ -15,7 +15,7 @@ export declare const callDeleteSequenceKeyframe: ({ fileName, nodePath, fieldKey
|
|
|
15
15
|
nodePath: SequencePropsSubscriptionKey;
|
|
16
16
|
fieldKey: string;
|
|
17
17
|
sourceFrame: number;
|
|
18
|
-
schema:
|
|
18
|
+
schema: InteractivitySchema;
|
|
19
19
|
setPropStatuses: SetPropStatuses;
|
|
20
20
|
clientId: string;
|
|
21
21
|
}) => Promise<void>;
|
|
@@ -25,7 +25,7 @@ export declare const callDeleteEffectKeyframe: ({ fileName, nodePath, effectInde
|
|
|
25
25
|
effectIndex: number;
|
|
26
26
|
fieldKey: string;
|
|
27
27
|
sourceFrame: number;
|
|
28
|
-
schema:
|
|
28
|
+
schema: InteractivitySchema;
|
|
29
29
|
setPropStatuses: SetPropStatuses;
|
|
30
30
|
clientId: string;
|
|
31
31
|
}) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SequencePropsSubscriptionKey,
|
|
1
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
2
2
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
3
3
|
export type MoveSequenceKeyframeChange = {
|
|
4
4
|
fileName: string;
|
|
@@ -6,7 +6,7 @@ export type MoveSequenceKeyframeChange = {
|
|
|
6
6
|
fieldKey: string;
|
|
7
7
|
fromFrame: number;
|
|
8
8
|
toFrame: number;
|
|
9
|
-
schema:
|
|
9
|
+
schema: InteractivitySchema;
|
|
10
10
|
};
|
|
11
11
|
export type MoveEffectKeyframeChange = MoveSequenceKeyframeChange & {
|
|
12
12
|
effectIndex: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type KeyframeSettings } from '@remotion/studio-shared';
|
|
2
|
-
import type { SequencePropsSubscriptionKey,
|
|
2
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
3
3
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
4
4
|
export declare const callUpdateSequenceKeyframeSettings: ({ fileName, nodePath, fieldKey, settings, schema, setPropStatuses, clientId, }: {
|
|
5
5
|
fileName: string;
|
|
6
6
|
nodePath: SequencePropsSubscriptionKey;
|
|
7
7
|
fieldKey: string;
|
|
8
8
|
settings: KeyframeSettings;
|
|
9
|
-
schema:
|
|
9
|
+
schema: InteractivitySchema;
|
|
10
10
|
setPropStatuses: SetPropStatuses;
|
|
11
11
|
clientId: string;
|
|
12
12
|
}) => Promise<void>;
|
|
@@ -16,7 +16,7 @@ export declare const callUpdateEffectKeyframeSettings: ({ fileName, nodePath, ef
|
|
|
16
16
|
effectIndex: number;
|
|
17
17
|
fieldKey: string;
|
|
18
18
|
settings: KeyframeSettings;
|
|
19
|
-
schema:
|
|
19
|
+
schema: InteractivitySchema;
|
|
20
20
|
setPropStatuses: SetPropStatuses;
|
|
21
21
|
clientId: string;
|
|
22
22
|
}) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { OverrideIdToNodePaths, TSequence } from 'remotion';
|
|
2
2
|
import type { ConfirmationDialogFunction } from '../ConfirmationDialog-types';
|
|
3
3
|
import type { SetPropStatuses } from './save-sequence-prop';
|
|
4
|
-
import type
|
|
4
|
+
import { type TimelineSelection } from './TimelineSelection';
|
|
5
5
|
export declare const deleteSelectedTimelineItem: ({ selection, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }: {
|
|
6
6
|
selection: TimelineSelection;
|
|
7
7
|
sequences: TSequence[];
|
|
@@ -10,6 +10,7 @@ export declare const deleteSelectedTimelineItem: ({ selection, sequences, overri
|
|
|
10
10
|
clientId: string;
|
|
11
11
|
confirm: ConfirmationDialogFunction;
|
|
12
12
|
}) => Promise<boolean> | null;
|
|
13
|
+
export declare const getTimelineSelectionAfterDeletingItems: (selections: readonly TimelineSelection[]) => readonly TimelineSelection[];
|
|
13
14
|
export declare const deleteSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }: {
|
|
14
15
|
selections: readonly TimelineSelection[];
|
|
15
16
|
sequences: TSequence[];
|