@remotion/studio 4.0.526 → 4.0.528
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/AgentPrompt.js +1 -2
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/Canvas.js +88 -26
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentAsset.js +4 -2
- package/dist/components/EditorRuler/Ruler.js +6 -3
- package/dist/components/EffectPickerModal.js +69 -43
- package/dist/components/ElementInstallConfirmation.js +3 -3
- package/dist/components/ElementLibrariesSettings.d.ts +2 -0
- package/dist/components/ElementLibrariesSettings.js +200 -0
- package/dist/components/InitialCompositionLoader.js +4 -2
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +1 -0
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
- package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
- package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
- package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
- package/dist/components/InspectorPanel/styles.js +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/InspectorSourceLocation.js +3 -0
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +11 -5
- package/dist/components/NewComposition/InputDragger.d.ts +3 -1
- package/dist/components/NewComposition/InputDragger.js +28 -9
- package/dist/components/NewComposition/NewComposition.js +7 -6
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/Preview.js +4 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
- package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobError.js +24 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +3 -3
- package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
- package/dist/components/RenderQueue/load-model-for-job.js +5 -1
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineCropControls.js +2 -1
- package/dist/components/SelectedOutlineEditingHandles.js +9 -2
- package/dist/components/SelectedOutlineElement.js +9 -3
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
- package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
- package/dist/components/SelectedOutlineOverlay.js +152 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +433 -0
- package/dist/components/SelectedOutlinePolygon.js +21 -46
- package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
- package/dist/components/SelectedOutlineRenderer.js +32 -136
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- package/dist/components/SettingsModal.js +30 -3
- package/dist/components/SettingsModalFooter.d.ts +1 -0
- package/dist/components/SettingsModalFooter.js +7 -3
- package/dist/components/ShowOutlinesProvider.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +13 -14
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +1 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
- package/dist/components/Timeline/TimelineSelection.js +16 -9
- package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
- package/dist/components/Timeline/TimelineSequence.js +65 -21
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
- package/dist/components/Timeline/TimelineTextContentField.js +27 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
- package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
- package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
- package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
- package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
- package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
- package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
- package/dist/components/Timeline/get-node-keyframes.js +6 -4
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
- package/dist/components/Timeline/keyframe-clipboard.js +17 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +18 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
- package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
- package/dist/components/UpdatesSettings.js +2 -0
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +23 -40
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +8 -4
- package/dist/components/composition-menu-items.js +4 -4
- package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
- package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
- package/dist/components/effect-drag-and-drop.d.ts +13 -5
- package/dist/components/effect-drag-and-drop.js +19 -4
- package/dist/components/get-open-in-menu-items.d.ts +2 -1
- package/dist/components/get-open-in-menu-items.js +24 -8
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +3 -1
- package/dist/components/public-output-name.d.ts +1 -0
- package/dist/components/public-output-name.js +7 -3
- package/dist/components/selected-outline-drag.d.ts +1 -6
- package/dist/components/selected-outline-drag.js +22 -6
- package/dist/components/selected-outline-geometry.d.ts +2 -18
- package/dist/components/selected-outline-measurement.d.ts +23 -41
- package/dist/components/selected-outline-measurement.js +14 -252
- package/dist/components/selected-outline-order.d.ts +4 -11
- package/dist/components/selected-outline-order.js +2 -254
- package/dist/components/selected-outline-snap.d.ts +1 -1
- package/dist/components/selected-outline-snap.js +2 -1
- package/dist/components/selected-outline-types.d.ts +18 -28
- package/dist/components/selected-outline-uv.d.ts +4 -4
- package/dist/components/selected-outline-uv.js +6 -111
- package/dist/components/sequence-props-api.js +0 -10
- package/dist/components/use-selected-outline-control-target.js +12 -21
- package/dist/components/wrap-jsx-node-api.d.ts +2 -0
- package/dist/components/wrap-jsx-node-api.js +13 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
- package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
- package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
- package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
- package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/index-890dd9b3.mjs +768 -0
- package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
- package/dist/esm/index-dfy1t576.mjs +129 -0
- package/dist/esm/index-dh3zk2hv.mjs +220 -0
- package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
- package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
- package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/internals.mjs +13 -10
- package/dist/esm/previewEntry.mjs +18 -12
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
- package/dist/helpers/calculate-timeline.d.ts +5 -1
- package/dist/helpers/calculate-timeline.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- package/dist/helpers/copy-text.js +1 -16
- package/dist/helpers/create-folder-tree.js +2 -1
- package/dist/helpers/editor-guide-selection.d.ts +1 -1
- package/dist/helpers/editor-ruler.js +23 -12
- package/dist/helpers/get-connected-compositions.d.ts +6 -1
- package/dist/helpers/get-connected-compositions.js +1 -1
- package/dist/helpers/get-sequence-double-click-action.js +1 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
- package/dist/helpers/get-sequence-visible-range.js +2 -5
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
- package/dist/helpers/get-timeline-nestedness.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
- package/dist/helpers/hoverable.js +6 -5
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/open-in-editor.js +1 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
- package/dist/helpers/prism-vsc-dark-plus.js +52 -51
- package/dist/helpers/resolve-studio-color.d.ts +1 -0
- package/dist/helpers/resolve-studio-color.js +11 -0
- package/dist/helpers/studio-css-variables.d.ts +1 -0
- package/dist/helpers/studio-css-variables.js +105 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +15 -9
- package/dist/helpers/use-runtime-values.js +2 -28
- package/dist/hot-middleware-client/client.js +5 -3
- package/dist/icons/align-center-horizontal.js +2 -1
- package/dist/icons/align-left.js +2 -1
- package/dist/icons/align-right.js +2 -1
- package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
- package/dist/icons/background-removal.js +9 -0
- package/dist/icons/wrap.d.ts +4 -0
- package/dist/icons/wrap.js +10 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/modals.d.ts +20 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/dist/state/timeline-zoom.js +4 -0
- package/package.json +20 -19
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
- package/dist/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
- package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
- package/dist/esm/index-cw0pnpg5.mjs +0 -50
- package/dist/esm/index-k426ye99.mjs +0 -139
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
- package/dist/icons/separation.js +0 -7
|
@@ -62,7 +62,7 @@ const getNodeCanEditEasing = ({ node, nodePath, propStatuses, }) => {
|
|
|
62
62
|
return ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) === 'keyframed' &&
|
|
63
63
|
(0, studio_shared_1.canEditEasingForInterpolationFunction)(effectPropStatus.interpolationFunction));
|
|
64
64
|
};
|
|
65
|
-
const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayOffset, }) => {
|
|
65
|
+
const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayOffset, keyframePlaybackRate, }) => {
|
|
66
66
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
67
67
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
68
68
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
@@ -123,6 +123,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
123
123
|
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
124
124
|
propStatuses,
|
|
125
125
|
keyframeDisplayOffset,
|
|
126
|
+
keyframePlaybackRate,
|
|
126
127
|
getDragOverrides,
|
|
127
128
|
getEffectDragOverrides,
|
|
128
129
|
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
@@ -132,6 +133,7 @@ const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayO
|
|
|
132
133
|
getDragOverrides,
|
|
133
134
|
getEffectDragOverrides,
|
|
134
135
|
keyframeDisplayOffset,
|
|
136
|
+
keyframePlaybackRate,
|
|
135
137
|
nodePathInfo.sequenceSubscriptionKey,
|
|
136
138
|
propStatuses,
|
|
137
139
|
]);
|
|
@@ -12,10 +12,14 @@ const isSequenceVisibleAtTimelinePosition = ({ sequence, timelinePosition, }) =>
|
|
|
12
12
|
};
|
|
13
13
|
exports.isSequenceVisibleAtTimelinePosition = isSequenceVisibleAtTimelinePosition;
|
|
14
14
|
const calculateSequenceFreezeFrame = ({ sequence, sequenceFrameOffset, timelinePosition, }) => {
|
|
15
|
-
const rawFreezeFrame =
|
|
16
|
-
|
|
15
|
+
const rawFreezeFrame = (timelinePosition - sequence.from) * sequence.sequencePlaybackRate +
|
|
16
|
+
sequenceFrameOffset;
|
|
17
|
+
const minFrame = (Math.ceil(sequence.from) - sequence.from) * sequence.sequencePlaybackRate +
|
|
18
|
+
sequenceFrameOffset;
|
|
17
19
|
const maxFrame = Number.isFinite(sequence.duration)
|
|
18
|
-
? Math.max(minFrame, sequence.
|
|
20
|
+
? Math.max(minFrame, (Math.ceil(sequence.from + sequence.duration) - 1 - sequence.from) *
|
|
21
|
+
sequence.sequencePlaybackRate +
|
|
22
|
+
sequenceFrameOffset)
|
|
19
23
|
: Infinity;
|
|
20
24
|
return Math.min(Math.max(minFrame, rawFreezeFrame), maxFrame);
|
|
21
25
|
};
|
|
@@ -102,7 +102,7 @@ const getTimelineSelectionsAfterEasingKeyframeDrag = ({ delta, selections, targe
|
|
|
102
102
|
exports.getTimelineSelectionsAfterEasingKeyframeDrag = getTimelineSelectionsAfterEasingKeyframeDrag;
|
|
103
103
|
const getCodeValueForTarget = ({ propStatuses, nodePath, }) => propStatuses[remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath)];
|
|
104
104
|
const getTimelineKeyframeDragTarget = ({ propStatuses, displayFrame, nodePathInfo, overrideIdsToNodePaths, sequences, }) => {
|
|
105
|
-
var _a, _b, _c;
|
|
105
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
106
106
|
const field = (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(nodePathInfo.auxiliaryKeys);
|
|
107
107
|
if (field === null) {
|
|
108
108
|
return null;
|
|
@@ -132,11 +132,16 @@ const getTimelineKeyframeDragTarget = ({ propStatuses, displayFrame, nodePathInf
|
|
|
132
132
|
if ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) !== 'keyframed') {
|
|
133
133
|
return null;
|
|
134
134
|
}
|
|
135
|
-
const effectSourceFrame =
|
|
136
|
-
|
|
135
|
+
const effectSourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
136
|
+
displayFrame,
|
|
137
|
+
propStatus: effectPropStatus,
|
|
138
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
137
139
|
propStatus: effectPropStatus,
|
|
138
140
|
keyframeDisplayOffset: (_b = track === null || track === void 0 ? void 0 : track.keyframeDisplayOffset) !== null && _b !== void 0 ? _b : 0,
|
|
139
|
-
|
|
141
|
+
keyframePlaybackRate: (_c = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _c !== void 0 ? _c : 1,
|
|
142
|
+
}),
|
|
143
|
+
keyframePlaybackRate: (_d = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _d !== void 0 ? _d : 1,
|
|
144
|
+
});
|
|
140
145
|
if (!effectPropStatus.keyframes.some((keyframe) => keyframe.frame === effectSourceFrame)) {
|
|
141
146
|
return null;
|
|
142
147
|
}
|
|
@@ -151,17 +156,23 @@ const getTimelineKeyframeDragTarget = ({ propStatuses, displayFrame, nodePathInf
|
|
|
151
156
|
propStatus: effectPropStatus,
|
|
152
157
|
schema: effect.schema,
|
|
153
158
|
sourceFrame: effectSourceFrame,
|
|
159
|
+
keyframePlaybackRate: (_e = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _e !== void 0 ? _e : 1,
|
|
154
160
|
};
|
|
155
161
|
}
|
|
156
162
|
const sequencePropStatus = sequenceStatus.props[field.fieldKey];
|
|
157
163
|
if ((sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) !== 'keyframed') {
|
|
158
164
|
return null;
|
|
159
165
|
}
|
|
160
|
-
const sourceFrame =
|
|
161
|
-
|
|
166
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
167
|
+
displayFrame,
|
|
168
|
+
propStatus: sequencePropStatus,
|
|
169
|
+
keyframeDisplayOffset: (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
162
170
|
propStatus: sequencePropStatus,
|
|
163
|
-
keyframeDisplayOffset: (
|
|
164
|
-
|
|
171
|
+
keyframeDisplayOffset: (_f = track === null || track === void 0 ? void 0 : track.keyframeDisplayOffset) !== null && _f !== void 0 ? _f : 0,
|
|
172
|
+
keyframePlaybackRate: (_g = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _g !== void 0 ? _g : 1,
|
|
173
|
+
}),
|
|
174
|
+
keyframePlaybackRate: (_h = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _h !== void 0 ? _h : 1,
|
|
175
|
+
});
|
|
165
176
|
if (!sequencePropStatus.keyframes.some((keyframe) => keyframe.frame === sourceFrame)) {
|
|
166
177
|
return null;
|
|
167
178
|
}
|
|
@@ -175,6 +186,7 @@ const getTimelineKeyframeDragTarget = ({ propStatuses, displayFrame, nodePathInf
|
|
|
175
186
|
propStatus: sequencePropStatus,
|
|
176
187
|
schema: sequence.controls.schema,
|
|
177
188
|
sourceFrame,
|
|
189
|
+
keyframePlaybackRate: (_j = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _j !== void 0 ? _j : 1,
|
|
178
190
|
};
|
|
179
191
|
};
|
|
180
192
|
const getTargetGroupKey = (target) => {
|
|
@@ -196,10 +208,11 @@ const groupTargets = (targets) => {
|
|
|
196
208
|
}
|
|
197
209
|
return [...groups.values()];
|
|
198
210
|
};
|
|
199
|
-
const
|
|
211
|
+
const getMoveForTarget = (target, delta) => ({
|
|
200
212
|
fromFrame: target.sourceFrame,
|
|
201
|
-
toFrame: target.sourceFrame + delta,
|
|
202
|
-
})
|
|
213
|
+
toFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame + delta * target.keyframePlaybackRate, target.propStatus),
|
|
214
|
+
});
|
|
215
|
+
const getMovesForGroup = ({ group, delta, }) => group.map((target) => getMoveForTarget(target, delta));
|
|
203
216
|
const canMoveTimelineKeyframeDragTargets = ({ targets, delta, }) => groupTargets(targets).every((group) => {
|
|
204
217
|
const [first] = group;
|
|
205
218
|
if (!first) {
|
|
@@ -422,8 +435,7 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
422
435
|
fileName: target.fileName,
|
|
423
436
|
nodePath: target.nodePath,
|
|
424
437
|
fieldKey: target.fieldKey,
|
|
425
|
-
|
|
426
|
-
toFrame: target.sourceFrame + lastDelta,
|
|
438
|
+
...getMoveForTarget(target, lastDelta),
|
|
427
439
|
schema: target.schema,
|
|
428
440
|
})),
|
|
429
441
|
effectKeyframes: targets
|
|
@@ -433,8 +445,7 @@ const useTimelineKeyframeDrag = ({ frame, nodePathInfo, onSelect, selectable, se
|
|
|
433
445
|
nodePath: target.nodePath,
|
|
434
446
|
effectIndex: target.effectIndex,
|
|
435
447
|
fieldKey: target.fieldKey,
|
|
436
|
-
|
|
437
|
-
toFrame: target.sourceFrame + lastDelta,
|
|
448
|
+
...getMoveForTarget(target, lastDelta),
|
|
438
449
|
schema: target.schema,
|
|
439
450
|
})),
|
|
440
451
|
setPropStatuses,
|
|
@@ -629,8 +640,7 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
|
|
|
629
640
|
fileName: target.fileName,
|
|
630
641
|
nodePath: target.nodePath,
|
|
631
642
|
fieldKey: target.fieldKey,
|
|
632
|
-
|
|
633
|
-
toFrame: target.sourceFrame + lastDelta,
|
|
643
|
+
...getMoveForTarget(target, lastDelta),
|
|
634
644
|
schema: target.schema,
|
|
635
645
|
})),
|
|
636
646
|
effectKeyframes: targets
|
|
@@ -640,8 +650,7 @@ const useTimelineEasingKeyframeDrag = ({ onSelect, selectable, selected, selecti
|
|
|
640
650
|
nodePath: target.nodePath,
|
|
641
651
|
effectIndex: target.effectIndex,
|
|
642
652
|
fieldKey: target.fieldKey,
|
|
643
|
-
|
|
644
|
-
toFrame: target.sourceFrame + lastDelta,
|
|
653
|
+
...getMoveForTarget(target, lastDelta),
|
|
645
654
|
schema: target.schema,
|
|
646
655
|
})),
|
|
647
656
|
setPropStatuses,
|
|
@@ -20,6 +20,7 @@ const label = {
|
|
|
20
20
|
textAlign: 'left',
|
|
21
21
|
textOverflow: 'ellipsis',
|
|
22
22
|
userSelect: 'none',
|
|
23
|
+
WebkitUserSelect: 'none',
|
|
23
24
|
whiteSpace: 'nowrap',
|
|
24
25
|
};
|
|
25
26
|
const TimelineCombobox = ({ values, selectedId, title, tooltipDelay, labelWidth = 32, renderLeftItem, unhoveredIconColor = colors_1.LIGHT_TEXT, }) => {
|
|
@@ -8,7 +8,7 @@ const ModelManager_1 = require("../ModelManager");
|
|
|
8
8
|
const AVAILABLE_MODELS = (0, whisper_webgpu_1.getAvailableModels)();
|
|
9
9
|
const Models = ({ description, indent, visible }) => {
|
|
10
10
|
const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
|
|
11
|
-
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, whisper_webgpu_1.
|
|
11
|
+
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, whisper_webgpu_1.downloadWhisperModel)({
|
|
12
12
|
model,
|
|
13
13
|
onProgress: (progress) => onProgress(progress.progress),
|
|
14
14
|
}), []);
|
|
@@ -280,7 +280,7 @@ const AdvancedSettings = ({ chunkLengthInSeconds, doSample, forceFullSequences,
|
|
|
280
280
|
title: 'Learn more about No-repeat n-gram size',
|
|
281
281
|
}, min: 0, name: "No-repeat n-gram size", onValueChanged: setNoRepeatNgramSize, step: 1, value: noRepeatNgramSize })] }), decodingValidationMessage ? (jsx_runtime_1.jsx("div", { id: TRANSCRIPTION_DECODING_MESSAGE_ID, "aria-live": "polite", style: { padding: '0 16px' }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: decodingValidationMessage, type: "error" }) })) : null] }));
|
|
282
282
|
};
|
|
283
|
-
const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }) => {
|
|
283
|
+
const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, target, }) => {
|
|
284
284
|
var _a, _b, _c;
|
|
285
285
|
const [tab, setTab] = (0, react_1.useState)('transcribe');
|
|
286
286
|
const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
|
|
@@ -323,11 +323,16 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
|
|
|
323
323
|
};
|
|
324
324
|
}, []);
|
|
325
325
|
const normalizedOutName = outName.normalize('NFC').toLowerCase();
|
|
326
|
-
const queuedOutputExists = captionJobs.some((job) =>
|
|
326
|
+
const queuedOutputExists = captionJobs.some((job) => job.target === null &&
|
|
327
|
+
(job.status === 'idle' ||
|
|
328
|
+
job.status === 'running' ||
|
|
329
|
+
job.status === 'saving') &&
|
|
327
330
|
job.outName.normalize('NFC').toLowerCase() === normalizedOutName);
|
|
328
|
-
const outputValidationMessage =
|
|
329
|
-
?
|
|
330
|
-
|
|
331
|
+
const outputValidationMessage = target === null
|
|
332
|
+
? ((_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
|
|
333
|
+
? 'Another caption job is already using this output file'
|
|
334
|
+
: null))
|
|
335
|
+
: null;
|
|
331
336
|
const exists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutName);
|
|
332
337
|
const chunkValidationMessage = strideLengthInSeconds * 2 >= chunkLengthInSeconds
|
|
333
338
|
? 'Stride length must be less than half of chunk length'
|
|
@@ -371,7 +376,8 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
|
|
|
371
376
|
displayName,
|
|
372
377
|
audioStreamIndex,
|
|
373
378
|
requestInit,
|
|
374
|
-
outName,
|
|
379
|
+
outName: target === null ? outName : 'Basic captions',
|
|
380
|
+
target,
|
|
375
381
|
model: selectedModel,
|
|
376
382
|
language: modelInfo.multilingual ? selectedLanguage : null,
|
|
377
383
|
task: modelInfo.supportsTranslation ? selectedTask : 'transcribe',
|
|
@@ -398,6 +404,7 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
|
|
|
398
404
|
forceFullSequences,
|
|
399
405
|
noRepeatNgramSize,
|
|
400
406
|
outName,
|
|
407
|
+
target,
|
|
401
408
|
repetitionPenalty,
|
|
402
409
|
requestInit,
|
|
403
410
|
src,
|
|
@@ -410,17 +417,17 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
|
|
|
410
417
|
temperature,
|
|
411
418
|
topK,
|
|
412
419
|
]);
|
|
413
|
-
|
|
414
|
-
|
|
420
|
+
const title = target === null ? `Transcribe ${displayName}` : 'Generate captions';
|
|
421
|
+
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
|
|
422
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
415
423
|
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onAddToQueue, disabled: !canTranscribe, title: transcribeDisabledReason, style: {
|
|
416
424
|
...render_modals_1.buttonStyle,
|
|
417
425
|
backgroundColor: canTranscribe
|
|
418
426
|
? render_modals_1.buttonStyle.backgroundColor
|
|
419
427
|
: colors_1.BLUE_DISABLED,
|
|
420
|
-
}, children:
|
|
428
|
+
}, children: target === null ? 'Transcribe' : 'Generate captions' })
|
|
421
429
|
] }), jsx_runtime_1.jsxs("div", { style: transcriptionLayout, children: [
|
|
422
|
-
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
423
|
-
jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
|
|
430
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [target === null ? (jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage })) : null, target === null ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
|
|
424
431
|
] }), jsx_runtime_1.jsx("div", { style: tab === 'advanced' ? advancedPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(AdvancedSettings, { chunkLengthInSeconds: chunkLengthInSeconds, decodingValidationMessage: decodingValidationMessage, doSample: doSample, forceFullSequences: forceFullSequences, noRepeatNgramSize: noRepeatNgramSize, repetitionPenalty: repetitionPenalty, setChunkLengthInSeconds: setChunkLengthInSeconds, setDoSample: setDoSample, setForceFullSequences: setForceFullSequences, setNoRepeatNgramSize: setNoRepeatNgramSize, setRepetitionPenalty: setRepetitionPenalty, setStrideLengthInSeconds: setStrideLengthInSeconds, setTemperature: setTemperature, setTopK: setTopK, strideLengthInSeconds: strideLengthInSeconds, temperature: temperature, topK: topK, validationMessage: chunkValidationMessage }) }), jsx_runtime_1.jsx(Models_1.Models, { description: 'Models are downloaded automatically when needed.\nYou can also manage the browser cache here.', indent: true, visible: tab === 'models' })
|
|
425
432
|
] })
|
|
426
433
|
] }) }));
|
|
@@ -43,6 +43,6 @@ const LazyTranscriptionModal = react_1.default.lazy(async () => {
|
|
|
43
43
|
return { default: TranscriptionModal };
|
|
44
44
|
});
|
|
45
45
|
const TranscriptionModalWithOptionalWhisper = ({ state }) => {
|
|
46
|
-
return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title:
|
|
46
|
+
return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title: state.target === null ? 'Transcribe' : 'Generate captions', children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyTranscriptionModal, { ...state }) }) }));
|
|
47
47
|
};
|
|
48
48
|
exports.TranscriptionModalWithOptionalWhisper = TranscriptionModalWithOptionalWhisper;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const resampleMediaTo16Khz: ({ src, audioStreamIndex, requestInit, onProgress, }: {
|
|
1
|
+
export declare const resampleMediaTo16Khz: ({ src, audioStreamIndex, requestInit, onProgress, signal, }: {
|
|
2
2
|
readonly src: string;
|
|
3
3
|
readonly audioStreamIndex: number | null;
|
|
4
4
|
readonly requestInit: Omit<RequestInit, "signal"> | null;
|
|
5
5
|
readonly onProgress: (progress: number) => void;
|
|
6
|
+
readonly signal: AbortSignal;
|
|
6
7
|
}) => Promise<Float32Array<ArrayBufferLike>>;
|
|
@@ -3,13 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.resampleMediaTo16Khz = void 0;
|
|
4
4
|
const whisper_webgpu_1 = require("@remotion/whisper-webgpu");
|
|
5
5
|
const mediabunny_1 = require("mediabunny");
|
|
6
|
-
const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProgress, }) => {
|
|
6
|
+
const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProgress, signal, }) => {
|
|
7
7
|
var _a, _b;
|
|
8
|
+
signal.throwIfAborted();
|
|
8
9
|
const input = new mediabunny_1.Input({
|
|
9
10
|
formats: mediabunny_1.ALL_FORMATS,
|
|
10
11
|
source: new mediabunny_1.UrlSource(src, requestInit === null ? {} : { requestInit }),
|
|
11
12
|
});
|
|
12
13
|
const waveformChunks = [];
|
|
14
|
+
let conversion = null;
|
|
15
|
+
let cancellation = null;
|
|
16
|
+
const onAbort = () => {
|
|
17
|
+
var _a;
|
|
18
|
+
cancellation = (_a = conversion === null || conversion === void 0 ? void 0 : conversion.cancel().catch(() => undefined)) !== null && _a !== void 0 ? _a : null;
|
|
19
|
+
input.dispose();
|
|
20
|
+
};
|
|
21
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
13
22
|
try {
|
|
14
23
|
onProgress(0);
|
|
15
24
|
const audioTracks = await input.getAudioTracks();
|
|
@@ -29,7 +38,8 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
29
38
|
format: new mediabunny_1.WavOutputFormat(),
|
|
30
39
|
target: new mediabunny_1.NullTarget(),
|
|
31
40
|
});
|
|
32
|
-
|
|
41
|
+
signal.throwIfAborted();
|
|
42
|
+
conversion = await mediabunny_1.Conversion.init({
|
|
33
43
|
input,
|
|
34
44
|
output,
|
|
35
45
|
tracks: 'all',
|
|
@@ -43,6 +53,7 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
43
53
|
forceTranscode: true,
|
|
44
54
|
numberOfChannels: 1,
|
|
45
55
|
process: (sample) => {
|
|
56
|
+
signal.throwIfAborted();
|
|
46
57
|
const floats = new Float32Array(sample.allocationSize({ format: 'f32', planeIndex: 0 }) /
|
|
47
58
|
Float32Array.BYTES_PER_ELEMENT);
|
|
48
59
|
sample.copyTo(floats, { format: 'f32', planeIndex: 0 });
|
|
@@ -57,14 +68,21 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
57
68
|
};
|
|
58
69
|
},
|
|
59
70
|
});
|
|
71
|
+
signal.throwIfAborted();
|
|
60
72
|
if (!conversion.isValid) {
|
|
61
73
|
throw new Error('The audio track cannot be decoded in this browser. Try converting the media to WAV first.');
|
|
62
74
|
}
|
|
63
75
|
conversion.onProgress = (progress) => onProgress(progress);
|
|
64
76
|
await conversion.execute();
|
|
77
|
+
signal.throwIfAborted();
|
|
65
78
|
onProgress(1);
|
|
66
79
|
}
|
|
67
80
|
finally {
|
|
81
|
+
signal.removeEventListener('abort', onAbort);
|
|
82
|
+
await cancellation;
|
|
83
|
+
if (signal.aborted && conversion && cancellation === null) {
|
|
84
|
+
await conversion.cancel().catch(() => undefined);
|
|
85
|
+
}
|
|
68
86
|
input.dispose();
|
|
69
87
|
}
|
|
70
88
|
const waveformLength = waveformChunks.reduce((maximum, chunk) => Math.max(maximum, chunk.startFrame + chunk.waveform.length), 0);
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
|
+
const studio_css_variables_1 = require("../helpers/studio-css-variables");
|
|
8
9
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
10
|
const copy_1 = require("../icons/copy");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
@@ -127,6 +128,7 @@ const RenderedReleaseNotes = ({ release }) => {
|
|
|
127
128
|
return null;
|
|
128
129
|
}
|
|
129
130
|
return `<!doctype html><html><head><base href="https://github.com/remotion-dev/remotion/" target="_blank"><style>
|
|
131
|
+
${studio_css_variables_1.studioCssVariables}
|
|
130
132
|
:root { color-scheme: dark; }
|
|
131
133
|
html, body { overflow: hidden; }
|
|
132
134
|
body { background: ${colors_1.BACKGROUND}; color: ${colors_1.LIGHT_TEXT}; font-family: sans-serif; font-size: 13px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
|
|
@@ -8,7 +8,7 @@ const ModelManager_1 = require("../ModelManager");
|
|
|
8
8
|
const AVAILABLE_MODELS = (0, video_matting_1.getAvailableModels)();
|
|
9
9
|
const Models = ({ description, indent, visible }) => {
|
|
10
10
|
const isModelCached = (0, react_1.useCallback)((model) => (0, video_matting_1.isVideoMattingModelCached)({ model }), []);
|
|
11
|
-
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.
|
|
11
|
+
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.downloadVideoMattingModel)({
|
|
12
12
|
model,
|
|
13
13
|
onProgress: (progress) => onProgress(progress.progress),
|
|
14
14
|
}), []);
|
|
@@ -7,8 +7,8 @@ const video_matting_1 = require("@remotion/video-matting");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
9
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
10
|
+
const gear_1 = require("../../icons/gear");
|
|
10
11
|
const models_1 = require("../../icons/models");
|
|
11
|
-
const separation_1 = require("../../icons/separation");
|
|
12
12
|
const modals_1 = require("../../state/modals");
|
|
13
13
|
const sidebar_1 = require("../../state/sidebar");
|
|
14
14
|
const Button_1 = require("../Button");
|
|
@@ -61,9 +61,9 @@ const makeOptions = ({ items, selected, setSelected, }) => items.map(({ id, labe
|
|
|
61
61
|
disabled: false,
|
|
62
62
|
onClick: () => setSelected(id),
|
|
63
63
|
}));
|
|
64
|
-
const VideoMattingModal = ({ displayName, src, }) => {
|
|
65
|
-
var _a
|
|
66
|
-
const [tab, setTab] = (0, react_1.useState)('
|
|
64
|
+
const VideoMattingModal = ({ displayName, src, target, }) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const [tab, setTab] = (0, react_1.useState)('remove');
|
|
67
67
|
const isModelCached = (0, react_1.useCallback)((selectedModel) => (0, video_matting_1.isVideoMattingModelCached)({ model: selectedModel }), []);
|
|
68
68
|
const cachedModels = (0, use_model_cache_status_1.useModelCacheStatus)({
|
|
69
69
|
isModelCached,
|
|
@@ -71,10 +71,9 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
71
71
|
refreshKey: tab,
|
|
72
72
|
});
|
|
73
73
|
const baseName = (0, react_1.useMemo)(() => (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video'), [displayName, src]);
|
|
74
|
-
const [
|
|
75
|
-
const [
|
|
76
|
-
const [
|
|
77
|
-
const [audio, setAudio] = (0, react_1.useState)('base');
|
|
74
|
+
const [outName, setOutName] = (0, react_1.useState)(`${baseName}-no-background.webm`);
|
|
75
|
+
const [model, setModel] = (0, react_1.useState)('modnet');
|
|
76
|
+
const [audio, setAudio] = (0, react_1.useState)('keep');
|
|
78
77
|
const [videoBitrate, setVideoBitrate] = (0, react_1.useState)('very-high');
|
|
79
78
|
const [support, setSupport] = (0, react_1.useState)({ type: 'checking' });
|
|
80
79
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
@@ -95,31 +94,18 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
95
94
|
cancelled = true;
|
|
96
95
|
};
|
|
97
96
|
}, [model]);
|
|
98
|
-
const
|
|
99
|
-
const normalizedForeground = foregroundOutName.normalize('NFC').toLowerCase();
|
|
100
|
-
const duplicateOutput = normalizedBase === normalizedForeground;
|
|
97
|
+
const normalizedOutput = outName.normalize('NFC').toLowerCase();
|
|
101
98
|
const queuedOutputs = new Set(videoMattingJobs
|
|
102
|
-
.filter((job) => job.status === 'idle' ||
|
|
103
|
-
.
|
|
99
|
+
.filter((job) => job.status === 'idle' ||
|
|
100
|
+
job.status === 'running' ||
|
|
101
|
+
job.status === 'saving')
|
|
102
|
+
.map((job) => job.outName)
|
|
104
103
|
.map((name) => name.normalize('NFC').toLowerCase()));
|
|
105
|
-
const
|
|
106
|
-
? '
|
|
107
|
-
:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const foregroundError = (_b = (0, public_output_name_1.validatePublicOutputName)({
|
|
111
|
-
extension: '.webm',
|
|
112
|
-
outName: foregroundOutName,
|
|
113
|
-
})) !== null && _b !== void 0 ? _b : (duplicateOutput
|
|
114
|
-
? 'Base and foreground outputs must be different'
|
|
115
|
-
: queuedOutputs.has(normalizedForeground)
|
|
116
|
-
? 'Another video matting job is using this output file'
|
|
117
|
-
: null);
|
|
118
|
-
const baseExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedBase);
|
|
119
|
-
const foregroundExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedForeground);
|
|
120
|
-
const canSubmit = support.type === 'supported' &&
|
|
121
|
-
baseError === null &&
|
|
122
|
-
foregroundError === null;
|
|
104
|
+
const outputError = (_a = (0, public_output_name_1.validatePublicOutputName)({ extension: '.webm', outName })) !== null && _a !== void 0 ? _a : (queuedOutputs.has(normalizedOutput)
|
|
105
|
+
? 'Another background removal job is using this output file'
|
|
106
|
+
: null);
|
|
107
|
+
const outputExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutput);
|
|
108
|
+
const canSubmit = support.type === 'supported' && outputError === null;
|
|
123
109
|
const modelOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
124
110
|
items: MODELS.map((item) => ({
|
|
125
111
|
id: item.name,
|
|
@@ -130,9 +116,7 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
130
116
|
}), [cachedModels, model]);
|
|
131
117
|
const audioOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
132
118
|
items: [
|
|
133
|
-
{ id: '
|
|
134
|
-
{ id: 'foreground', label: 'Foreground layer' },
|
|
135
|
-
{ id: 'both', label: 'Both layers' },
|
|
119
|
+
{ id: 'keep', label: 'Keep original audio' },
|
|
136
120
|
{ id: 'none', label: 'No audio' },
|
|
137
121
|
],
|
|
138
122
|
selected: audio,
|
|
@@ -156,11 +140,11 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
156
140
|
addVideoMattingJob({
|
|
157
141
|
src,
|
|
158
142
|
displayName,
|
|
159
|
-
|
|
160
|
-
foregroundOutName,
|
|
143
|
+
outName,
|
|
161
144
|
model,
|
|
162
145
|
audio,
|
|
163
146
|
videoBitrate,
|
|
147
|
+
target,
|
|
164
148
|
});
|
|
165
149
|
setSidebarCollapsedState({ left: null, right: 'expanded' });
|
|
166
150
|
(0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
|
|
@@ -169,31 +153,30 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
169
153
|
}, [
|
|
170
154
|
addVideoMattingJob,
|
|
171
155
|
audio,
|
|
172
|
-
baseOutName,
|
|
173
156
|
canSubmit,
|
|
174
157
|
displayName,
|
|
175
|
-
|
|
158
|
+
outName,
|
|
176
159
|
model,
|
|
177
160
|
setSelectedModal,
|
|
178
161
|
setSidebarCollapsedState,
|
|
179
162
|
src,
|
|
163
|
+
target,
|
|
180
164
|
videoBitrate,
|
|
181
165
|
]);
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
const title = `Remove background from ${displayName}`;
|
|
167
|
+
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: modalStyle, children: [
|
|
168
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
184
169
|
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSubmit, onClick: submit, title: support.type === 'unsupported' ? support.message : undefined, style: {
|
|
185
170
|
...render_modals_1.buttonStyle,
|
|
186
171
|
backgroundColor: canSubmit
|
|
187
172
|
? render_modals_1.buttonStyle.backgroundColor
|
|
188
173
|
: colors_1.BLUE_DISABLED,
|
|
189
|
-
}, children: "
|
|
174
|
+
}, children: "Remove background" })
|
|
190
175
|
] }), jsx_runtime_1.jsxs("div", { style: modalLayout, children: [
|
|
191
|
-
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('
|
|
192
|
-
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "
|
|
193
|
-
? `${window.remotion_publicFolderExists}/${
|
|
194
|
-
: null, existence:
|
|
195
|
-
? `${window.remotion_publicFolderExists}/${foregroundOutName}`
|
|
196
|
-
: null, existence: foregroundExists, inputStyle: layout_1.input, label: "Foreground output in public/", onValueChange: (event) => setForegroundOutName(event.target.value), outName: foregroundOutName, validationMessage: foregroundError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
176
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('remove'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'remove', style: render_modals_1.horizontalTab, children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'models', style: render_modals_1.horizontalTab, children: "Models" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'remove' ? panelStyle : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
177
|
+
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "Video output file", existingOutputPath: window.remotion_publicFolderExists
|
|
178
|
+
? `${window.remotion_publicFolderExists}/${outName}`
|
|
179
|
+
: null, existence: outputExists, inputStyle: layout_1.input, label: "Output in public/", onValueChange: (event) => setOutName(event.target.value), outName: outName, validationMessage: outputError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
197
180
|
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Model" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: model, title: "Model", style: controlStyle }) })
|
|
198
181
|
] }), support.type === 'unsupported' ? (jsx_runtime_1.jsx("div", { style: validationStyle, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: support.message, type: "error" }) })) : null, jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
199
182
|
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Audio" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioOptions, selectedId: audio, title: "Audio", style: controlStyle }) })
|
|
@@ -42,5 +42,5 @@ const LazyVideoMattingModal = react_1.default.lazy(async () => {
|
|
|
42
42
|
const { VideoMattingModal } = await Promise.resolve().then(() => __importStar(require('./VideoMattingModal')));
|
|
43
43
|
return { default: VideoMattingModal };
|
|
44
44
|
});
|
|
45
|
-
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "
|
|
45
|
+
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package to remove background", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "Remove background", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyVideoMattingModal, { ...state }) }) }));
|
|
46
46
|
exports.VideoMattingModalWithOptionalPackage = VideoMattingModalWithOptionalPackage;
|