remotion 3.3.44 → 3.3.51
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/README.md +1 -1
- package/dist/{Clipper.js → cjs/Clipper.js} +2 -2
- package/dist/{Composition.js → cjs/Composition.js} +38 -38
- package/dist/{CompositionManager.d.ts → cjs/CompositionManager.d.ts} +1 -1
- package/dist/{CompositionManager.js → cjs/CompositionManager.js} +14 -4
- package/dist/{Folder.js → cjs/Folder.js} +6 -6
- package/dist/{IFrame.js → cjs/IFrame.js} +4 -4
- package/dist/{Img.js → cjs/Img.js} +9 -9
- package/dist/{Null.js → cjs/Null.js} +2 -2
- package/dist/{RemotionRoot.js → cjs/RemotionRoot.js} +13 -13
- package/dist/{Sequence.d.ts → cjs/Sequence.d.ts} +1 -0
- package/dist/{Sequence.js → cjs/Sequence.js} +15 -15
- package/dist/{Still.d.ts → cjs/Still.d.ts} +1 -1
- package/dist/{Still.js → cjs/Still.js} +2 -2
- package/dist/{audio → cjs/audio}/Audio.d.ts +2 -2
- package/dist/{audio → cjs/audio}/Audio.js +18 -18
- package/dist/{audio → cjs/audio}/AudioForDevelopment.d.ts +1 -1
- package/dist/{audio → cjs/audio}/AudioForDevelopment.js +22 -22
- package/dist/{audio → cjs/audio}/AudioForRendering.d.ts +1 -1
- package/dist/{audio → cjs/audio}/AudioForRendering.js +23 -23
- package/dist/cjs/audio/index.d.ts +2 -0
- package/dist/{audio → cjs/audio}/index.js +2 -2
- package/dist/{audio → cjs/audio}/props.d.ts +1 -1
- package/dist/{audio → cjs/audio}/shared-audio-tags.d.ts +1 -1
- package/dist/{audio → cjs/audio}/use-audio-frame.js +4 -4
- package/dist/{config → cjs/config}/input-props.js +3 -3
- package/dist/cjs/config.d.ts +285 -0
- package/dist/{delay-render.js → cjs/delay-render.js} +5 -5
- package/dist/{easing.js → cjs/easing.js} +2 -2
- package/dist/{freeze.js → cjs/freeze.js} +4 -4
- package/dist/{get-environment.js → cjs/get-environment.js} +2 -2
- package/dist/{index.d.ts → cjs/index.d.ts} +32 -31
- package/dist/{index.js → cjs/index.js} +45 -45
- package/dist/{internals.d.ts → cjs/internals.d.ts} +13 -15
- package/dist/cjs/internals.js +101 -0
- package/dist/{interpolate-colors.js → cjs/interpolate-colors.js} +2 -2
- package/dist/{loading-indicator.js → cjs/loading-indicator.js} +2 -2
- package/dist/{loop → cjs/loop}/index.d.ts +1 -1
- package/dist/{loop → cjs/loop}/index.js +6 -6
- package/dist/{multiple-versions-warning.js → cjs/multiple-versions-warning.js} +7 -7
- package/dist/{prefetch.js → cjs/prefetch.js} +6 -6
- package/dist/{random.js → cjs/random.js} +1 -0
- package/dist/{series → cjs/series}/index.d.ts +1 -1
- package/dist/{series → cjs/series}/index.js +6 -6
- package/dist/{setup-env-variables.js → cjs/setup-env-variables.js} +3 -3
- package/dist/{spring → cjs/spring}/index.d.ts +3 -3
- package/dist/{spring → cjs/spring}/index.js +12 -8
- package/dist/{spring → cjs/spring}/measure-spring.d.ts +1 -1
- package/dist/{spring → cjs/spring}/measure-spring.js +4 -4
- package/dist/cjs/test/Img.test.d.ts +1 -0
- package/dist/cjs/test/Img.test.js +25 -0
- package/dist/cjs/test/absolute-src.test.d.ts +1 -0
- package/dist/cjs/test/absolute-src.test.js +18 -0
- package/dist/cjs/test/audio-for-rendering.test.d.ts +1 -0
- package/dist/cjs/test/audio-for-rendering.test.js +88 -0
- package/dist/cjs/test/audio.test.d.ts +1 -0
- package/dist/cjs/test/audio.test.js +76 -0
- package/dist/cjs/test/bezier.test.d.ts +1 -0
- package/dist/cjs/test/bezier.test.js +52 -0
- package/dist/cjs/test/composition-rules.test.d.ts +1 -0
- package/dist/cjs/test/composition-rules.test.js +30 -0
- package/dist/cjs/test/composition-validation.test.d.ts +1 -0
- package/dist/cjs/test/composition-validation.test.js +99 -0
- package/dist/cjs/test/easing.test.d.ts +1 -0
- package/dist/cjs/test/easing.test.js +191 -0
- package/dist/cjs/test/expect-to-throw.d.ts +1 -0
- package/dist/cjs/test/expect-to-throw.js +15 -0
- package/dist/cjs/test/freeze.test.d.ts +1 -0
- package/dist/cjs/test/freeze.test.js +65 -0
- package/dist/cjs/test/get-asset-file-name.test.d.ts +1 -0
- package/dist/cjs/test/get-asset-file-name.test.js +14 -0
- package/dist/cjs/test/get-current-time.test.d.ts +1 -0
- package/dist/cjs/test/get-current-time.test.js +74 -0
- package/dist/cjs/test/input-props.test.d.ts +1 -0
- package/dist/cjs/test/input-props.test.js +31 -0
- package/dist/cjs/test/interpolate.test.d.ts +1 -0
- package/dist/cjs/test/interpolate.test.js +138 -0
- package/dist/cjs/test/interpolateColors.test.d.ts +1 -0
- package/dist/cjs/test/interpolateColors.test.js +63 -0
- package/dist/cjs/test/loop-validation.test.d.ts +1 -0
- package/dist/cjs/test/loop-validation.test.js +93 -0
- package/dist/cjs/test/measure-spring.test.d.ts +1 -0
- package/dist/cjs/test/measure-spring.test.js +45 -0
- package/dist/cjs/test/media-validation.test.d.ts +1 -0
- package/dist/cjs/test/media-validation.test.js +47 -0
- package/dist/cjs/test/nested-sequences.test.d.ts +1 -0
- package/dist/cjs/test/nested-sequences.test.js +132 -0
- package/dist/cjs/test/not-all-props-in-media-tags.test.d.ts +1 -0
- package/dist/cjs/test/not-all-props-in-media-tags.test.js +33 -0
- package/dist/cjs/test/random.test.d.ts +1 -0
- package/dist/cjs/test/random.test.js +60 -0
- package/dist/cjs/test/ready-manager.test.d.ts +1 -0
- package/dist/cjs/test/ready-manager.test.js +29 -0
- package/dist/cjs/test/render-hook.d.ts +23 -0
- package/dist/cjs/test/render-hook.js +27 -0
- package/dist/cjs/test/sequence-from-initial-offset.test.d.ts +4 -0
- package/dist/cjs/test/sequence-from-initial-offset.test.js +35 -0
- package/dist/cjs/test/sequence-validation.test.d.ts +1 -0
- package/dist/cjs/test/sequence-validation.test.js +47 -0
- package/dist/cjs/test/series.test.d.ts +1 -0
- package/dist/cjs/test/series.test.js +110 -0
- package/dist/cjs/test/spring.test.d.ts +1 -0
- package/dist/cjs/test/spring.test.js +38 -0
- package/dist/cjs/test/truthy.test.d.ts +1 -0
- package/dist/cjs/test/truthy.test.js +24 -0
- package/dist/cjs/test/use-audio-frame.test.d.ts +1 -0
- package/dist/cjs/test/use-audio-frame.test.js +78 -0
- package/dist/cjs/test/use-media-in-timeline.test.d.ts +1 -0
- package/dist/cjs/test/use-media-in-timeline.test.js +74 -0
- package/dist/cjs/test/use-media-tag-volume.test.d.ts +1 -0
- package/dist/cjs/test/use-media-tag-volume.test.js +49 -0
- package/dist/cjs/test/use-sync-volume-with-media-tag.test.d.ts +1 -0
- package/dist/cjs/test/use-sync-volume-with-media-tag.test.js +55 -0
- package/dist/cjs/test/validate-start-from-props.test.d.ts +1 -0
- package/dist/cjs/test/validate-start-from-props.test.js +39 -0
- package/dist/cjs/test/video.test.d.ts +1 -0
- package/dist/cjs/test/video.test.js +80 -0
- package/dist/cjs/test/volume-prop.test.d.ts +1 -0
- package/dist/cjs/test/volume-prop.test.js +95 -0
- package/dist/cjs/test/wrap-sequence-context.d.ts +6 -0
- package/dist/cjs/test/wrap-sequence-context.js +41 -0
- package/dist/{use-current-frame.js → cjs/use-current-frame.js} +6 -6
- package/dist/{use-lazy-component.d.ts → cjs/use-lazy-component.d.ts} +1 -1
- package/dist/{use-media-in-timeline.d.ts → cjs/use-media-in-timeline.d.ts} +1 -1
- package/dist/{use-media-in-timeline.js → cjs/use-media-in-timeline.js} +21 -21
- package/dist/{use-media-playback.js → cjs/use-media-playback.js} +16 -16
- package/dist/{use-sync-volume-with-media-tag.d.ts → cjs/use-sync-volume-with-media-tag.d.ts} +1 -1
- package/dist/{use-sync-volume-with-media-tag.js → cjs/use-sync-volume-with-media-tag.js} +4 -4
- package/dist/{use-unsafe-video-config.d.ts → cjs/use-unsafe-video-config.d.ts} +1 -1
- package/dist/{use-unsafe-video-config.js → cjs/use-unsafe-video-config.js} +4 -4
- package/dist/{use-video-config.d.ts → cjs/use-video-config.d.ts} +1 -1
- package/dist/{use-video-config.js → cjs/use-video-config.js} +6 -6
- package/dist/{use-video.js → cjs/use-video.js} +2 -2
- package/dist/cjs/validate-frame.d.ts +1 -0
- package/dist/cjs/validate-frame.js +24 -0
- package/dist/{validate-media-props.d.ts → cjs/validate-media-props.d.ts} +1 -1
- package/dist/cjs/version.d.ts +1 -0
- package/dist/{version.js → cjs/version.js} +1 -1
- package/dist/{video → cjs/video}/OffthreadVideo.d.ts +1 -1
- package/dist/cjs/video/OffthreadVideo.js +33 -0
- package/dist/{video → cjs/video}/OffthreadVideoForRendering.d.ts +1 -1
- package/dist/{video → cjs/video}/OffthreadVideoForRendering.js +28 -28
- package/dist/{video → cjs/video}/Video.d.ts +2 -2
- package/dist/{video → cjs/video}/Video.js +16 -16
- package/dist/{video → cjs/video}/VideoForDevelopment.d.ts +1 -1
- package/dist/{video → cjs/video}/VideoForDevelopment.js +22 -22
- package/dist/{video → cjs/video}/VideoForRendering.d.ts +1 -1
- package/dist/{video → cjs/video}/VideoForRendering.js +40 -40
- package/dist/{video → cjs/video}/get-current-time.js +2 -2
- package/dist/{video → cjs/video}/index.d.ts +3 -3
- package/dist/{video → cjs/video}/index.js +4 -4
- package/dist/{video → cjs/video}/props.d.ts +1 -1
- package/dist/cjs/wrap-remotion-context.d.ts +18 -0
- package/dist/{wrap-remotion-context.js → cjs/wrap-remotion-context.js} +16 -16
- package/dist/esm/AbsoluteFill.d.ts +6 -0
- package/dist/esm/AbsoluteFill.js +25 -0
- package/dist/esm/CanUseRemotionHooks.d.ts +5 -0
- package/dist/esm/CanUseRemotionHooks.js +6 -0
- package/dist/esm/Clipper.d.ts +7 -0
- package/dist/esm/Clipper.js +20 -0
- package/dist/esm/Composition.d.ts +23 -0
- package/dist/esm/Composition.js +108 -0
- package/dist/esm/CompositionManager.d.ts +82 -0
- package/dist/esm/CompositionManager.js +137 -0
- package/dist/esm/Folder.d.ts +15 -0
- package/dist/esm/Folder.js +29 -0
- package/dist/esm/IFrame.d.ts +2 -0
- package/dist/esm/IFrame.js +21 -0
- package/dist/esm/Img.d.ts +2 -0
- package/dist/esm/Img.js +49 -0
- package/dist/esm/NativeLayers.d.ts +13 -0
- package/dist/esm/NativeLayers.js +25 -0
- package/dist/esm/Null.d.ts +2 -0
- package/dist/esm/Null.js +21 -0
- package/dist/esm/RemotionRoot.d.ts +5 -0
- package/dist/esm/RemotionRoot.js +69 -0
- package/dist/esm/Sequence.d.ts +29 -0
- package/dist/esm/Sequence.js +128 -0
- package/dist/esm/Still.d.ts +3 -0
- package/dist/esm/Still.js +5 -0
- package/dist/esm/absolute-src.d.ts +1 -0
- package/dist/esm/absolute-src.js +3 -0
- package/dist/esm/asset-types.d.ts +50 -0
- package/dist/esm/asset-types.js +1 -0
- package/dist/esm/audio/Audio.d.ts +8 -0
- package/dist/esm/audio/Audio.js +49 -0
- package/dist/esm/audio/AudioForDevelopment.d.ts +11 -0
- package/dist/esm/audio/AudioForDevelopment.js +91 -0
- package/dist/esm/audio/AudioForRendering.d.ts +10 -0
- package/dist/esm/audio/AudioForRendering.js +108 -0
- package/dist/esm/audio/index.d.ts +2 -0
- package/dist/esm/audio/index.js +2 -0
- package/dist/esm/audio/props.d.ts +12 -0
- package/dist/esm/audio/props.js +1 -0
- package/dist/esm/audio/shared-audio-tags.d.ts +37 -0
- package/dist/esm/audio/shared-audio-tags.js +194 -0
- package/dist/esm/audio/use-audio-frame.d.ts +6 -0
- package/dist/esm/audio/use-audio-frame.js +18 -0
- package/dist/esm/bezier.d.ts +1 -0
- package/dist/esm/bezier.js +110 -0
- package/dist/esm/cancel-render.d.ts +1 -0
- package/dist/esm/cancel-render.js +39 -0
- package/dist/esm/config/input-props.d.ts +1 -0
- package/dist/esm/config/input-props.js +27 -0
- package/dist/esm/config.d.ts +285 -0
- package/dist/esm/config.js +17 -0
- package/dist/esm/default-css.d.ts +3 -0
- package/dist/esm/default-css.js +44 -0
- package/dist/esm/delay-render.d.ts +14 -0
- package/dist/esm/delay-render.js +72 -0
- package/dist/esm/easing.d.ts +19 -0
- package/dist/esm/easing.js +73 -0
- package/dist/esm/freeze.d.ts +7 -0
- package/dist/esm/freeze.js +30 -0
- package/dist/esm/get-asset-file-name.d.ts +1 -0
- package/dist/esm/get-asset-file-name.js +10 -0
- package/dist/esm/get-environment.d.ts +3 -0
- package/dist/esm/get-environment.js +29 -0
- package/dist/esm/get-preview-dom-element.d.ts +1 -0
- package/dist/esm/get-preview-dom-element.js +3 -0
- package/dist/esm/get-static-files.d.ts +17 -0
- package/dist/esm/get-static-files.js +27 -0
- package/dist/esm/get-timeline-clip-name.d.ts +1 -0
- package/dist/esm/get-timeline-clip-name.js +21 -0
- package/dist/esm/index.d.ts +92 -0
- package/dist/esm/index.js +41 -0
- package/dist/esm/internals.d.ts +99 -0
- package/dist/esm/internals.js +75 -0
- package/dist/esm/interpolate-colors.d.ts +5 -0
- package/dist/esm/interpolate-colors.js +397 -0
- package/dist/esm/interpolate.d.ts +18 -0
- package/dist/esm/interpolate.js +119 -0
- package/dist/esm/is-approximately-the-same.d.ts +1 -0
- package/dist/esm/is-approximately-the-same.js +4 -0
- package/dist/esm/is-player.d.ts +3 -0
- package/dist/esm/is-player.js +9 -0
- package/dist/esm/loading-indicator.d.ts +2 -0
- package/dist/esm/loading-indicator.js +31 -0
- package/dist/esm/loop/index.d.ts +9 -0
- package/dist/esm/loop/index.js +25 -0
- package/dist/esm/multiple-versions-warning.d.ts +1 -0
- package/dist/esm/multiple-versions-warning.js +28 -0
- package/dist/esm/nonce.d.ts +7 -0
- package/dist/esm/nonce.js +13 -0
- package/dist/esm/play-and-handle-not-allowed-error.d.ts +2 -0
- package/dist/esm/play-and-handle-not-allowed-error.js +40 -0
- package/dist/esm/portal-node.d.ts +1 -0
- package/dist/esm/portal-node.js +19 -0
- package/dist/esm/prefetch-state.d.ts +8 -0
- package/dist/esm/prefetch-state.js +22 -0
- package/dist/esm/prefetch.d.ts +9 -0
- package/dist/esm/prefetch.js +103 -0
- package/dist/esm/random.d.ts +7 -0
- package/dist/esm/random.js +38 -0
- package/dist/esm/register-root.d.ts +4 -0
- package/dist/esm/register-root.js +27 -0
- package/dist/esm/series/flatten-children.d.ts +2 -0
- package/dist/esm/series/flatten-children.js +12 -0
- package/dist/esm/series/index.d.ts +13 -0
- package/dist/esm/series/index.js +54 -0
- package/dist/esm/setup-env-variables.d.ts +2 -0
- package/dist/esm/setup-env-variables.js +32 -0
- package/dist/esm/spring/index.d.ts +27 -0
- package/dist/esm/spring/index.js +50 -0
- package/dist/esm/spring/measure-spring.d.ts +8 -0
- package/dist/esm/spring/measure-spring.js +60 -0
- package/dist/esm/spring/spring-utils.d.ts +21 -0
- package/dist/esm/spring/spring-utils.js +99 -0
- package/dist/esm/static-file.d.ts +5 -0
- package/dist/esm/static-file.js +29 -0
- package/dist/esm/test/Img.test.d.ts +1 -0
- package/dist/esm/test/Img.test.js +20 -0
- package/dist/esm/test/absolute-src.test.d.ts +1 -0
- package/dist/esm/test/absolute-src.test.js +16 -0
- package/dist/esm/test/audio-for-rendering.test.d.ts +1 -0
- package/dist/esm/test/audio-for-rendering.test.js +83 -0
- package/dist/esm/test/audio.test.d.ts +1 -0
- package/dist/esm/test/audio.test.js +51 -0
- package/dist/esm/test/bezier.test.d.ts +1 -0
- package/dist/esm/test/bezier.test.js +50 -0
- package/dist/esm/test/composition-rules.test.d.ts +1 -0
- package/dist/esm/test/composition-rules.test.js +28 -0
- package/dist/esm/test/composition-validation.test.d.ts +1 -0
- package/dist/esm/test/composition-validation.test.js +97 -0
- package/dist/esm/test/easing.test.d.ts +1 -0
- package/dist/esm/test/easing.test.js +189 -0
- package/dist/esm/test/expect-to-throw.d.ts +1 -0
- package/dist/esm/test/expect-to-throw.js +11 -0
- package/dist/esm/test/freeze.test.d.ts +1 -0
- package/dist/esm/test/freeze.test.js +63 -0
- package/dist/esm/test/get-asset-file-name.test.d.ts +1 -0
- package/dist/esm/test/get-asset-file-name.test.js +12 -0
- package/dist/esm/test/get-current-time.test.d.ts +1 -0
- package/dist/esm/test/get-current-time.test.js +72 -0
- package/dist/esm/test/input-props.test.d.ts +1 -0
- package/dist/esm/test/input-props.test.js +29 -0
- package/dist/esm/test/interpolate.test.d.ts +1 -0
- package/dist/esm/test/interpolate.test.js +136 -0
- package/dist/esm/test/interpolateColors.test.d.ts +1 -0
- package/dist/esm/test/interpolateColors.test.js +61 -0
- package/dist/esm/test/loop-validation.test.d.ts +1 -0
- package/dist/esm/test/loop-validation.test.js +68 -0
- package/dist/esm/test/measure-spring.test.d.ts +1 -0
- package/dist/esm/test/measure-spring.test.js +43 -0
- package/dist/esm/test/media-validation.test.d.ts +1 -0
- package/dist/esm/test/media-validation.test.js +45 -0
- package/dist/esm/test/nested-sequences.test.d.ts +1 -0
- package/dist/esm/test/nested-sequences.test.js +130 -0
- package/dist/esm/test/not-all-props-in-media-tags.test.d.ts +1 -0
- package/dist/esm/test/not-all-props-in-media-tags.test.js +28 -0
- package/dist/esm/test/random.test.d.ts +1 -0
- package/dist/esm/test/random.test.js +58 -0
- package/dist/esm/test/ready-manager.test.d.ts +1 -0
- package/dist/esm/test/ready-manager.test.js +27 -0
- package/dist/esm/test/render-hook.d.ts +23 -0
- package/dist/esm/test/render-hook.js +20 -0
- package/dist/esm/test/sequence-from-initial-offset.test.d.ts +4 -0
- package/dist/esm/test/sequence-from-initial-offset.test.js +33 -0
- package/dist/esm/test/sequence-validation.test.d.ts +1 -0
- package/dist/esm/test/sequence-validation.test.js +45 -0
- package/dist/esm/test/series.test.d.ts +1 -0
- package/dist/esm/test/series.test.js +108 -0
- package/dist/esm/test/spring.test.d.ts +1 -0
- package/dist/esm/test/spring.test.js +36 -0
- package/dist/esm/test/truthy.test.d.ts +1 -0
- package/dist/esm/test/truthy.test.js +22 -0
- package/dist/esm/test/use-audio-frame.test.d.ts +1 -0
- package/dist/esm/test/use-audio-frame.test.js +53 -0
- package/dist/esm/test/use-media-in-timeline.test.d.ts +1 -0
- package/dist/esm/test/use-media-in-timeline.test.js +49 -0
- package/dist/esm/test/use-media-tag-volume.test.d.ts +1 -0
- package/dist/esm/test/use-media-tag-volume.test.js +44 -0
- package/dist/esm/test/use-sync-volume-with-media-tag.test.d.ts +1 -0
- package/dist/esm/test/use-sync-volume-with-media-tag.test.js +53 -0
- package/dist/esm/test/validate-start-from-props.test.d.ts +1 -0
- package/dist/esm/test/validate-start-from-props.test.js +37 -0
- package/dist/esm/test/video.test.d.ts +1 -0
- package/dist/esm/test/video.test.js +55 -0
- package/dist/esm/test/volume-prop.test.d.ts +1 -0
- package/dist/esm/test/volume-prop.test.js +93 -0
- package/dist/esm/test/wrap-sequence-context.d.ts +6 -0
- package/dist/esm/test/wrap-sequence-context.js +37 -0
- package/dist/esm/timeline-position-state.d.ts +29 -0
- package/dist/esm/timeline-position-state.js +35 -0
- package/dist/esm/truthy.d.ts +3 -0
- package/dist/esm/truthy.js +3 -0
- package/dist/esm/use-current-frame.d.ts +6 -0
- package/dist/esm/use-current-frame.js +24 -0
- package/dist/esm/use-lazy-component.d.ts +7 -0
- package/dist/esm/use-lazy-component.js +22 -0
- package/dist/esm/use-media-in-timeline.d.ts +10 -0
- package/dist/esm/use-media-in-timeline.js +125 -0
- package/dist/esm/use-media-playback.d.ts +10 -0
- package/dist/esm/use-media-playback.js +73 -0
- package/dist/esm/use-media-tag-volume.d.ts +2 -0
- package/dist/esm/use-media-tag-volume.js +27 -0
- package/dist/esm/use-sync-volume-with-media-tag.d.ts +10 -0
- package/dist/esm/use-sync-volume-with-media-tag.js +17 -0
- package/dist/esm/use-unsafe-video-config.d.ts +2 -0
- package/dist/esm/use-unsafe-video-config.js +23 -0
- package/dist/esm/use-video-config.d.ts +7 -0
- package/dist/esm/use-video-config.js +25 -0
- package/dist/esm/use-video.d.ts +13 -0
- package/dist/esm/use-video.js +24 -0
- package/dist/esm/validate-frame.d.ts +1 -0
- package/dist/esm/validate-frame.js +20 -0
- package/dist/esm/validate-media-props.d.ts +4 -0
- package/dist/esm/validate-media-props.js +20 -0
- package/dist/esm/validate-start-from-props.d.ts +1 -0
- package/dist/esm/validate-start-from-props.js +27 -0
- package/dist/esm/validation/validate-composition-id.d.ts +3 -0
- package/dist/esm/validation/validate-composition-id.js +8 -0
- package/dist/esm/validation/validate-dimensions.d.ts +1 -0
- package/dist/esm/validation/validate-dimensions.js +17 -0
- package/dist/esm/validation/validate-duration-in-frames.d.ts +1 -0
- package/dist/esm/validation/validate-duration-in-frames.js +11 -0
- package/dist/esm/validation/validate-folder-name.d.ts +3 -0
- package/dist/esm/validation/validate-folder-name.js +14 -0
- package/dist/esm/validation/validate-fps.d.ts +1 -0
- package/dist/esm/validation/validate-fps.js +17 -0
- package/dist/esm/validation/validate-offthreadvideo-image-format.d.ts +1 -0
- package/dist/esm/validation/validate-offthreadvideo-image-format.js +11 -0
- package/dist/esm/validation/validation-spring-duration.d.ts +1 -0
- package/dist/esm/validation/validation-spring-duration.js +17 -0
- package/dist/esm/version.d.ts +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/video/OffthreadVideo.d.ts +3 -0
- package/dist/esm/video/OffthreadVideo.js +29 -0
- package/dist/esm/video/OffthreadVideoForRendering.d.ts +3 -0
- package/dist/esm/video/OffthreadVideoForRendering.js +100 -0
- package/dist/esm/video/Video.d.ts +8 -0
- package/dist/esm/video/Video.js +47 -0
- package/dist/esm/video/VideoForDevelopment.d.ts +11 -0
- package/dist/esm/video/VideoForDevelopment.js +110 -0
- package/dist/esm/video/VideoForRendering.d.ts +10 -0
- package/dist/esm/video/VideoForRendering.js +200 -0
- package/dist/esm/video/duration-state.d.ts +17 -0
- package/dist/esm/video/duration-state.js +29 -0
- package/dist/esm/video/get-current-time.d.ts +13 -0
- package/dist/esm/video/get-current-time.js +26 -0
- package/dist/esm/video/index.d.ts +3 -0
- package/dist/esm/video/index.js +2 -0
- package/dist/esm/video/props.d.ts +25 -0
- package/dist/esm/video/props.js +1 -0
- package/dist/esm/video/video-fragment.d.ts +12 -0
- package/dist/esm/video/video-fragment.js +55 -0
- package/dist/esm/video-config.d.ts +8 -0
- package/dist/esm/video-config.js +1 -0
- package/dist/esm/volume-position-state.d.ts +19 -0
- package/dist/esm/volume-position-state.js +27 -0
- package/dist/esm/volume-prop.d.ts +7 -0
- package/dist/esm/volume-prop.js +20 -0
- package/dist/esm/warn-about-non-seekable-media.d.ts +1 -0
- package/dist/esm/warn-about-non-seekable-media.js +30 -0
- package/dist/esm/wrap-remotion-context.d.ts +18 -0
- package/dist/esm/wrap-remotion-context.js +45 -0
- package/dist/tsconfig-cjs.tsbuildinfo +1 -0
- package/package.json +22 -11
- package/tsconfig-cjs.json +11 -0
- package/tsconfig.json +3 -3
- package/dist/LayerMaster.d.ts +0 -8
- package/dist/LayerMaster.js +0 -39
- package/dist/Satori.d.ts +0 -5
- package/dist/Satori.js +0 -92
- package/dist/audio/index.d.ts +0 -2
- package/dist/config.d.ts +0 -291
- package/dist/get-compositions-from-markup.d.ts +0 -3
- package/dist/get-compositions-from-markup.js +0 -19
- package/dist/internals.js +0 -99
- package/dist/layers.d.ts +0 -24
- package/dist/layers.js +0 -149
- package/dist/version.d.ts +0 -1
- package/dist/video/NativeVideo.d.ts +0 -5
- package/dist/video/NativeVideo.js +0 -33
- package/dist/video/NativeVideoForRendering.d.ts +0 -8
- package/dist/video/NativeVideoForRendering.js +0 -14
- package/dist/video/OffthreadVideo.js +0 -33
- package/dist/wrap-remotion-context.d.ts +0 -18
- /package/dist/{AbsoluteFill.d.ts → cjs/AbsoluteFill.d.ts} +0 -0
- /package/dist/{AbsoluteFill.js → cjs/AbsoluteFill.js} +0 -0
- /package/dist/{CanUseRemotionHooks.d.ts → cjs/CanUseRemotionHooks.d.ts} +0 -0
- /package/dist/{CanUseRemotionHooks.js → cjs/CanUseRemotionHooks.js} +0 -0
- /package/dist/{Clipper.d.ts → cjs/Clipper.d.ts} +0 -0
- /package/dist/{Composition.d.ts → cjs/Composition.d.ts} +0 -0
- /package/dist/{Folder.d.ts → cjs/Folder.d.ts} +0 -0
- /package/dist/{IFrame.d.ts → cjs/IFrame.d.ts} +0 -0
- /package/dist/{Img.d.ts → cjs/Img.d.ts} +0 -0
- /package/dist/{NativeLayers.d.ts → cjs/NativeLayers.d.ts} +0 -0
- /package/dist/{NativeLayers.js → cjs/NativeLayers.js} +0 -0
- /package/dist/{Null.d.ts → cjs/Null.d.ts} +0 -0
- /package/dist/{RemotionRoot.d.ts → cjs/RemotionRoot.d.ts} +0 -0
- /package/dist/{absolute-src.d.ts → cjs/absolute-src.d.ts} +0 -0
- /package/dist/{absolute-src.js → cjs/absolute-src.js} +0 -0
- /package/dist/{asset-types.d.ts → cjs/asset-types.d.ts} +0 -0
- /package/dist/{asset-types.js → cjs/asset-types.js} +0 -0
- /package/dist/{audio → cjs/audio}/props.js +0 -0
- /package/dist/{audio → cjs/audio}/shared-audio-tags.js +0 -0
- /package/dist/{audio → cjs/audio}/use-audio-frame.d.ts +0 -0
- /package/dist/{bezier.d.ts → cjs/bezier.d.ts} +0 -0
- /package/dist/{bezier.js → cjs/bezier.js} +0 -0
- /package/dist/{cancel-render.d.ts → cjs/cancel-render.d.ts} +0 -0
- /package/dist/{cancel-render.js → cjs/cancel-render.js} +0 -0
- /package/dist/{config → cjs/config}/input-props.d.ts +0 -0
- /package/dist/{config.js → cjs/config.js} +0 -0
- /package/dist/{default-css.d.ts → cjs/default-css.d.ts} +0 -0
- /package/dist/{default-css.js → cjs/default-css.js} +0 -0
- /package/dist/{delay-render.d.ts → cjs/delay-render.d.ts} +0 -0
- /package/dist/{easing.d.ts → cjs/easing.d.ts} +0 -0
- /package/dist/{freeze.d.ts → cjs/freeze.d.ts} +0 -0
- /package/dist/{get-asset-file-name.d.ts → cjs/get-asset-file-name.d.ts} +0 -0
- /package/dist/{get-asset-file-name.js → cjs/get-asset-file-name.js} +0 -0
- /package/dist/{get-environment.d.ts → cjs/get-environment.d.ts} +0 -0
- /package/dist/{get-preview-dom-element.d.ts → cjs/get-preview-dom-element.d.ts} +0 -0
- /package/dist/{get-preview-dom-element.js → cjs/get-preview-dom-element.js} +0 -0
- /package/dist/{get-static-files.d.ts → cjs/get-static-files.d.ts} +0 -0
- /package/dist/{get-static-files.js → cjs/get-static-files.js} +0 -0
- /package/dist/{get-timeline-clip-name.d.ts → cjs/get-timeline-clip-name.d.ts} +0 -0
- /package/dist/{get-timeline-clip-name.js → cjs/get-timeline-clip-name.js} +0 -0
- /package/dist/{interpolate-colors.d.ts → cjs/interpolate-colors.d.ts} +0 -0
- /package/dist/{interpolate.d.ts → cjs/interpolate.d.ts} +0 -0
- /package/dist/{interpolate.js → cjs/interpolate.js} +0 -0
- /package/dist/{is-approximately-the-same.d.ts → cjs/is-approximately-the-same.d.ts} +0 -0
- /package/dist/{is-approximately-the-same.js → cjs/is-approximately-the-same.js} +0 -0
- /package/dist/{is-player.d.ts → cjs/is-player.d.ts} +0 -0
- /package/dist/{is-player.js → cjs/is-player.js} +0 -0
- /package/dist/{loading-indicator.d.ts → cjs/loading-indicator.d.ts} +0 -0
- /package/dist/{multiple-versions-warning.d.ts → cjs/multiple-versions-warning.d.ts} +0 -0
- /package/dist/{nonce.d.ts → cjs/nonce.d.ts} +0 -0
- /package/dist/{nonce.js → cjs/nonce.js} +0 -0
- /package/dist/{play-and-handle-not-allowed-error.d.ts → cjs/play-and-handle-not-allowed-error.d.ts} +0 -0
- /package/dist/{play-and-handle-not-allowed-error.js → cjs/play-and-handle-not-allowed-error.js} +0 -0
- /package/dist/{portal-node.d.ts → cjs/portal-node.d.ts} +0 -0
- /package/dist/{portal-node.js → cjs/portal-node.js} +0 -0
- /package/dist/{prefetch-state.d.ts → cjs/prefetch-state.d.ts} +0 -0
- /package/dist/{prefetch-state.js → cjs/prefetch-state.js} +0 -0
- /package/dist/{prefetch.d.ts → cjs/prefetch.d.ts} +0 -0
- /package/dist/{random.d.ts → cjs/random.d.ts} +0 -0
- /package/dist/{register-root.d.ts → cjs/register-root.d.ts} +0 -0
- /package/dist/{register-root.js → cjs/register-root.js} +0 -0
- /package/dist/{series → cjs/series}/flatten-children.d.ts +0 -0
- /package/dist/{series → cjs/series}/flatten-children.js +0 -0
- /package/dist/{setup-env-variables.d.ts → cjs/setup-env-variables.d.ts} +0 -0
- /package/dist/{spring → cjs/spring}/spring-utils.d.ts +0 -0
- /package/dist/{spring → cjs/spring}/spring-utils.js +0 -0
- /package/dist/{static-file.d.ts → cjs/static-file.d.ts} +0 -0
- /package/dist/{static-file.js → cjs/static-file.js} +0 -0
- /package/dist/{timeline-position-state.d.ts → cjs/timeline-position-state.d.ts} +0 -0
- /package/dist/{timeline-position-state.js → cjs/timeline-position-state.js} +0 -0
- /package/dist/{truthy.d.ts → cjs/truthy.d.ts} +0 -0
- /package/dist/{truthy.js → cjs/truthy.js} +0 -0
- /package/dist/{use-current-frame.d.ts → cjs/use-current-frame.d.ts} +0 -0
- /package/dist/{use-lazy-component.js → cjs/use-lazy-component.js} +0 -0
- /package/dist/{use-media-playback.d.ts → cjs/use-media-playback.d.ts} +0 -0
- /package/dist/{use-media-tag-volume.d.ts → cjs/use-media-tag-volume.d.ts} +0 -0
- /package/dist/{use-media-tag-volume.js → cjs/use-media-tag-volume.js} +0 -0
- /package/dist/{use-video.d.ts → cjs/use-video.d.ts} +0 -0
- /package/dist/{validate-media-props.js → cjs/validate-media-props.js} +0 -0
- /package/dist/{validate-start-from-props.d.ts → cjs/validate-start-from-props.d.ts} +0 -0
- /package/dist/{validate-start-from-props.js → cjs/validate-start-from-props.js} +0 -0
- /package/dist/{validation → cjs/validation}/validate-composition-id.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-composition-id.js +0 -0
- /package/dist/{validation → cjs/validation}/validate-dimensions.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-dimensions.js +0 -0
- /package/dist/{validation → cjs/validation}/validate-duration-in-frames.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-duration-in-frames.js +0 -0
- /package/dist/{validation → cjs/validation}/validate-folder-name.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-folder-name.js +0 -0
- /package/dist/{validation → cjs/validation}/validate-fps.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-fps.js +0 -0
- /package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validate-offthreadvideo-image-format.js +0 -0
- /package/dist/{validation → cjs/validation}/validation-spring-duration.d.ts +0 -0
- /package/dist/{validation → cjs/validation}/validation-spring-duration.js +0 -0
- /package/dist/{video → cjs/video}/duration-state.d.ts +0 -0
- /package/dist/{video → cjs/video}/duration-state.js +0 -0
- /package/dist/{video → cjs/video}/get-current-time.d.ts +0 -0
- /package/dist/{video → cjs/video}/props.js +0 -0
- /package/dist/{video → cjs/video}/video-fragment.d.ts +0 -0
- /package/dist/{video → cjs/video}/video-fragment.js +0 -0
- /package/dist/{video-config.d.ts → cjs/video-config.d.ts} +0 -0
- /package/dist/{video-config.js → cjs/video-config.js} +0 -0
- /package/dist/{volume-position-state.d.ts → cjs/volume-position-state.d.ts} +0 -0
- /package/dist/{volume-position-state.js → cjs/volume-position-state.js} +0 -0
- /package/dist/{volume-prop.d.ts → cjs/volume-prop.d.ts} +0 -0
- /package/dist/{volume-prop.js → cjs/volume-prop.js} +0 -0
- /package/dist/{warn-about-non-seekable-media.d.ts → cjs/warn-about-non-seekable-media.d.ts} +0 -0
- /package/dist/{warn-about-non-seekable-media.js → cjs/warn-about-non-seekable-media.js} +0 -0
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
[](https://remotion.dev/discord)
|
|
11
11
|
[](https://www.npmjs.org/package/remotion)
|
|
12
12
|
[](https://npmcharts.com/compare/remotion?minimal=true)
|
|
13
|
-
[](https://github.com/remotion-dev/remotion/issues?q=is%3Aopen+label%3A%22%F0%9F%92%8E+Bounty%22+sort%3Aupdated-desc)
|
|
13
|
+
[](https://github.com/remotion-dev/remotion/issues?q=is%3Aopen+label%3A%22%F0%9F%92%8E+Bounty%22+sort%3Aupdated-desc)
|
|
14
14
|
<a href="https://twitter.com/remotion"><img src="https://img.shields.io/twitter/follow/remotion?label=Twitter&color=black" alt="Twitter"></a>
|
|
15
15
|
|
|
16
16
|
Remotion is a framework for **creating videos programmatically using React.**
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Clipper = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
6
6
|
const Clipper = ({ height, width, x, y }) => {
|
|
7
|
-
const { setClipRegion } = (0, react_1.useContext)(
|
|
7
|
+
const { setClipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
|
|
8
8
|
(0, react_1.useEffect)(() => {
|
|
9
9
|
setClipRegion((c) => {
|
|
10
10
|
if (c === 'hide') {
|
|
@@ -4,38 +4,38 @@ exports.ClipComposition = exports.Composition = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const react_dom_1 = require("react-dom");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
7
|
+
const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
|
|
8
|
+
const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
9
|
+
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
10
|
+
const input_props_js_1 = require("./config/input-props.js");
|
|
11
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
12
|
+
const Folder_js_1 = require("./Folder.js");
|
|
13
|
+
const get_environment_js_1 = require("./get-environment.js");
|
|
14
|
+
const internals_js_1 = require("./internals.js");
|
|
15
|
+
const loading_indicator_js_1 = require("./loading-indicator.js");
|
|
16
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
17
|
+
const nonce_js_1 = require("./nonce.js");
|
|
18
|
+
const portal_node_js_1 = require("./portal-node.js");
|
|
19
|
+
const use_lazy_component_js_1 = require("./use-lazy-component.js");
|
|
20
|
+
const use_video_js_1 = require("./use-video.js");
|
|
21
|
+
const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
|
|
22
|
+
const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
|
|
23
|
+
const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
|
|
24
|
+
const validate_fps_js_1 = require("./validation/validate-fps.js");
|
|
25
25
|
const Fallback = () => {
|
|
26
26
|
(0, react_1.useEffect)(() => {
|
|
27
|
-
const fallback = (0,
|
|
28
|
-
return () => (0,
|
|
27
|
+
const fallback = (0, delay_render_js_1.delayRender)('Waiting for Root component to unsuspend');
|
|
28
|
+
return () => (0, delay_render_js_1.continueRender)(fallback);
|
|
29
29
|
}, []);
|
|
30
30
|
return null;
|
|
31
31
|
};
|
|
32
32
|
const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, ...compProps }) => {
|
|
33
|
-
const { registerComposition, unregisterComposition } = (0, react_1.useContext)(
|
|
34
|
-
const video = (0,
|
|
35
|
-
const lazy = (0,
|
|
36
|
-
const nonce = (0,
|
|
37
|
-
const environment = (0,
|
|
38
|
-
const canUseComposition = (0, react_1.useContext)(
|
|
33
|
+
const { registerComposition, unregisterComposition } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
|
|
34
|
+
const video = (0, use_video_js_1.useVideo)();
|
|
35
|
+
const lazy = (0, use_lazy_component_js_1.useLazyComponent)(compProps);
|
|
36
|
+
const nonce = (0, nonce_js_1.useNonce)();
|
|
37
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
38
|
+
const canUseComposition = (0, react_1.useContext)(internals_js_1.Internals.CanUseRemotionHooks);
|
|
39
39
|
if (canUseComposition) {
|
|
40
40
|
if (environment === 'player-development' ||
|
|
41
41
|
environment === 'player-production') {
|
|
@@ -43,17 +43,17 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
|
|
|
43
43
|
}
|
|
44
44
|
throw new Error('<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.');
|
|
45
45
|
}
|
|
46
|
-
const { folderName, parentName } = (0, react_1.useContext)(
|
|
46
|
+
const { folderName, parentName } = (0, react_1.useContext)(Folder_js_1.FolderContext);
|
|
47
47
|
(0, react_1.useEffect)(() => {
|
|
48
48
|
// Ensure it's a URL safe id
|
|
49
49
|
if (!id) {
|
|
50
50
|
throw new Error('No id for composition passed.');
|
|
51
51
|
}
|
|
52
|
-
(0,
|
|
53
|
-
(0,
|
|
54
|
-
(0,
|
|
55
|
-
(0,
|
|
56
|
-
(0,
|
|
52
|
+
(0, validate_composition_id_js_1.validateCompositionId)(id);
|
|
53
|
+
(0, validate_dimensions_js_1.validateDimension)(width, 'width', 'of the <Composition/> component');
|
|
54
|
+
(0, validate_dimensions_js_1.validateDimension)(height, 'height', 'of the <Composition/> component');
|
|
55
|
+
(0, validate_duration_in_frames_js_1.validateDurationInFrames)(durationInFrames, 'of the <Composition/> component');
|
|
56
|
+
(0, validate_fps_js_1.validateFps)(fps, 'as a prop of the <Composition/> component', false);
|
|
57
57
|
registerComposition({
|
|
58
58
|
durationInFrames,
|
|
59
59
|
fps,
|
|
@@ -85,19 +85,19 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, .
|
|
|
85
85
|
]);
|
|
86
86
|
if (environment === 'preview' && video && video.component === lazy) {
|
|
87
87
|
const Comp = lazy;
|
|
88
|
-
const inputProps = (0,
|
|
89
|
-
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.ClipComposition, { children: (0, jsx_runtime_1.jsx)(
|
|
88
|
+
const inputProps = (0, input_props_js_1.getInputProps)();
|
|
89
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(exports.ClipComposition, { children: (0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(loading_indicator_js_1.Loading, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }) }), (0, portal_node_js_1.portalNode)());
|
|
90
90
|
}
|
|
91
91
|
if (environment === 'rendering' && video && video.component === lazy) {
|
|
92
92
|
const Comp = lazy;
|
|
93
|
-
const inputProps = (0,
|
|
94
|
-
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(
|
|
93
|
+
const inputProps = (0, input_props_js_1.getInputProps)();
|
|
94
|
+
return (0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooksProvider, { children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}), children: (0, jsx_runtime_1.jsx)(Comp, { ...defaultProps, ...inputProps }) }) }), (0, portal_node_js_1.portalNode)());
|
|
95
95
|
}
|
|
96
96
|
return null;
|
|
97
97
|
};
|
|
98
98
|
exports.Composition = Composition;
|
|
99
99
|
const ClipComposition = ({ children }) => {
|
|
100
|
-
const { clipRegion } = (0, react_1.useContext)(
|
|
100
|
+
const { clipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
|
|
101
101
|
const style = (0, react_1.useMemo)(() => {
|
|
102
102
|
return {
|
|
103
103
|
display: 'flex',
|
|
@@ -108,6 +108,6 @@ const ClipComposition = ({ children }) => {
|
|
|
108
108
|
: undefined,
|
|
109
109
|
};
|
|
110
110
|
}, [clipRegion]);
|
|
111
|
-
return (0, jsx_runtime_1.jsx)(
|
|
111
|
+
return (0, jsx_runtime_1.jsx)(AbsoluteFill_js_1.AbsoluteFill, { style: style, children: children });
|
|
112
112
|
};
|
|
113
113
|
exports.ClipComposition = ClipComposition;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentType, LazyExoticComponent } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import type { TFolder } from './Folder';
|
|
3
|
+
import type { TFolder } from './Folder.js';
|
|
4
4
|
export declare type TComposition<T = unknown> = {
|
|
5
5
|
width: number;
|
|
6
6
|
height: number;
|
|
@@ -49,19 +49,29 @@ const CompositionManagerProvider = ({ children }) => {
|
|
|
49
49
|
// Wontfix, expected to have
|
|
50
50
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
51
51
|
const [compositions, setCompositions] = (0, react_1.useState)([]);
|
|
52
|
+
const currentcompositionsRef = (0, react_1.useRef)(compositions);
|
|
52
53
|
const [currentComposition, setCurrentComposition] = (0, react_1.useState)(null);
|
|
53
54
|
const [assets, setAssets] = (0, react_1.useState)([]);
|
|
54
55
|
const [folders, setFolders] = (0, react_1.useState)([]);
|
|
55
56
|
const [sequences, setSequences] = (0, react_1.useState)([]);
|
|
56
57
|
const [currentCompositionMetadata, setCurrentCompositionMetadata] = (0, react_1.useState)(null);
|
|
57
|
-
const
|
|
58
|
+
const updateCompositions = (0, react_1.useCallback)(
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
+
(updateComps) => {
|
|
58
61
|
setCompositions((comps) => {
|
|
62
|
+
const updated = updateComps(comps);
|
|
63
|
+
currentcompositionsRef.current = updated;
|
|
64
|
+
return updated;
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
const registerComposition = (0, react_1.useCallback)((comp) => {
|
|
68
|
+
updateCompositions((comps) => {
|
|
59
69
|
if (comps.find((c) => c.id === comp.id)) {
|
|
60
70
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
61
71
|
}
|
|
62
72
|
return [...comps, comp].slice().sort((a, b) => a.nonce - b.nonce);
|
|
63
73
|
});
|
|
64
|
-
}, []);
|
|
74
|
+
}, [updateCompositions]);
|
|
65
75
|
const registerSequence = (0, react_1.useCallback)((seq) => {
|
|
66
76
|
setSequences((seqs) => {
|
|
67
77
|
return [...seqs, seq];
|
|
@@ -111,9 +121,9 @@ const CompositionManagerProvider = ({ children }) => {
|
|
|
111
121
|
}, [assets]);
|
|
112
122
|
(0, react_1.useImperativeHandle)(exports.compositionsRef, () => {
|
|
113
123
|
return {
|
|
114
|
-
getCompositions: () =>
|
|
124
|
+
getCompositions: () => currentcompositionsRef.current,
|
|
115
125
|
};
|
|
116
|
-
}, [
|
|
126
|
+
}, []);
|
|
117
127
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
118
128
|
return {
|
|
119
129
|
compositions,
|
|
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Folder = exports.FolderContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
7
|
+
const truthy_js_1 = require("./truthy.js");
|
|
8
|
+
const validate_folder_name_js_1 = require("./validation/validate-folder-name.js");
|
|
9
9
|
exports.FolderContext = (0, react_1.createContext)({
|
|
10
10
|
folderName: null,
|
|
11
11
|
parentName: null,
|
|
12
12
|
});
|
|
13
13
|
const Folder = ({ name, children, }) => {
|
|
14
14
|
const parent = (0, react_1.useContext)(exports.FolderContext);
|
|
15
|
-
const { registerFolder, unregisterFolder } = (0, react_1.useContext)(
|
|
16
|
-
(0,
|
|
17
|
-
const parentNameArr = [parent.parentName, parent.folderName].filter(
|
|
15
|
+
const { registerFolder, unregisterFolder } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
|
|
16
|
+
(0, validate_folder_name_js_1.validateFolderName)(name);
|
|
17
|
+
const parentNameArr = [parent.parentName, parent.folderName].filter(truthy_js_1.truthy);
|
|
18
18
|
const parentName = parentNameArr.length === 0 ? null : parentNameArr.join('/');
|
|
19
19
|
const value = (0, react_1.useMemo)(() => {
|
|
20
20
|
return {
|
|
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.IFrame = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
7
7
|
const IFrameRefForwarding = ({ onLoad, onError, ...props }, ref) => {
|
|
8
|
-
const [handle] = (0, react_1.useState)(() => (0,
|
|
8
|
+
const [handle] = (0, react_1.useState)(() => (0, delay_render_js_1.delayRender)(`Loading <IFrame> with source ${props.src}`));
|
|
9
9
|
const didLoad = (0, react_1.useCallback)((e) => {
|
|
10
|
-
(0,
|
|
10
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
11
11
|
onLoad === null || onLoad === void 0 ? void 0 : onLoad(e);
|
|
12
12
|
}, [handle, onLoad]);
|
|
13
13
|
const didGetError = (0, react_1.useCallback)((e) => {
|
|
14
|
-
(0,
|
|
14
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
15
15
|
if (onError) {
|
|
16
16
|
onError(e);
|
|
17
17
|
}
|
|
@@ -3,16 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Img = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
6
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
7
|
+
const get_environment_js_1 = require("./get-environment.js");
|
|
8
|
+
const prefetch_js_1 = require("./prefetch.js");
|
|
9
9
|
const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
|
|
10
10
|
const imageRef = (0, react_1.useRef)(null);
|
|
11
|
-
const environment = (0,
|
|
11
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
12
12
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
13
13
|
return imageRef.current;
|
|
14
14
|
}, []);
|
|
15
|
-
const actualSrc = (0,
|
|
15
|
+
const actualSrc = (0, prefetch_js_1.usePreload)(src);
|
|
16
16
|
const didGetError = (0, react_1.useCallback)((e) => {
|
|
17
17
|
var _a;
|
|
18
18
|
if (onError) {
|
|
@@ -29,13 +29,13 @@ const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
|
|
|
29
29
|
if (process.env.NODE_ENV === 'test') {
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
const newHandle = (0,
|
|
32
|
+
const newHandle = (0, delay_render_js_1.delayRender)('Loading <Img> with src=' + src);
|
|
33
33
|
const { current } = imageRef;
|
|
34
34
|
const didLoad = () => {
|
|
35
|
-
(0,
|
|
35
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
36
36
|
};
|
|
37
37
|
if (current === null || current === void 0 ? void 0 : current.complete) {
|
|
38
|
-
(0,
|
|
38
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
39
39
|
}
|
|
40
40
|
else {
|
|
41
41
|
current === null || current === void 0 ? void 0 : current.addEventListener('load', didLoad, { once: true });
|
|
@@ -43,7 +43,7 @@ const ImgRefForwarding = ({ onError, src, ...props }, ref) => {
|
|
|
43
43
|
// If tag gets unmounted, clear pending handles because image is not going to load
|
|
44
44
|
return () => {
|
|
45
45
|
current === null || current === void 0 ? void 0 : current.removeEventListener('load', didLoad);
|
|
46
|
-
(0,
|
|
46
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
47
47
|
};
|
|
48
48
|
}, [src]);
|
|
49
49
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Null = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
6
6
|
const Null = () => {
|
|
7
|
-
const { setClipRegion } = (0, react_1.useContext)(
|
|
7
|
+
const { setClipRegion } = (0, react_1.useContext)(NativeLayers_js_1.NativeLayersContext);
|
|
8
8
|
(0, react_1.useEffect)(() => {
|
|
9
9
|
setClipRegion((c) => {
|
|
10
10
|
if (c === null) {
|
|
@@ -3,18 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RemotionRoot = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
6
|
+
const shared_audio_tags_js_1 = require("./audio/shared-audio-tags.js");
|
|
7
|
+
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
8
|
+
const delay_render_js_1 = require("./delay-render.js");
|
|
9
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
10
|
+
const nonce_js_1 = require("./nonce.js");
|
|
11
|
+
const prefetch_state_js_1 = require("./prefetch-state.js");
|
|
12
|
+
const random_js_1 = require("./random.js");
|
|
13
|
+
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
14
|
+
const duration_state_js_1 = require("./video/duration-state.js");
|
|
15
15
|
const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
16
16
|
var _a;
|
|
17
|
-
const [remotionRootId] = (0, react_1.useState)(() => String((0,
|
|
17
|
+
const [remotionRootId] = (0, react_1.useState)(() => String((0, random_js_1.random)(null)));
|
|
18
18
|
const [frame, setFrame] = (0, react_1.useState)((_a = window.remotion_initialFrame) !== null && _a !== void 0 ? _a : 0);
|
|
19
19
|
const [playing, setPlaying] = (0, react_1.useState)(false);
|
|
20
20
|
const imperativePlaying = (0, react_1.useRef)(false);
|
|
@@ -24,9 +24,9 @@ const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
24
24
|
(0, react_1.useLayoutEffect)(() => {
|
|
25
25
|
if (typeof window !== 'undefined') {
|
|
26
26
|
window.remotion_setFrame = (f) => {
|
|
27
|
-
const id = (0,
|
|
27
|
+
const id = (0, delay_render_js_1.delayRender)(`Setting the current frame to ${f}`);
|
|
28
28
|
setFrame(f);
|
|
29
|
-
requestAnimationFrame(() => (0,
|
|
29
|
+
requestAnimationFrame(() => (0, delay_render_js_1.continueRender)(id));
|
|
30
30
|
};
|
|
31
31
|
window.remotion_isPlayer = false;
|
|
32
32
|
}
|
|
@@ -64,7 +64,7 @@ const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}, []);
|
|
67
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
67
|
+
return ((0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: nonceContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineContextValue, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(NativeLayers_js_1.NativeLayersProvider, { children: (0, jsx_runtime_1.jsx)(CompositionManager_js_1.CompositionManagerProvider, { children: (0, jsx_runtime_1.jsx)(duration_state_js_1.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(shared_audio_tags_js_1.SharedAudioContextProvider
|
|
68
68
|
// In the preview, which is mostly played on Desktop, we opt out of the autoplay policy fix as described in https://github.com/remotion-dev/remotion/pull/554, as it mostly applies to mobile.
|
|
69
69
|
, {
|
|
70
70
|
// In the preview, which is mostly played on Desktop, we opt out of the autoplay policy fix as described in https://github.com/remotion-dev/remotion/pull/554, as it mostly applies to mobile.
|
|
@@ -3,24 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Sequence = exports.SequenceContext = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
6
|
+
const AbsoluteFill_js_1 = require("./AbsoluteFill.js");
|
|
7
|
+
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
8
|
+
const get_environment_js_1 = require("./get-environment.js");
|
|
9
|
+
const get_timeline_clip_name_js_1 = require("./get-timeline-clip-name.js");
|
|
10
|
+
const nonce_js_1 = require("./nonce.js");
|
|
11
|
+
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
12
|
+
const use_video_config_js_1 = require("./use-video-config.js");
|
|
13
13
|
exports.SequenceContext = (0, react_1.createContext)(null);
|
|
14
14
|
const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity, children, name, showInTimeline = true, showLoopTimesInTimeline, ...other }, ref) => {
|
|
15
15
|
const { layout = 'absolute-fill' } = other;
|
|
16
16
|
const [id] = (0, react_1.useState)(() => String(Math.random()));
|
|
17
17
|
const parentSequence = (0, react_1.useContext)(exports.SequenceContext);
|
|
18
|
-
const { rootId } = (0, react_1.useContext)(
|
|
18
|
+
const { rootId } = (0, react_1.useContext)(timeline_position_state_js_1.TimelineContext);
|
|
19
19
|
const cumulatedFrom = parentSequence
|
|
20
20
|
? parentSequence.cumulatedFrom + parentSequence.relativeFrom
|
|
21
21
|
: 0;
|
|
22
|
-
const nonce = (0,
|
|
23
|
-
const environment = (0,
|
|
22
|
+
const nonce = (0, nonce_js_1.useNonce)();
|
|
23
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
24
24
|
if (layout !== 'absolute-fill' && layout !== 'none') {
|
|
25
25
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
26
26
|
}
|
|
@@ -44,13 +44,13 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
44
44
|
if (from % 1 !== 0) {
|
|
45
45
|
throw new TypeError(`The "from" prop of a sequence must be an integer, but got ${from}.`);
|
|
46
46
|
}
|
|
47
|
-
const absoluteFrame = (0,
|
|
48
|
-
const videoConfig = (0,
|
|
47
|
+
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
|
|
48
|
+
const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
|
|
49
49
|
const parentSequenceDuration = parentSequence
|
|
50
50
|
? Math.min(parentSequence.durationInFrames - from, durationInFrames)
|
|
51
51
|
: durationInFrames;
|
|
52
52
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
53
|
-
const { registerSequence, unregisterSequence } = (0, react_1.useContext)(
|
|
53
|
+
const { registerSequence, unregisterSequence } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
|
|
54
54
|
const contextValue = (0, react_1.useMemo)(() => {
|
|
55
55
|
var _a;
|
|
56
56
|
return {
|
|
@@ -68,7 +68,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
68
68
|
id,
|
|
69
69
|
]);
|
|
70
70
|
const timelineClipName = (0, react_1.useMemo)(() => {
|
|
71
|
-
return name !== null && name !== void 0 ? name : (0,
|
|
71
|
+
return name !== null && name !== void 0 ? name : (0, get_timeline_clip_name_js_1.getTimelineClipName)(children);
|
|
72
72
|
}, [children, name]);
|
|
73
73
|
(0, react_1.useEffect)(() => {
|
|
74
74
|
var _a;
|
|
@@ -122,7 +122,7 @@ const SequenceRefForwardingFunction = ({ from = 0, durationInFrames = Infinity,
|
|
|
122
122
|
if (ref !== null && layout === 'none') {
|
|
123
123
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
124
124
|
}
|
|
125
|
-
return ((0, jsx_runtime_1.jsx)(exports.SequenceContext.Provider, { value: contextValue, children: content === null ? null : layout === '
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)(exports.SequenceContext.Provider, { value: contextValue, children: content === null ? null : other.layout === 'none' ? (content) : ((0, jsx_runtime_1.jsx)(AbsoluteFill_js_1.AbsoluteFill, { ref: ref, style: defaultStyle, className: other.className, children: content })) }));
|
|
126
126
|
};
|
|
127
127
|
/**
|
|
128
128
|
* A component that time-shifts its children and wraps them in an absolutely positioned <div>.
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Still = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const Composition_js_1 = require("./Composition.js");
|
|
6
6
|
const Still = (props) => {
|
|
7
|
-
return (0, jsx_runtime_1.jsx)(
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(Composition_js_1.Composition, { fps: 1, durationInFrames: 1, ...props });
|
|
8
8
|
};
|
|
9
9
|
exports.Still = Still;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { RemotionMainAudioProps } from './props';
|
|
2
|
+
import type { RemotionMainAudioProps } from './props.js';
|
|
3
3
|
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
4
|
-
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
|
+
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
7
7
|
allowAmplificationDuringRender?: boolean | undefined;
|
|
@@ -3,24 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Audio = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const get_environment_js_1 = require("../get-environment.js");
|
|
7
7
|
const loop_1 = require("../loop");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
8
|
+
const Sequence_js_1 = require("../Sequence.js");
|
|
9
|
+
const use_video_config_js_1 = require("../use-video-config.js");
|
|
10
|
+
const validate_media_props_js_1 = require("../validate-media-props.js");
|
|
11
|
+
const validate_start_from_props_js_1 = require("../validate-start-from-props.js");
|
|
12
|
+
const duration_state_js_1 = require("../video/duration-state.js");
|
|
13
|
+
const AudioForDevelopment_js_1 = require("./AudioForDevelopment.js");
|
|
14
|
+
const AudioForRendering_js_1 = require("./AudioForRendering.js");
|
|
15
|
+
const shared_audio_tags_js_1 = require("./shared-audio-tags.js");
|
|
16
16
|
const AudioRefForwardingFunction = (props, ref) => {
|
|
17
17
|
var _a;
|
|
18
|
-
const audioContext = (0, react_1.useContext)(
|
|
18
|
+
const audioContext = (0, react_1.useContext)(shared_audio_tags_js_1.SharedAudioContext);
|
|
19
19
|
const { startFrom, endAt, ...otherProps } = props;
|
|
20
20
|
const { loop, ...propsOtherThanLoop } = props;
|
|
21
|
-
const { fps } = (0,
|
|
22
|
-
const environment = (0,
|
|
23
|
-
const { durations, setDurations } = (0, react_1.useContext)(
|
|
21
|
+
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
22
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
23
|
+
const { durations, setDurations } = (0, react_1.useContext)(duration_state_js_1.DurationsContext);
|
|
24
24
|
if (typeof props.src !== 'string') {
|
|
25
25
|
throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
26
26
|
}
|
|
@@ -38,15 +38,15 @@ const AudioRefForwardingFunction = (props, ref) => {
|
|
|
38
38
|
return ((0, jsx_runtime_1.jsx)(loop_1.Loop, { layout: "none", durationInFrames: Math.floor(actualDuration), children: (0, jsx_runtime_1.jsx)(exports.Audio, { ...propsOtherThanLoop, ref: ref }) }));
|
|
39
39
|
}
|
|
40
40
|
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
41
|
-
(0,
|
|
41
|
+
(0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
|
|
42
42
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
43
43
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
44
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
44
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.Audio, { ...otherProps, ref: ref }) }));
|
|
45
45
|
}
|
|
46
|
-
(0,
|
|
46
|
+
(0, validate_media_props_js_1.validateMediaProps)(props, 'Audio');
|
|
47
47
|
if (environment === 'rendering') {
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(AudioForRendering_js_1.AudioForRendering, { onDuration: onDuration, ...props, ref: ref, onError: onError }));
|
|
49
49
|
}
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)(AudioForDevelopment_js_1.AudioForDevelopment, { shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0, ...props, ref: ref, onError: onError, onDuration: onDuration }));
|
|
51
51
|
};
|
|
52
52
|
exports.Audio = (0, react_1.forwardRef)(AudioRefForwardingFunction);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
4
|
-
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
|
+
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
7
7
|
allowAmplificationDuringRender?: boolean | undefined;
|