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
|
@@ -3,34 +3,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OffthreadVideoForRendering = 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
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
6
|
+
const absolute_src_js_1 = require("../absolute-src.js");
|
|
7
|
+
const use_audio_frame_js_1 = require("../audio/use-audio-frame.js");
|
|
8
|
+
const CompositionManager_js_1 = require("../CompositionManager.js");
|
|
9
|
+
const default_css_js_1 = require("../default-css.js");
|
|
10
|
+
const Img_js_1 = require("../Img.js");
|
|
11
|
+
const internals_js_1 = require("../internals.js");
|
|
12
|
+
const random_js_1 = require("../random.js");
|
|
13
|
+
const Sequence_js_1 = require("../Sequence.js");
|
|
14
|
+
const timeline_position_state_js_1 = require("../timeline-position-state.js");
|
|
15
|
+
const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
16
|
+
const use_unsafe_video_config_js_1 = require("../use-unsafe-video-config.js");
|
|
17
|
+
const volume_prop_js_1 = require("../volume-prop.js");
|
|
18
|
+
const get_current_time_js_1 = require("./get-current-time.js");
|
|
19
19
|
const DEFAULT_IMAGE_FORMAT = 'jpeg';
|
|
20
20
|
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, imageFormat, allowAmplificationDuringRender, ...props }) => {
|
|
21
|
-
const absoluteFrame = (0,
|
|
22
|
-
const frame = (0,
|
|
23
|
-
const volumePropsFrame = (0,
|
|
24
|
-
const videoConfig = (0,
|
|
25
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
26
|
-
const mediaStartsAt = (0,
|
|
27
|
-
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(
|
|
21
|
+
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
|
|
22
|
+
const frame = (0, use_current_frame_js_1.useCurrentFrame)();
|
|
23
|
+
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
|
|
24
|
+
const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)();
|
|
25
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_js_1.SequenceContext);
|
|
26
|
+
const mediaStartsAt = (0, use_audio_frame_js_1.useMediaStartsAt)();
|
|
27
|
+
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
|
|
28
28
|
if (!src) {
|
|
29
29
|
throw new TypeError('No `src` was passed to <OffthreadVideo>.');
|
|
30
30
|
}
|
|
31
31
|
// Generate a string that's as unique as possible for this asset
|
|
32
32
|
// but at the same time the same on all threads
|
|
33
|
-
const id = (0, react_1.useMemo)(() => `offthreadvideo-${(0,
|
|
33
|
+
const id = (0, react_1.useMemo)(() => `offthreadvideo-${(0, random_js_1.random)(src !== null && src !== void 0 ? src : '')}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames}`, [
|
|
34
34
|
src,
|
|
35
35
|
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
|
|
36
36
|
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
@@ -39,7 +39,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
39
39
|
if (!videoConfig) {
|
|
40
40
|
throw new Error('No video config found');
|
|
41
41
|
}
|
|
42
|
-
const volume = (0,
|
|
42
|
+
const volume = (0, volume_prop_js_1.evaluateVolume)({
|
|
43
43
|
volume: volumeProp,
|
|
44
44
|
frame: volumePropsFrame,
|
|
45
45
|
mediaVolume: 1,
|
|
@@ -60,7 +60,7 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
60
60
|
}
|
|
61
61
|
registerAsset({
|
|
62
62
|
type: 'video',
|
|
63
|
-
src: (0,
|
|
63
|
+
src: (0, absolute_src_js_1.getAbsoluteSrc)(src),
|
|
64
64
|
id,
|
|
65
65
|
frame: absoluteFrame,
|
|
66
66
|
volume,
|
|
@@ -82,23 +82,23 @@ const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate,
|
|
|
82
82
|
allowAmplificationDuringRender,
|
|
83
83
|
]);
|
|
84
84
|
const currentTime = (0, react_1.useMemo)(() => {
|
|
85
|
-
return ((0,
|
|
85
|
+
return ((0, get_current_time_js_1.getExpectedMediaFrameUncorrected)({
|
|
86
86
|
frame,
|
|
87
87
|
playbackRate: playbackRate || 1,
|
|
88
88
|
startFrom: -mediaStartsAt,
|
|
89
89
|
}) / videoConfig.fps);
|
|
90
90
|
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
91
91
|
const actualSrc = (0, react_1.useMemo)(() => {
|
|
92
|
-
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0,
|
|
92
|
+
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0, absolute_src_js_1.getAbsoluteSrc)(src))}&time=${encodeURIComponent(currentTime)}&imageFormat=${imageFormat !== null && imageFormat !== void 0 ? imageFormat : DEFAULT_IMAGE_FORMAT}`;
|
|
93
93
|
}, [currentTime, imageFormat, src]);
|
|
94
94
|
const onErr = (0, react_1.useCallback)((e) => {
|
|
95
95
|
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
96
96
|
}, [onError]);
|
|
97
97
|
const className = (0, react_1.useMemo)(() => {
|
|
98
|
-
return [
|
|
99
|
-
.filter(
|
|
98
|
+
return [default_css_js_1.OFFTHREAD_VIDEO_CLASS_NAME, props.className]
|
|
99
|
+
.filter(internals_js_1.Internals.truthy)
|
|
100
100
|
.join(' ');
|
|
101
101
|
}, [props.className]);
|
|
102
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
102
|
+
return ((0, jsx_runtime_1.jsx)(Img_js_1.Img, { src: actualSrc, className: className, ...props, onError: onErr }));
|
|
103
103
|
};
|
|
104
104
|
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { RemotionMainVideoProps } from './props';
|
|
2
|
+
import type { RemotionMainVideoProps } from './props.js';
|
|
3
3
|
export declare const Video: (props: Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "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,22 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Video = 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
|
|
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("./duration-state.js");
|
|
13
|
+
const VideoForDevelopment_js_1 = require("./VideoForDevelopment.js");
|
|
14
|
+
const VideoForRendering_js_1 = require("./VideoForRendering.js");
|
|
15
15
|
const VideoForwardingFunction = (props, ref) => {
|
|
16
16
|
var _a;
|
|
17
17
|
const { startFrom, endAt, ...otherProps } = props;
|
|
18
18
|
const { loop, ...propsOtherThanLoop } = props;
|
|
19
|
-
const { fps } = (0,
|
|
20
|
-
const environment = (0,
|
|
21
|
-
const { durations, setDurations } = (0, react_1.useContext)(
|
|
19
|
+
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
20
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
21
|
+
const { durations, setDurations } = (0, react_1.useContext)(duration_state_js_1.DurationsContext);
|
|
22
22
|
if (typeof ref === 'string') {
|
|
23
23
|
throw new Error('string refs are not supported');
|
|
24
24
|
}
|
|
@@ -35,16 +35,16 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
35
35
|
return ((0, jsx_runtime_1.jsx)(loop_1.Loop, { durationInFrames: durationInFrames, children: (0, jsx_runtime_1.jsx)(exports.Video, { ...propsOtherThanLoop, ref: ref }) }));
|
|
36
36
|
}
|
|
37
37
|
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
38
|
-
(0,
|
|
38
|
+
(0, validate_start_from_props_js_1.validateStartFromProps)(startFrom, endAt);
|
|
39
39
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
40
40
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
41
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
41
|
+
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.Video, { ...otherProps, ref: ref }) }));
|
|
42
42
|
}
|
|
43
|
-
(0,
|
|
43
|
+
(0, validate_media_props_js_1.validateMediaProps)(props, 'Video');
|
|
44
44
|
if (environment === 'rendering') {
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(VideoForRendering_js_1.VideoForRendering, { onDuration: onDuration, ...otherProps, ref: ref }));
|
|
46
46
|
}
|
|
47
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_js_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref, onDuration: onDuration }));
|
|
48
48
|
};
|
|
49
49
|
const forward = react_1.forwardRef;
|
|
50
50
|
exports.Video = forward(VideoForwardingFunction);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const VideoForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "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,32 +3,32 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VideoForDevelopment = 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
|
|
15
|
-
const
|
|
6
|
+
const use_audio_frame_js_1 = require("../audio/use-audio-frame.js");
|
|
7
|
+
const prefetch_js_1 = require("../prefetch.js");
|
|
8
|
+
const Sequence_js_1 = require("../Sequence.js");
|
|
9
|
+
const use_media_in_timeline_js_1 = require("../use-media-in-timeline.js");
|
|
10
|
+
const use_media_playback_js_1 = require("../use-media-playback.js");
|
|
11
|
+
const use_media_tag_volume_js_1 = require("../use-media-tag-volume.js");
|
|
12
|
+
const use_sync_volume_with_media_tag_js_1 = require("../use-sync-volume-with-media-tag.js");
|
|
13
|
+
const use_video_config_js_1 = require("../use-video-config.js");
|
|
14
|
+
const volume_position_state_js_1 = require("../volume-position-state.js");
|
|
15
|
+
const video_fragment_js_1 = require("./video-fragment.js");
|
|
16
16
|
const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
17
17
|
var _a, _b;
|
|
18
18
|
const videoRef = (0, react_1.useRef)(null);
|
|
19
|
-
const volumePropFrame = (0,
|
|
20
|
-
const { fps, durationInFrames } = (0,
|
|
21
|
-
const parentSequence = (0, react_1.useContext)(
|
|
19
|
+
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
|
|
20
|
+
const { fps, durationInFrames } = (0, use_video_config_js_1.useVideoConfig)();
|
|
21
|
+
const parentSequence = (0, react_1.useContext)(Sequence_js_1.SequenceContext);
|
|
22
22
|
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration,
|
|
23
23
|
// @ts-expect-error
|
|
24
24
|
acceptableTimeShift, acceptableTimeShiftInSeconds, ...nativeProps } = props;
|
|
25
25
|
if (typeof acceptableTimeShift !== 'undefined') {
|
|
26
26
|
throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.');
|
|
27
27
|
}
|
|
28
|
-
const actualVolume = (0,
|
|
29
|
-
const [mediaVolume] = (0,
|
|
30
|
-
const [mediaMuted] = (0,
|
|
31
|
-
(0,
|
|
28
|
+
const actualVolume = (0, use_media_tag_volume_js_1.useMediaTagVolume)(videoRef);
|
|
29
|
+
const [mediaVolume] = (0, volume_position_state_js_1.useMediaVolumeState)();
|
|
30
|
+
const [mediaMuted] = (0, volume_position_state_js_1.useMediaMutedState)();
|
|
31
|
+
(0, use_media_in_timeline_js_1.useMediaInTimeline)({
|
|
32
32
|
mediaRef: videoRef,
|
|
33
33
|
volume,
|
|
34
34
|
mediaVolume,
|
|
@@ -36,20 +36,20 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
36
36
|
src,
|
|
37
37
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
38
38
|
});
|
|
39
|
-
(0,
|
|
39
|
+
(0, use_sync_volume_with_media_tag_js_1.useSyncVolumeWithMediaTag)({
|
|
40
40
|
volumePropFrame,
|
|
41
41
|
actualVolume,
|
|
42
42
|
volume,
|
|
43
43
|
mediaVolume,
|
|
44
44
|
mediaRef: videoRef,
|
|
45
45
|
});
|
|
46
|
-
(0,
|
|
46
|
+
(0, use_media_playback_js_1.useMediaPlayback)({
|
|
47
47
|
mediaRef: videoRef,
|
|
48
48
|
src,
|
|
49
49
|
mediaType: 'video',
|
|
50
50
|
playbackRate: (_b = props.playbackRate) !== null && _b !== void 0 ? _b : 1,
|
|
51
51
|
onlyWarnForMediaSeekingError,
|
|
52
|
-
acceptableTimeshift: acceptableTimeShiftInSeconds !== null && acceptableTimeShiftInSeconds !== void 0 ? acceptableTimeShiftInSeconds :
|
|
52
|
+
acceptableTimeshift: acceptableTimeShiftInSeconds !== null && acceptableTimeShiftInSeconds !== void 0 ? acceptableTimeShiftInSeconds : use_media_playback_js_1.DEFAULT_ACCEPTABLE_TIMESHIFT,
|
|
53
53
|
});
|
|
54
54
|
const actualFrom = parentSequence
|
|
55
55
|
? parentSequence.relativeFrom + parentSequence.cumulatedFrom
|
|
@@ -57,8 +57,8 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
57
57
|
const duration = parentSequence
|
|
58
58
|
? Math.min(parentSequence.durationInFrames, durationInFrames)
|
|
59
59
|
: durationInFrames;
|
|
60
|
-
const actualSrc = (0,
|
|
61
|
-
actualSrc: (0,
|
|
60
|
+
const actualSrc = (0, video_fragment_js_1.useAppendVideoFragment)({
|
|
61
|
+
actualSrc: (0, prefetch_js_1.usePreload)(src),
|
|
62
62
|
actualFrom,
|
|
63
63
|
duration,
|
|
64
64
|
fps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onEnded" | "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,35 +3,35 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VideoForRendering = 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
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
6
|
+
const absolute_src_js_1 = require("../absolute-src.js");
|
|
7
|
+
const use_audio_frame_js_1 = require("../audio/use-audio-frame.js");
|
|
8
|
+
const CompositionManager_js_1 = require("../CompositionManager.js");
|
|
9
|
+
const delay_render_js_1 = require("../delay-render.js");
|
|
10
|
+
const get_environment_js_1 = require("../get-environment.js");
|
|
11
|
+
const is_approximately_the_same_js_1 = require("../is-approximately-the-same.js");
|
|
12
|
+
const random_js_1 = require("../random.js");
|
|
13
|
+
const Sequence_js_1 = require("../Sequence.js");
|
|
14
|
+
const timeline_position_state_js_1 = require("../timeline-position-state.js");
|
|
15
|
+
const use_current_frame_js_1 = require("../use-current-frame.js");
|
|
16
|
+
const use_unsafe_video_config_js_1 = require("../use-unsafe-video-config.js");
|
|
17
|
+
const volume_prop_js_1 = require("../volume-prop.js");
|
|
18
|
+
const warn_about_non_seekable_media_js_1 = require("../warn-about-non-seekable-media.js");
|
|
19
|
+
const get_current_time_js_1 = require("./get-current-time.js");
|
|
20
20
|
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, ...props }, ref) => {
|
|
21
|
-
const absoluteFrame = (0,
|
|
22
|
-
const frame = (0,
|
|
23
|
-
const volumePropsFrame = (0,
|
|
24
|
-
const videoConfig = (0,
|
|
21
|
+
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)();
|
|
22
|
+
const frame = (0, use_current_frame_js_1.useCurrentFrame)();
|
|
23
|
+
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)();
|
|
24
|
+
const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)();
|
|
25
25
|
const videoRef = (0, react_1.useRef)(null);
|
|
26
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
27
|
-
const mediaStartsAt = (0,
|
|
28
|
-
const environment = (0,
|
|
29
|
-
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(
|
|
26
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_js_1.SequenceContext);
|
|
27
|
+
const mediaStartsAt = (0, use_audio_frame_js_1.useMediaStartsAt)();
|
|
28
|
+
const environment = (0, get_environment_js_1.useRemotionEnvironment)();
|
|
29
|
+
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_js_1.CompositionManager);
|
|
30
30
|
// Generate a string that's as unique as possible for this asset
|
|
31
31
|
// but at the same time the same on all threads
|
|
32
32
|
const id = (0, react_1.useMemo)(() => {
|
|
33
33
|
var _a;
|
|
34
|
-
return `video-${(0,
|
|
34
|
+
return `video-${(0, random_js_1.random)((_a = props.src) !== null && _a !== void 0 ? _a : '')}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom}-${sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames}`;
|
|
35
35
|
}, [
|
|
36
36
|
props.src,
|
|
37
37
|
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
|
|
@@ -41,7 +41,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
41
41
|
if (!videoConfig) {
|
|
42
42
|
throw new Error('No video config found');
|
|
43
43
|
}
|
|
44
|
-
const volume = (0,
|
|
44
|
+
const volume = (0, volume_prop_js_1.evaluateVolume)({
|
|
45
45
|
volume: volumeProp,
|
|
46
46
|
frame: volumePropsFrame,
|
|
47
47
|
mediaVolume: 1,
|
|
@@ -62,7 +62,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
62
62
|
}
|
|
63
63
|
registerAsset({
|
|
64
64
|
type: 'video',
|
|
65
|
-
src: (0,
|
|
65
|
+
src: (0, absolute_src_js_1.getAbsoluteSrc)(props.src),
|
|
66
66
|
id,
|
|
67
67
|
frame: absoluteFrame,
|
|
68
68
|
volume,
|
|
@@ -95,7 +95,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
const currentTime = (() => {
|
|
98
|
-
return (0,
|
|
98
|
+
return (0, get_current_time_js_1.getMediaTime)({
|
|
99
99
|
fps: videoConfig.fps,
|
|
100
100
|
frame,
|
|
101
101
|
src: props.src,
|
|
@@ -104,18 +104,18 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
104
104
|
mediaType: 'video',
|
|
105
105
|
});
|
|
106
106
|
})();
|
|
107
|
-
const handle = (0,
|
|
107
|
+
const handle = (0, delay_render_js_1.delayRender)(`Rendering <Video /> with src="${props.src}"`);
|
|
108
108
|
if (process.env.NODE_ENV === 'test') {
|
|
109
|
-
(0,
|
|
109
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
|
-
if ((0,
|
|
112
|
+
if ((0, is_approximately_the_same_js_1.isApproximatelyTheSame)(current.currentTime, currentTime)) {
|
|
113
113
|
if (current.readyState >= 2) {
|
|
114
|
-
(0,
|
|
114
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
115
115
|
return;
|
|
116
116
|
}
|
|
117
117
|
const loadedDataHandler = () => {
|
|
118
|
-
(0,
|
|
118
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
119
119
|
};
|
|
120
120
|
current.addEventListener('loadeddata', loadedDataHandler, { once: true });
|
|
121
121
|
return () => {
|
|
@@ -124,22 +124,22 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
124
124
|
}
|
|
125
125
|
current.currentTime = currentTime;
|
|
126
126
|
const seekedHandler = () => {
|
|
127
|
-
(0,
|
|
127
|
+
(0, warn_about_non_seekable_media_js_1.warnAboutNonSeekableMedia)(current, 'exception');
|
|
128
128
|
if (window.navigator.platform.startsWith('Mac')) {
|
|
129
129
|
// Improve me: This is ensures frame perfectness but slows down render.
|
|
130
130
|
// Please see this issue for context: https://github.com/remotion-dev/remotion/issues/200
|
|
131
131
|
// Only affects macOS since it uses VideoToolbox decoding.
|
|
132
132
|
setTimeout(() => {
|
|
133
|
-
(0,
|
|
133
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
134
134
|
}, 100);
|
|
135
135
|
}
|
|
136
136
|
else {
|
|
137
|
-
(0,
|
|
137
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
140
|
current.addEventListener('seeked', seekedHandler, { once: true });
|
|
141
141
|
const endedHandler = () => {
|
|
142
|
-
(0,
|
|
142
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
143
143
|
};
|
|
144
144
|
current.addEventListener('ended', endedHandler, { once: true });
|
|
145
145
|
const errorHandler = () => {
|
|
@@ -158,7 +158,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
158
158
|
current.removeEventListener('ended', endedHandler);
|
|
159
159
|
current.removeEventListener('error', errorHandler);
|
|
160
160
|
current.removeEventListener('seeked', seekedHandler);
|
|
161
|
-
(0,
|
|
161
|
+
(0, delay_render_js_1.continueRender)(handle);
|
|
162
162
|
};
|
|
163
163
|
}, [
|
|
164
164
|
volumePropsFrame,
|
|
@@ -176,17 +176,17 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
176
176
|
if (process.env.NODE_ENV === 'test') {
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
|
-
const newHandle = (0,
|
|
179
|
+
const newHandle = (0, delay_render_js_1.delayRender)('Loading <Video> duration with src=' + src);
|
|
180
180
|
const { current } = videoRef;
|
|
181
181
|
const didLoad = () => {
|
|
182
182
|
if (current === null || current === void 0 ? void 0 : current.duration) {
|
|
183
183
|
onDuration(src, current.duration);
|
|
184
184
|
}
|
|
185
|
-
(0,
|
|
185
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
186
186
|
};
|
|
187
187
|
if (current === null || current === void 0 ? void 0 : current.duration) {
|
|
188
188
|
onDuration(src, current.duration);
|
|
189
|
-
(0,
|
|
189
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
190
190
|
}
|
|
191
191
|
else {
|
|
192
192
|
current === null || current === void 0 ? void 0 : current.addEventListener('loadedmetadata', didLoad, { once: true });
|
|
@@ -194,7 +194,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAm
|
|
|
194
194
|
// If tag gets unmounted, clear pending handles because video metadata is not going to load
|
|
195
195
|
return () => {
|
|
196
196
|
current === null || current === void 0 ? void 0 : current.removeEventListener('loadedmetadata', didLoad);
|
|
197
|
-
(0,
|
|
197
|
+
(0, delay_render_js_1.continueRender)(newHandle);
|
|
198
198
|
};
|
|
199
199
|
}, [src, onDuration]);
|
|
200
200
|
}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
// Calculate the `.currentTime` of a video or audio element
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.getMediaTime = exports.getExpectedMediaFrameUncorrected = void 0;
|
|
5
|
-
const
|
|
5
|
+
const interpolate_js_1 = require("../interpolate.js");
|
|
6
6
|
const getExpectedMediaFrameUncorrected = ({ frame, playbackRate, startFrom, }) => {
|
|
7
|
-
return (0,
|
|
7
|
+
return (0, interpolate_js_1.interpolate)(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);
|
|
8
8
|
};
|
|
9
9
|
exports.getExpectedMediaFrameUncorrected = getExpectedMediaFrameUncorrected;
|
|
10
10
|
const getMediaTime = ({ fps, frame, src, playbackRate, startFrom, mediaType, }) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { OffthreadVideo } from './OffthreadVideo';
|
|
2
|
-
export { OffthreadVideoImageFormat, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props';
|
|
3
|
-
export { Video } from './Video';
|
|
1
|
+
export { OffthreadVideo } from './OffthreadVideo.js';
|
|
2
|
+
export { OffthreadVideoImageFormat, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props.js';
|
|
3
|
+
export { Video } from './Video.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Video = exports.OffthreadVideo = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "OffthreadVideo", { enumerable: true, get: function () { return
|
|
6
|
-
var
|
|
7
|
-
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return
|
|
4
|
+
var OffthreadVideo_js_1 = require("./OffthreadVideo.js");
|
|
5
|
+
Object.defineProperty(exports, "OffthreadVideo", { enumerable: true, get: function () { return OffthreadVideo_js_1.OffthreadVideo; } });
|
|
6
|
+
var Video_js_1 = require("./Video.js");
|
|
7
|
+
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return Video_js_1.Video; } });
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function useRemotionContexts(): {
|
|
3
|
+
compositionManagerCtx: import("./CompositionManager.js").CompositionManagerContext;
|
|
4
|
+
timelineContext: import("./timeline-position-state.js").TimelineContextValue;
|
|
5
|
+
setTimelineContext: import("./timeline-position-state.js").SetTimelineContextValue;
|
|
6
|
+
sequenceContext: import("./Sequence.js").SequenceContextType | null;
|
|
7
|
+
nonceContext: import("./nonce.js").TNonceContext;
|
|
8
|
+
canUseRemotionHooksContext: boolean;
|
|
9
|
+
nativeLayersContext: import("./NativeLayers.js").TNativeLayersContext;
|
|
10
|
+
preloadContext: {
|
|
11
|
+
[x: string]: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export interface RemotionContextProviderProps {
|
|
15
|
+
contexts: ReturnType<typeof useRemotionContexts>;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare const RemotionContextProvider: (props: RemotionContextProviderProps) => JSX.Element;
|
|
@@ -29,22 +29,22 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
29
29
|
// such as in React Three Fiber. All the contexts need to be passed again
|
|
30
30
|
// for them to be useable
|
|
31
31
|
const react_1 = __importStar(require("react"));
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
32
|
+
const CanUseRemotionHooks_js_1 = require("./CanUseRemotionHooks.js");
|
|
33
|
+
const CompositionManager_js_1 = require("./CompositionManager.js");
|
|
34
|
+
const NativeLayers_js_1 = require("./NativeLayers.js");
|
|
35
|
+
const nonce_js_1 = require("./nonce.js");
|
|
36
|
+
const prefetch_state_js_1 = require("./prefetch-state.js");
|
|
37
|
+
const Sequence_js_1 = require("./Sequence.js");
|
|
38
|
+
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
39
39
|
function useRemotionContexts() {
|
|
40
|
-
const compositionManagerCtx = react_1.default.useContext(
|
|
41
|
-
const timelineContext = react_1.default.useContext(
|
|
42
|
-
const setTimelineContext = react_1.default.useContext(
|
|
43
|
-
const sequenceContext = react_1.default.useContext(
|
|
44
|
-
const nonceContext = react_1.default.useContext(
|
|
45
|
-
const canUseRemotionHooksContext = react_1.default.useContext(
|
|
46
|
-
const nativeLayersContext = react_1.default.useContext(
|
|
47
|
-
const preloadContext = react_1.default.useContext(
|
|
40
|
+
const compositionManagerCtx = react_1.default.useContext(CompositionManager_js_1.CompositionManager);
|
|
41
|
+
const timelineContext = react_1.default.useContext(timeline_position_state_js_1.TimelineContext);
|
|
42
|
+
const setTimelineContext = react_1.default.useContext(timeline_position_state_js_1.SetTimelineContext);
|
|
43
|
+
const sequenceContext = react_1.default.useContext(Sequence_js_1.SequenceContext);
|
|
44
|
+
const nonceContext = react_1.default.useContext(nonce_js_1.NonceContext);
|
|
45
|
+
const canUseRemotionHooksContext = react_1.default.useContext(CanUseRemotionHooks_js_1.CanUseRemotionHooks);
|
|
46
|
+
const nativeLayersContext = react_1.default.useContext(NativeLayers_js_1.NativeLayersContext);
|
|
47
|
+
const preloadContext = react_1.default.useContext(prefetch_state_js_1.PreloadContext);
|
|
48
48
|
return (0, react_1.useMemo)(() => ({
|
|
49
49
|
compositionManagerCtx,
|
|
50
50
|
timelineContext,
|
|
@@ -68,6 +68,6 @@ function useRemotionContexts() {
|
|
|
68
68
|
exports.useRemotionContexts = useRemotionContexts;
|
|
69
69
|
const RemotionContextProvider = (props) => {
|
|
70
70
|
const { children, contexts } = props;
|
|
71
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooks.Provider, { value: contexts.canUseRemotionHooksContext, children: (0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: contexts.nonceContext, children: (0, jsx_runtime_1.jsx)(NativeLayers_js_1.NativeLayersContext.Provider, { value: contexts.nativeLayersContext, children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PreloadContext.Provider, { value: contexts.preloadContext, children: (0, jsx_runtime_1.jsx)(CompositionManager_js_1.CompositionManager.Provider, { value: contexts.compositionManagerCtx, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: contexts.timelineContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: contexts.setTimelineContext, children: (0, jsx_runtime_1.jsx)(Sequence_js_1.SequenceContext.Provider, { value: contexts.sequenceContext, children: children }) }) }) }) }) }) }) }));
|
|
72
72
|
};
|
|
73
73
|
exports.RemotionContextProvider = RemotionContextProvider;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
4
|
+
* @link https://www.remotion.dev/docs/absolute-fill
|
|
5
|
+
*/
|
|
6
|
+
export declare const AbsoluteFill: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
|
+
const AbsoluteFillRefForwarding = (props, ref) => {
|
|
4
|
+
const { style, ...other } = props;
|
|
5
|
+
const actualStyle = useMemo(() => {
|
|
6
|
+
return {
|
|
7
|
+
position: 'absolute',
|
|
8
|
+
top: 0,
|
|
9
|
+
left: 0,
|
|
10
|
+
right: 0,
|
|
11
|
+
bottom: 0,
|
|
12
|
+
width: '100%',
|
|
13
|
+
height: '100%',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
flexDirection: 'column',
|
|
16
|
+
...style,
|
|
17
|
+
};
|
|
18
|
+
}, [style]);
|
|
19
|
+
return _jsx("div", { ref: ref, style: actualStyle, ...other });
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* An absolutely positioned <div> element with 100% width, height, and a column flex style
|
|
23
|
+
* @link https://www.remotion.dev/docs/absolute-fill
|
|
24
|
+
*/
|
|
25
|
+
export const AbsoluteFill = forwardRef(AbsoluteFillRefForwarding);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext } from 'react';
|
|
3
|
+
export const CanUseRemotionHooks = createContext(false);
|
|
4
|
+
export const CanUseRemotionHooksProvider = ({ children }) => {
|
|
5
|
+
return (_jsx(CanUseRemotionHooks.Provider, { value: true, children: children }));
|
|
6
|
+
};
|