remotion 4.0.0-fastlambda.7 → 4.0.0-forcepublish.6
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/.turbo/turbo-build.log +5 -5
- package/README.md +1 -1
- package/dist/AbsoluteFill.d.ts +6 -1
- package/dist/AbsoluteFill.js +5 -1
- package/dist/CanUseRemotionHooks.d.ts +5 -0
- package/dist/CanUseRemotionHooks.js +10 -0
- package/dist/Composition.d.ts +3 -6
- package/dist/Composition.js +40 -28
- package/dist/CompositionManager.d.ts +4 -12
- package/dist/CompositionManager.js +6 -2
- package/dist/Folder.d.ts +15 -0
- package/dist/Folder.js +33 -0
- package/dist/IFrame.js +1 -1
- package/dist/Img.js +29 -21
- package/dist/RemotionRoot.js +1 -1
- package/dist/{sequencing/index.d.ts → Sequence.d.ts} +8 -2
- package/dist/{sequencing/index.js → Sequence.js} +22 -18
- package/dist/Still.d.ts +1 -2
- package/dist/Still.js +1 -1
- package/dist/asset-types.d.ts +1 -4
- package/dist/audio/Audio.d.ts +2 -2
- package/dist/audio/Audio.js +5 -5
- package/dist/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/audio/AudioForDevelopment.js +12 -2
- package/dist/audio/AudioForRendering.d.ts +2 -2
- package/dist/audio/AudioForRendering.js +9 -6
- package/dist/audio/index.js +5 -1
- package/dist/audio/props.d.ts +1 -1
- package/dist/audio/shared-audio-tags.d.ts +4 -3
- package/dist/audio/shared-audio-tags.js +115 -42
- package/dist/audio/use-audio-frame.js +4 -4
- package/dist/config/bundle-out-dir.d.ts +2 -0
- package/dist/config/bundle-out-dir.js +12 -0
- package/dist/config/input-props.js +12 -14
- package/dist/config/public-path.d.ts +2 -0
- package/dist/config/public-path.js +12 -0
- package/dist/{config/index.d.ts → config.d.ts} +58 -22
- package/dist/config.js +21 -0
- package/dist/default-css.d.ts +1 -0
- package/dist/default-css.js +9 -2
- package/dist/delay-render.d.ts +1 -1
- package/dist/delay-render.js +4 -4
- package/dist/freeze.d.ts +2 -2
- package/dist/freeze.js +2 -2
- package/dist/get-timeline-clip-name.js +2 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.js +15 -8
- package/dist/internals.d.ts +24 -101
- package/dist/internals.js +20 -94
- package/dist/{interpolateColors.d.ts → interpolate-colors.d.ts} +0 -0
- package/dist/{interpolateColors.js → interpolate-colors.js} +0 -0
- package/dist/loading-indicator.d.ts +2 -0
- package/dist/loading-indicator.js +35 -0
- package/dist/loop/index.js +1 -1
- package/dist/play-and-handle-not-allowed-error.d.ts +1 -1
- package/dist/portal-node.d.ts +1 -0
- package/dist/portal-node.js +23 -0
- package/dist/register-root.d.ts +2 -1
- package/dist/register-root.js +20 -5
- package/dist/series/index.d.ts +2 -2
- package/dist/series/index.js +4 -4
- package/dist/spring/index.d.ts +8 -4
- package/dist/spring/index.js +21 -6
- package/dist/spring/measure-spring.d.ts +1 -1
- package/dist/spring/measure-spring.js +1 -1
- package/dist/static-file.js +6 -0
- package/dist/timeline-position-state.d.ts +1 -1
- package/dist/{use-frame.d.ts → use-current-frame.d.ts} +0 -0
- package/dist/{use-frame.js → use-current-frame.js} +10 -2
- package/dist/use-lazy-component.d.ts +3 -3
- package/dist/use-lazy-component.js +5 -1
- package/dist/use-media-in-timeline.d.ts +2 -2
- package/dist/use-media-in-timeline.js +2 -2
- package/dist/use-media-playback.d.ts +3 -2
- package/dist/use-media-playback.js +9 -6
- package/dist/use-media-tag-volume.d.ts +1 -1
- package/dist/use-sync-volume-with-media-tag.d.ts +2 -2
- package/dist/use-unsafe-video-config.d.ts +1 -1
- package/dist/use-unsafe-video-config.js +2 -2
- package/dist/use-video-config.d.ts +1 -1
- package/dist/use-video-config.js +6 -0
- package/dist/validate-media-props.d.ts +4 -3
- package/dist/validation/validate-fps.d.ts +1 -1
- package/dist/validation/validate-fps.js +4 -1
- package/dist/validation/validate-offthreadvideo-image-format.d.ts +1 -0
- package/dist/validation/validate-offthreadvideo-image-format.js +15 -0
- package/dist/validation/validation-spring-duration.d.ts +1 -0
- package/dist/validation/validation-spring-duration.js +21 -0
- package/dist/video/OffthreadVideo.d.ts +3 -0
- package/dist/video/OffthreadVideo.js +27 -0
- package/dist/video/OffthreadVideoForRendering.d.ts +3 -0
- package/dist/video/OffthreadVideoForRendering.js +98 -0
- package/dist/video/Video.d.ts +2 -2
- package/dist/video/Video.js +4 -4
- package/dist/video/VideoForDevelopment.d.ts +6 -2
- package/dist/video/VideoForDevelopment.js +23 -2
- package/dist/video/VideoForRendering.d.ts +2 -2
- package/dist/video/VideoForRendering.js +47 -24
- package/dist/video/get-current-time.d.ts +7 -1
- package/dist/video/get-current-time.js +17 -9
- package/dist/video/index.d.ts +3 -2
- package/dist/video/index.js +5 -12
- package/dist/video/props.d.ts +13 -2
- package/dist/volume-prop.js +1 -1
- package/dist/warn-about-non-seekable-media.d.ts +1 -1
- package/dist/warn-about-non-seekable-media.js +14 -2
- package/dist/wrap-remotion-context.d.ts +2 -1
- package/dist/wrap-remotion-context.js +12 -4
- package/package.json +8 -9
- package/.turbo/turbo-lint.log +0 -11
- package/.turbo/turbo-test.log +0 -78
- package/dist/AbsoluteFill.d.ts.map +0 -1
- package/dist/AbsoluteFill.js.map +0 -1
- package/dist/Composition.d.ts.map +0 -1
- package/dist/Composition.js.map +0 -1
- package/dist/CompositionManager.d.ts.map +0 -1
- package/dist/CompositionManager.js.map +0 -1
- package/dist/IFrame.d.ts.map +0 -1
- package/dist/IFrame.js.map +0 -1
- package/dist/Img.d.ts.map +0 -1
- package/dist/Img.js.map +0 -1
- package/dist/RemotionRoot.d.ts.map +0 -1
- package/dist/RemotionRoot.js.map +0 -1
- package/dist/Still.d.ts.map +0 -1
- package/dist/Still.js.map +0 -1
- package/dist/absolute-src.d.ts.map +0 -1
- package/dist/absolute-src.js.map +0 -1
- package/dist/asset-types.d.ts.map +0 -1
- package/dist/asset-types.js.map +0 -1
- package/dist/audio/Audio.d.ts.map +0 -1
- package/dist/audio/Audio.js.map +0 -1
- package/dist/audio/AudioForDevelopment.d.ts.map +0 -1
- package/dist/audio/AudioForDevelopment.js.map +0 -1
- package/dist/audio/AudioForRendering.d.ts.map +0 -1
- package/dist/audio/AudioForRendering.js.map +0 -1
- package/dist/audio/index.d.ts.map +0 -1
- package/dist/audio/index.js.map +0 -1
- package/dist/audio/props.d.ts.map +0 -1
- package/dist/audio/props.js.map +0 -1
- package/dist/audio/shared-audio-tags.d.ts.map +0 -1
- package/dist/audio/shared-audio-tags.js.map +0 -1
- package/dist/audio/use-audio-frame.d.ts.map +0 -1
- package/dist/audio/use-audio-frame.js.map +0 -1
- package/dist/bezier.d.ts.map +0 -1
- package/dist/bezier.js.map +0 -1
- package/dist/compress-assets.d.ts +0 -7
- package/dist/compress-assets.d.ts.map +0 -1
- package/dist/compress-assets.js +0 -25
- package/dist/compress-assets.js.map +0 -1
- package/dist/config/browser-executable.d.ts +0 -3
- package/dist/config/browser-executable.d.ts.map +0 -1
- package/dist/config/browser-executable.js +0 -12
- package/dist/config/browser-executable.js.map +0 -1
- package/dist/config/browser.d.ts +0 -4
- package/dist/config/browser.d.ts.map +0 -1
- package/dist/config/browser.js +0 -19
- package/dist/config/browser.js.map +0 -1
- package/dist/config/chromium-flags.d.ts +0 -10
- package/dist/config/chromium-flags.d.ts.map +0 -1
- package/dist/config/chromium-flags.js +0 -34
- package/dist/config/chromium-flags.js.map +0 -1
- package/dist/config/codec.d.ts +0 -17
- package/dist/config/codec.d.ts.map +0 -1
- package/dist/config/codec.js +0 -103
- package/dist/config/codec.js.map +0 -1
- package/dist/config/concurrency.d.ts +0 -3
- package/dist/config/concurrency.d.ts.map +0 -1
- package/dist/config/concurrency.js +0 -15
- package/dist/config/concurrency.js.map +0 -1
- package/dist/config/crf.d.ts +0 -9
- package/dist/config/crf.d.ts.map +0 -1
- package/dist/config/crf.js +0 -83
- package/dist/config/crf.js.map +0 -1
- package/dist/config/env-file.d.ts +0 -2
- package/dist/config/env-file.d.ts.map +0 -1
- package/dist/config/env-file.js +0 -10
- package/dist/config/env-file.js.map +0 -1
- package/dist/config/ffmpeg-executable.d.ts +0 -3
- package/dist/config/ffmpeg-executable.d.ts.map +0 -1
- package/dist/config/ffmpeg-executable.js +0 -12
- package/dist/config/ffmpeg-executable.js.map +0 -1
- package/dist/config/frame-range.d.ts +0 -5
- package/dist/config/frame-range.d.ts.map +0 -1
- package/dist/config/frame-range.js +0 -80
- package/dist/config/frame-range.js.map +0 -1
- package/dist/config/image-format.d.ts +0 -8
- package/dist/config/image-format.d.ts.map +0 -1
- package/dist/config/image-format.js +0 -37
- package/dist/config/image-format.js.map +0 -1
- package/dist/config/image-sequence.d.ts +0 -3
- package/dist/config/image-sequence.d.ts.map +0 -1
- package/dist/config/image-sequence.js +0 -15
- package/dist/config/image-sequence.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js +0 -175
- package/dist/config/index.js.map +0 -1
- package/dist/config/input-props.d.ts.map +0 -1
- package/dist/config/input-props.js.map +0 -1
- package/dist/config/log.d.ts +0 -7
- package/dist/config/log.d.ts.map +0 -1
- package/dist/config/log.js +0 -25
- package/dist/config/log.js.map +0 -1
- package/dist/config/max-timeline-tracks.d.ts +0 -2
- package/dist/config/max-timeline-tracks.d.ts.map +0 -1
- package/dist/config/max-timeline-tracks.js +0 -24
- package/dist/config/max-timeline-tracks.js.map +0 -1
- package/dist/config/override-webpack.d.ts +0 -12
- package/dist/config/override-webpack.d.ts.map +0 -1
- package/dist/config/override-webpack.js +0 -14
- package/dist/config/override-webpack.js.map +0 -1
- package/dist/config/overwrite.d.ts +0 -3
- package/dist/config/overwrite.d.ts.map +0 -1
- package/dist/config/overwrite.js +0 -14
- package/dist/config/overwrite.js.map +0 -1
- package/dist/config/pixel-format.d.ts +0 -8
- package/dist/config/pixel-format.d.ts.map +0 -1
- package/dist/config/pixel-format.js +0 -38
- package/dist/config/pixel-format.js.map +0 -1
- package/dist/config/preview-server.d.ts +0 -2
- package/dist/config/preview-server.d.ts.map +0 -1
- package/dist/config/preview-server.js +0 -20
- package/dist/config/preview-server.js.map +0 -1
- package/dist/config/prores-profile.d.ts +0 -7
- package/dist/config/prores-profile.d.ts.map +0 -1
- package/dist/config/prores-profile.js +0 -32
- package/dist/config/prores-profile.js.map +0 -1
- package/dist/config/quality.d.ts +0 -2
- package/dist/config/quality.d.ts.map +0 -1
- package/dist/config/quality.js +0 -17
- package/dist/config/quality.js.map +0 -1
- package/dist/config/scale.d.ts +0 -3
- package/dist/config/scale.d.ts.map +0 -1
- package/dist/config/scale.js +0 -15
- package/dist/config/scale.js.map +0 -1
- package/dist/config/still-frame.d.ts +0 -2
- package/dist/config/still-frame.d.ts.map +0 -1
- package/dist/config/still-frame.js +0 -12
- package/dist/config/still-frame.js.map +0 -1
- package/dist/config/timeout.d.ts +0 -2
- package/dist/config/timeout.d.ts.map +0 -1
- package/dist/config/timeout.js +0 -17
- package/dist/config/timeout.js.map +0 -1
- package/dist/config/webpack-caching.d.ts +0 -3
- package/dist/config/webpack-caching.d.ts.map +0 -1
- package/dist/config/webpack-caching.js +0 -16
- package/dist/config/webpack-caching.js.map +0 -1
- package/dist/default-css.d.ts.map +0 -1
- package/dist/default-css.js.map +0 -1
- package/dist/delay-render.d.ts.map +0 -1
- package/dist/delay-render.js.map +0 -1
- package/dist/easing.d.ts.map +0 -1
- package/dist/easing.js.map +0 -1
- package/dist/feature-flags.d.ts +0 -1
- package/dist/feature-flags.d.ts.map +0 -1
- package/dist/feature-flags.js +0 -7
- package/dist/feature-flags.js.map +0 -1
- package/dist/freeze.d.ts.map +0 -1
- package/dist/freeze.js.map +0 -1
- package/dist/get-asset-file-name.d.ts.map +0 -1
- package/dist/get-asset-file-name.js.map +0 -1
- package/dist/get-environment.d.ts.map +0 -1
- package/dist/get-environment.js.map +0 -1
- package/dist/get-preview-dom-element.d.ts.map +0 -1
- package/dist/get-preview-dom-element.js.map +0 -1
- package/dist/get-timeline-clip-name.d.ts.map +0 -1
- package/dist/get-timeline-clip-name.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/initial-frame.d.ts +0 -2
- package/dist/initial-frame.d.ts.map +0 -1
- package/dist/initial-frame.js +0 -12
- package/dist/initial-frame.js.map +0 -1
- package/dist/internals.d.ts.map +0 -1
- package/dist/internals.js.map +0 -1
- package/dist/interpolate.d.ts.map +0 -1
- package/dist/interpolate.js.map +0 -1
- package/dist/interpolateColors.d.ts.map +0 -1
- package/dist/interpolateColors.js.map +0 -1
- package/dist/is-approximately-the-same.d.ts.map +0 -1
- package/dist/is-approximately-the-same.js.map +0 -1
- package/dist/is-audio-codec.d.ts +0 -2
- package/dist/is-audio-codec.d.ts.map +0 -1
- package/dist/is-audio-codec.js +0 -7
- package/dist/is-audio-codec.js.map +0 -1
- package/dist/loop/index.d.ts.map +0 -1
- package/dist/loop/index.js.map +0 -1
- package/dist/multiple-versions-warning.d.ts.map +0 -1
- package/dist/multiple-versions-warning.js.map +0 -1
- package/dist/nonce.d.ts.map +0 -1
- package/dist/nonce.js.map +0 -1
- package/dist/perf/index.d.ts +0 -5
- package/dist/perf/index.d.ts.map +0 -1
- package/dist/perf/index.js +0 -33
- package/dist/perf/index.js.map +0 -1
- package/dist/play-and-handle-not-allowed-error.d.ts.map +0 -1
- package/dist/play-and-handle-not-allowed-error.js.map +0 -1
- package/dist/random.d.ts.map +0 -1
- package/dist/random.js.map +0 -1
- package/dist/register-root.d.ts.map +0 -1
- package/dist/register-root.js.map +0 -1
- package/dist/sequencing/index.d.ts.map +0 -1
- package/dist/sequencing/index.js.map +0 -1
- package/dist/series/flatten-children.d.ts.map +0 -1
- package/dist/series/flatten-children.js.map +0 -1
- package/dist/series/index.d.ts.map +0 -1
- package/dist/series/index.js.map +0 -1
- package/dist/setup-env-variables.d.ts.map +0 -1
- package/dist/setup-env-variables.js.map +0 -1
- package/dist/spring/index.d.ts.map +0 -1
- package/dist/spring/index.js.map +0 -1
- package/dist/spring/measure-spring.d.ts.map +0 -1
- package/dist/spring/measure-spring.js.map +0 -1
- package/dist/spring/spring-utils.d.ts.map +0 -1
- package/dist/spring/spring-utils.js.map +0 -1
- package/dist/static-file.d.ts.map +0 -1
- package/dist/static-file.js.map +0 -1
- package/dist/timeline-inout-position-state.d.ts +0 -12
- package/dist/timeline-inout-position-state.d.ts.map +0 -1
- package/dist/timeline-inout-position-state.js +0 -23
- package/dist/timeline-inout-position-state.js.map +0 -1
- package/dist/timeline-position-state.d.ts.map +0 -1
- package/dist/timeline-position-state.js.map +0 -1
- package/dist/timeout.d.ts +0 -2
- package/dist/timeout.d.ts.map +0 -1
- package/dist/timeout.js +0 -12
- package/dist/timeout.js.map +0 -1
- package/dist/truthy.d.ts.map +0 -1
- package/dist/truthy.js.map +0 -1
- package/dist/use-frame.d.ts.map +0 -1
- package/dist/use-frame.js.map +0 -1
- package/dist/use-lazy-component.d.ts.map +0 -1
- package/dist/use-lazy-component.js.map +0 -1
- package/dist/use-media-in-timeline.d.ts.map +0 -1
- package/dist/use-media-in-timeline.js.map +0 -1
- package/dist/use-media-playback.d.ts.map +0 -1
- package/dist/use-media-playback.js.map +0 -1
- package/dist/use-media-tag-volume.d.ts.map +0 -1
- package/dist/use-media-tag-volume.js.map +0 -1
- package/dist/use-sync-volume-with-media-tag.d.ts.map +0 -1
- package/dist/use-sync-volume-with-media-tag.js.map +0 -1
- package/dist/use-unsafe-video-config.d.ts.map +0 -1
- package/dist/use-unsafe-video-config.js.map +0 -1
- package/dist/use-video-config.d.ts.map +0 -1
- package/dist/use-video-config.js.map +0 -1
- package/dist/use-video.d.ts.map +0 -1
- package/dist/use-video.js.map +0 -1
- package/dist/validate-media-props.d.ts.map +0 -1
- package/dist/validate-media-props.js.map +0 -1
- package/dist/validate-start-from-props.d.ts.map +0 -1
- package/dist/validate-start-from-props.js.map +0 -1
- package/dist/validation/validate-composition-id.d.ts.map +0 -1
- package/dist/validation/validate-composition-id.js.map +0 -1
- package/dist/validation/validate-dimensions.d.ts.map +0 -1
- package/dist/validation/validate-dimensions.js.map +0 -1
- package/dist/validation/validate-duration-in-frames.d.ts.map +0 -1
- package/dist/validation/validate-duration-in-frames.js.map +0 -1
- package/dist/validation/validate-folder-name.d.ts.map +0 -1
- package/dist/validation/validate-folder-name.js.map +0 -1
- package/dist/validation/validate-fps.d.ts.map +0 -1
- package/dist/validation/validate-fps.js.map +0 -1
- package/dist/validation/validate-frame.d.ts +0 -1
- package/dist/validation/validate-frame.d.ts.map +0 -1
- package/dist/validation/validate-frame.js +0 -24
- package/dist/validation/validate-frame.js.map +0 -1
- package/dist/validation/validate-image-format.d.ts +0 -2
- package/dist/validation/validate-image-format.d.ts.map +0 -1
- package/dist/validation/validate-image-format.js +0 -9
- package/dist/validation/validate-image-format.js.map +0 -1
- package/dist/validation/validate-opengl-renderer.d.ts +0 -4
- package/dist/validation/validate-opengl-renderer.d.ts.map +0 -1
- package/dist/validation/validate-opengl-renderer.js +0 -14
- package/dist/validation/validate-opengl-renderer.js.map +0 -1
- package/dist/validation/validate-quality.d.ts +0 -1
- package/dist/validation/validate-quality.d.ts.map +0 -1
- package/dist/validation/validate-quality.js +0 -21
- package/dist/validation/validate-quality.js.map +0 -1
- package/dist/video/Video.d.ts.map +0 -1
- package/dist/video/Video.js.map +0 -1
- package/dist/video/VideoForDevelopment.d.ts.map +0 -1
- package/dist/video/VideoForDevelopment.js.map +0 -1
- package/dist/video/VideoForRendering.d.ts.map +0 -1
- package/dist/video/VideoForRendering.js.map +0 -1
- package/dist/video/get-current-time.d.ts.map +0 -1
- package/dist/video/get-current-time.js.map +0 -1
- package/dist/video/index.d.ts.map +0 -1
- package/dist/video/index.js.map +0 -1
- package/dist/video/props.d.ts.map +0 -1
- package/dist/video/props.js.map +0 -1
- package/dist/video-config.d.ts.map +0 -1
- package/dist/video-config.js.map +0 -1
- package/dist/volume-position-state.d.ts.map +0 -1
- package/dist/volume-position-state.js.map +0 -1
- package/dist/volume-prop.d.ts.map +0 -1
- package/dist/volume-prop.js.map +0 -1
- package/dist/warn-about-non-seekable-media.d.ts.map +0 -1
- package/dist/warn-about-non-seekable-media.js.map +0 -1
- package/dist/wrap-remotion-context.d.ts.map +0 -1
- package/dist/wrap-remotion-context.js.map +0 -1
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Loading = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const AbsoluteFill_1 = require("./AbsoluteFill");
|
|
6
|
+
const rotate = {
|
|
7
|
+
transform: `rotate(90deg)`,
|
|
8
|
+
};
|
|
9
|
+
const ICON_SIZE = 40;
|
|
10
|
+
const label = {
|
|
11
|
+
color: '#555',
|
|
12
|
+
fontSize: 14,
|
|
13
|
+
fontFamily: 'sans-serif',
|
|
14
|
+
};
|
|
15
|
+
const container = {
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
};
|
|
19
|
+
const Loading = () => {
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(AbsoluteFill_1.AbsoluteFill, { style: container, id: "remotion-comp-loading", children: [(0, jsx_runtime_1.jsx)("style", { type: "text/css", children: `
|
|
21
|
+
@keyframes anim {
|
|
22
|
+
from {
|
|
23
|
+
opacity: 0
|
|
24
|
+
}
|
|
25
|
+
to {
|
|
26
|
+
opacity: 1
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
#remotion-comp-loading {
|
|
30
|
+
animation: anim 2s;
|
|
31
|
+
animation-fill-mode: forwards;
|
|
32
|
+
}
|
|
33
|
+
` }), (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#555", stroke: "#555", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }), (0, jsx_runtime_1.jsx)("p", { style: label, children: "Loading..." })] }));
|
|
34
|
+
};
|
|
35
|
+
exports.Loading = Loading;
|
package/dist/loop/index.js
CHANGED
|
@@ -22,6 +22,6 @@ const Loop = ({ durationInFrames, times = Infinity, children, layout, name, }) =
|
|
|
22
22
|
return ((0, jsx_runtime_1.jsx)(__1.Sequence
|
|
23
23
|
// eslint-disable-next-line react/no-array-index-key
|
|
24
24
|
, { durationInFrames: durationInFrames, from: i * durationInFrames, layout: layout, name: name, showLoopTimesInTimeline: actualTimes, showInTimeline: i === 0, children: children }, `loop-${i}`));
|
|
25
|
-
}) }
|
|
25
|
+
}) }));
|
|
26
26
|
};
|
|
27
27
|
exports.Loop = Loop;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
export declare const playAndHandleNotAllowedError: (mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>, mediaType: 'audio' | 'video') => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const portalNode: () => HTMLElement;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.portalNode = void 0;
|
|
4
|
+
let _portalNode = null;
|
|
5
|
+
const portalNode = () => {
|
|
6
|
+
if (!_portalNode) {
|
|
7
|
+
if (typeof document === 'undefined') {
|
|
8
|
+
throw new Error('Tried to call an API that only works in the browser from outside the browser');
|
|
9
|
+
}
|
|
10
|
+
_portalNode = document.createElement('div');
|
|
11
|
+
_portalNode.style.position = 'absolute';
|
|
12
|
+
_portalNode.style.top = '0px';
|
|
13
|
+
_portalNode.style.left = '0px';
|
|
14
|
+
_portalNode.style.right = '0px';
|
|
15
|
+
_portalNode.style.bottom = '0px';
|
|
16
|
+
_portalNode.style.width = '100%';
|
|
17
|
+
_portalNode.style.height = '100%';
|
|
18
|
+
_portalNode.style.display = 'flex';
|
|
19
|
+
_portalNode.style.flexDirection = 'column';
|
|
20
|
+
}
|
|
21
|
+
return _portalNode;
|
|
22
|
+
};
|
|
23
|
+
exports.portalNode = portalNode;
|
package/dist/register-root.d.ts
CHANGED
package/dist/register-root.js
CHANGED
|
@@ -1,15 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getRoot = exports.registerRoot = void 0;
|
|
4
|
-
let
|
|
3
|
+
exports.waitForRoot = exports.getRoot = exports.registerRoot = void 0;
|
|
4
|
+
let Root = null;
|
|
5
|
+
let listeners = [];
|
|
5
6
|
const registerRoot = (comp) => {
|
|
6
|
-
if (
|
|
7
|
+
if (Root) {
|
|
7
8
|
throw new Error('registerRoot() was called more than once.');
|
|
8
9
|
}
|
|
9
|
-
|
|
10
|
+
Root = comp;
|
|
11
|
+
listeners.forEach((l) => {
|
|
12
|
+
l(comp);
|
|
13
|
+
});
|
|
10
14
|
};
|
|
11
15
|
exports.registerRoot = registerRoot;
|
|
12
16
|
const getRoot = () => {
|
|
13
|
-
return
|
|
17
|
+
return Root;
|
|
14
18
|
};
|
|
15
19
|
exports.getRoot = getRoot;
|
|
20
|
+
const waitForRoot = (fn) => {
|
|
21
|
+
if (Root) {
|
|
22
|
+
fn(Root);
|
|
23
|
+
return () => undefined;
|
|
24
|
+
}
|
|
25
|
+
listeners.push(fn);
|
|
26
|
+
return () => {
|
|
27
|
+
listeners = listeners.filter((l) => l !== fn);
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.waitForRoot = waitForRoot;
|
package/dist/series/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
import { SequenceProps } from '../
|
|
1
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
2
|
+
import type { SequenceProps } from '../Sequence';
|
|
3
3
|
declare type SeriesSequenceProps = PropsWithChildren<{
|
|
4
4
|
durationInFrames: number;
|
|
5
5
|
offset?: number;
|
package/dist/series/index.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Series = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const Sequence_1 = require("../Sequence");
|
|
7
7
|
const validate_duration_in_frames_1 = require("../validation/validate-duration-in-frames");
|
|
8
8
|
const flatten_children_1 = require("./flatten-children");
|
|
9
9
|
const SeriesSequence = ({ children }) => {
|
|
10
10
|
// eslint-disable-next-line react/jsx-no-useless-fragment
|
|
11
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children }
|
|
11
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
12
12
|
};
|
|
13
13
|
const Series = ({ children }) => {
|
|
14
14
|
const childrenValue = (0, react_1.useMemo)(() => {
|
|
@@ -45,11 +45,11 @@ const Series = ({ children }) => {
|
|
|
45
45
|
}
|
|
46
46
|
const currentStartFrame = startFrame + offset;
|
|
47
47
|
startFrame += durationInFramesProp + offset;
|
|
48
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
48
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { from: currentStartFrame, durationInFrames: durationInFramesProp, ...passedProps, children: child }));
|
|
49
49
|
});
|
|
50
50
|
}, [children]);
|
|
51
51
|
/* eslint-disable react/jsx-no-useless-fragment */
|
|
52
|
-
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: childrenValue }
|
|
52
|
+
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: childrenValue });
|
|
53
53
|
};
|
|
54
54
|
exports.Series = Series;
|
|
55
55
|
Series.Sequence = SeriesSequence;
|
package/dist/spring/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpringConfig } from './spring-utils';
|
|
1
|
+
import type { SpringConfig } from './spring-utils';
|
|
2
2
|
/**
|
|
3
3
|
* Calculates a position based on physical parameters, start and end value, and time.
|
|
4
4
|
* @link https://www.remotion.dev/docs/spring
|
|
@@ -9,15 +9,19 @@ import { SpringConfig } from './spring-utils';
|
|
|
9
9
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
10
10
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
11
11
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
12
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
13
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
12
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
13
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
14
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
15
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
14
16
|
*/
|
|
15
|
-
export declare function spring({ frame, fps, config, from, to, }: {
|
|
17
|
+
export declare function spring({ frame, fps, config, from, to, durationInFrames, durationRestThreshold, }: {
|
|
16
18
|
frame: number;
|
|
17
19
|
fps: number;
|
|
18
20
|
config?: Partial<SpringConfig>;
|
|
19
21
|
from?: number;
|
|
20
22
|
to?: number;
|
|
23
|
+
durationInFrames?: number;
|
|
24
|
+
durationRestThreshold?: number;
|
|
21
25
|
}): number;
|
|
22
26
|
export { measureSpring } from './measure-spring';
|
|
23
27
|
export { SpringConfig } from './spring-utils';
|
package/dist/spring/index.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.measureSpring = exports.spring = void 0;
|
|
4
|
+
const validation_spring_duration_1 = require("../validation/validation-spring-duration");
|
|
5
|
+
const measure_spring_1 = require("./measure-spring");
|
|
4
6
|
const spring_utils_1 = require("./spring-utils");
|
|
5
7
|
/**
|
|
6
8
|
* Calculates a position based on physical parameters, start and end value, and time.
|
|
@@ -12,13 +14,26 @@ const spring_utils_1 = require("./spring-utils");
|
|
|
12
14
|
* @param {number} [config.damping=10] How hard the animation decelerates.
|
|
13
15
|
* @param {number} [config.stiffness=100] Affects bounciness of the animation.
|
|
14
16
|
* @param {boolean} [config.overshootClamping=false] Whether to prevent the animation going beyond the target value.
|
|
15
|
-
* @param {?number} from The initial value of the animation. Default `0`
|
|
16
|
-
* @param {?number} to The end value of the animation. Default `1`
|
|
17
|
+
* @param {?number} [config.from] The initial value of the animation. Default `0`
|
|
18
|
+
* @param {?number} [config.to] The end value of the animation. Default `1`
|
|
19
|
+
* @param {?number} [config.durationInFrames] Stretch the duration of an animation to a set value.. Default `undefined`
|
|
20
|
+
* @param {?number} [config.durationThreshold] How close to the end the animation is considered to be done. Default `0.005`
|
|
17
21
|
*/
|
|
18
|
-
function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
22
|
+
function spring({ frame, fps, config = {}, from = 0, to = 1, durationInFrames, durationRestThreshold, }) {
|
|
23
|
+
(0, validation_spring_duration_1.validateSpringDuration)(durationInFrames);
|
|
24
|
+
const durationRatio = durationInFrames === undefined
|
|
25
|
+
? 1
|
|
26
|
+
: durationInFrames /
|
|
27
|
+
(0, measure_spring_1.measureSpring)({
|
|
28
|
+
fps,
|
|
29
|
+
config,
|
|
30
|
+
from,
|
|
31
|
+
to,
|
|
32
|
+
threshold: durationRestThreshold,
|
|
33
|
+
});
|
|
19
34
|
const spr = (0, spring_utils_1.springCalculation)({
|
|
20
35
|
fps,
|
|
21
|
-
frame,
|
|
36
|
+
frame: frame / durationRatio,
|
|
22
37
|
config,
|
|
23
38
|
from,
|
|
24
39
|
to,
|
|
@@ -32,5 +47,5 @@ function spring({ frame, fps, config = {}, from = 0, to = 1, }) {
|
|
|
32
47
|
return Math.max(spr.current, to);
|
|
33
48
|
}
|
|
34
49
|
exports.spring = spring;
|
|
35
|
-
var
|
|
36
|
-
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return
|
|
50
|
+
var measure_spring_2 = require("./measure-spring");
|
|
51
|
+
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return measure_spring_2.measureSpring; } });
|
|
@@ -22,7 +22,7 @@ function measureSpring({ fps, config = {}, threshold = 0.005, from = 0, to = 1,
|
|
|
22
22
|
if (threshold < 0) {
|
|
23
23
|
throw new TypeError('Threshold is below 0');
|
|
24
24
|
}
|
|
25
|
-
(0, validate_fps_1.validateFps)(fps, 'to the measureSpring() function');
|
|
25
|
+
(0, validate_fps_1.validateFps)(fps, 'to the measureSpring() function', false);
|
|
26
26
|
const range = Math.abs(from - to);
|
|
27
27
|
let frame = 0;
|
|
28
28
|
let finishedFrame = 0;
|
package/dist/static-file.js
CHANGED
|
@@ -14,6 +14,12 @@ const inner = (path) => {
|
|
|
14
14
|
return `/${trimLeadingSlash(path)}`;
|
|
15
15
|
};
|
|
16
16
|
const staticFile = (path) => {
|
|
17
|
+
if (path.startsWith('http://') || path.startsWith('https://')) {
|
|
18
|
+
throw new TypeError(`staticFile() does not support remote URLs - got "${path}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);
|
|
19
|
+
}
|
|
20
|
+
if (path.startsWith('..') || path.startsWith('./')) {
|
|
21
|
+
throw new TypeError(`staticFile() does not support relative paths - got "${path}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);
|
|
22
|
+
}
|
|
17
23
|
const preparsed = inner(path);
|
|
18
24
|
if (!preparsed.startsWith('/')) {
|
|
19
25
|
return `/${preparsed}`;
|
|
File without changes
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useCurrentFrame = exports.useAbsoluteCurrentFrame = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const CanUseRemotionHooks_1 = require("./CanUseRemotionHooks");
|
|
6
|
+
const Sequence_1 = require("./Sequence");
|
|
6
7
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
7
8
|
const useAbsoluteCurrentFrame = () => {
|
|
8
9
|
const timelinePosition = (0, timeline_position_state_1.useTimelinePosition)();
|
|
@@ -15,8 +16,15 @@ exports.useAbsoluteCurrentFrame = useAbsoluteCurrentFrame;
|
|
|
15
16
|
* @link https://www.remotion.dev/docs/use-current-frame
|
|
16
17
|
*/
|
|
17
18
|
const useCurrentFrame = () => {
|
|
19
|
+
const canUseRemotionHooks = (0, react_1.useContext)(CanUseRemotionHooks_1.CanUseRemotionHooks);
|
|
20
|
+
if (!canUseRemotionHooks) {
|
|
21
|
+
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
22
|
+
throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);
|
|
23
|
+
}
|
|
24
|
+
throw new Error(`useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions`);
|
|
25
|
+
}
|
|
18
26
|
const frame = (0, exports.useAbsoluteCurrentFrame)();
|
|
19
|
-
const context = (0, react_1.useContext)(
|
|
27
|
+
const context = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
20
28
|
const contextOffset = context
|
|
21
29
|
? context.cumulatedFrom + context.relativeFrom
|
|
22
30
|
: 0;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CompProps } from './internals';
|
|
1
|
+
import type { ComponentPropsWithRef, ComponentType, ExoticComponent } from 'react';
|
|
2
|
+
import type { CompProps } from './internals';
|
|
3
3
|
declare type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
|
|
4
4
|
readonly _result: T;
|
|
5
5
|
};
|
|
6
|
-
export declare const useLazyComponent: <T>(compProps: CompProps<T>) => LazyExoticComponent<
|
|
6
|
+
export declare const useLazyComponent: <T>(compProps: CompProps<T>) => LazyExoticComponent<ComponentType<T>>;
|
|
7
7
|
export {};
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { VolumeProp } from './volume-prop';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { VolumeProp } from './volume-prop';
|
|
3
3
|
export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src, mediaType, }: {
|
|
4
4
|
volume: VolumeProp | undefined;
|
|
5
5
|
mediaVolume: number;
|
|
@@ -7,7 +7,7 @@ const CompositionManager_1 = require("./CompositionManager");
|
|
|
7
7
|
const get_asset_file_name_1 = require("./get-asset-file-name");
|
|
8
8
|
const nonce_1 = require("./nonce");
|
|
9
9
|
const play_and_handle_not_allowed_error_1 = require("./play-and-handle-not-allowed-error");
|
|
10
|
-
const
|
|
10
|
+
const Sequence_1 = require("./Sequence");
|
|
11
11
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
12
12
|
const use_video_config_1 = require("./use-video-config");
|
|
13
13
|
const volume_prop_1 = require("./volume-prop");
|
|
@@ -22,7 +22,7 @@ const warnOnce = (message) => {
|
|
|
22
22
|
const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, }) => {
|
|
23
23
|
const videoConfig = (0, use_video_config_1.useVideoConfig)();
|
|
24
24
|
const { rootId, audioAndVideoTags } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
25
|
-
const parentSequence = (0, react_1.useContext)(
|
|
25
|
+
const parentSequence = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
26
26
|
const actualFrom = parentSequence
|
|
27
27
|
? parentSequence.relativeFrom + parentSequence.cumulatedFrom
|
|
28
28
|
: 0;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
export declare const useMediaPlayback: ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, }: {
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export declare const useMediaPlayback: ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, onlyWarnForMediaSeekingError, }: {
|
|
3
3
|
mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>;
|
|
4
4
|
src: string | undefined;
|
|
5
5
|
mediaType: 'audio' | 'video';
|
|
6
6
|
playbackRate: number;
|
|
7
|
+
onlyWarnForMediaSeekingError: boolean;
|
|
7
8
|
}) => void;
|
|
@@ -5,14 +5,14 @@ const react_1 = require("react");
|
|
|
5
5
|
const use_audio_frame_1 = require("./audio/use-audio-frame");
|
|
6
6
|
const play_and_handle_not_allowed_error_1 = require("./play-and-handle-not-allowed-error");
|
|
7
7
|
const timeline_position_state_1 = require("./timeline-position-state");
|
|
8
|
-
const
|
|
8
|
+
const use_current_frame_1 = require("./use-current-frame");
|
|
9
9
|
const use_video_config_1 = require("./use-video-config");
|
|
10
10
|
const get_current_time_1 = require("./video/get-current-time");
|
|
11
11
|
const warn_about_non_seekable_media_1 = require("./warn-about-non-seekable-media");
|
|
12
|
-
const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, }) => {
|
|
12
|
+
const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, onlyWarnForMediaSeekingError, }) => {
|
|
13
13
|
const { playbackRate: globalPlaybackRate } = (0, react_1.useContext)(timeline_position_state_1.TimelineContext);
|
|
14
|
-
const frame = (0,
|
|
15
|
-
const absoluteFrame = (0,
|
|
14
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
15
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
16
16
|
const [playing] = (0, timeline_position_state_1.usePlayingState)();
|
|
17
17
|
const { fps } = (0, use_video_config_1.useVideoConfig)();
|
|
18
18
|
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
@@ -38,15 +38,17 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
|
|
|
38
38
|
src,
|
|
39
39
|
playbackRate: localPlaybackRate,
|
|
40
40
|
startFrom: -mediaStartsAt,
|
|
41
|
+
mediaType,
|
|
41
42
|
});
|
|
42
43
|
const isTime = mediaRef.current.currentTime;
|
|
43
44
|
const timeShift = Math.abs(shouldBeTime - isTime);
|
|
44
45
|
if (timeShift > 0.45 && !mediaRef.current.ended) {
|
|
45
|
-
console.log('Time has shifted by', timeShift, 'sec. Fixing...', `(isTime=${isTime},shouldBeTime=${shouldBeTime})`);
|
|
46
46
|
// If scrubbing around, adjust timing
|
|
47
47
|
// or if time shift is bigger than 0.2sec
|
|
48
48
|
mediaRef.current.currentTime = shouldBeTime;
|
|
49
|
-
|
|
49
|
+
if (!onlyWarnForMediaSeekingError) {
|
|
50
|
+
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(mediaRef.current, onlyWarnForMediaSeekingError ? 'console-warning' : 'console-error');
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
if (!playing || absoluteFrame === 0) {
|
|
52
54
|
mediaRef.current.currentTime = shouldBeTime;
|
|
@@ -67,6 +69,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
|
|
|
67
69
|
src,
|
|
68
70
|
mediaStartsAt,
|
|
69
71
|
localPlaybackRate,
|
|
72
|
+
onlyWarnForMediaSeekingError,
|
|
70
73
|
]);
|
|
71
74
|
};
|
|
72
75
|
exports.useMediaPlayback = useMediaPlayback;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
2
|
export declare const useMediaTagVolume: (mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>) => number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
2
|
-
import { VolumeProp } from './volume-prop';
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
import type { VolumeProp } from './volume-prop';
|
|
3
3
|
export declare type UseSyncVolumeWithMediaTagOptions = {
|
|
4
4
|
volumePropFrame: number;
|
|
5
5
|
actualVolume: number;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { VideoConfig } from './video-config';
|
|
1
|
+
import type { VideoConfig } from './video-config';
|
|
2
2
|
export declare const useUnsafeVideoConfig: () => VideoConfig | null;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useUnsafeVideoConfig = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const Sequence_1 = require("./Sequence");
|
|
6
6
|
const use_video_1 = require("./use-video");
|
|
7
7
|
const useUnsafeVideoConfig = () => {
|
|
8
8
|
var _a;
|
|
9
|
-
const context = (0, react_1.useContext)(
|
|
9
|
+
const context = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
10
10
|
const ctxDuration = (_a = context === null || context === void 0 ? void 0 : context.durationInFrames) !== null && _a !== void 0 ? _a : null;
|
|
11
11
|
const video = (0, use_video_1.useVideo)();
|
|
12
12
|
return (0, react_1.useMemo)(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VideoConfig } from './video-config';
|
|
1
|
+
import type { VideoConfig } from './video-config';
|
|
2
2
|
/**
|
|
3
3
|
* Get some info about the context of the video that you are making.
|
|
4
4
|
* Returns an object containing `fps`, `width`, `height` and `durationInFrames`, all of type `number`.
|
package/dist/use-video-config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useVideoConfig = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const CanUseRemotionHooks_1 = require("./CanUseRemotionHooks");
|
|
4
6
|
const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
5
7
|
/**
|
|
6
8
|
* Get some info about the context of the video that you are making.
|
|
@@ -9,12 +11,16 @@ const use_unsafe_video_config_1 = require("./use-unsafe-video-config");
|
|
|
9
11
|
*/
|
|
10
12
|
const useVideoConfig = () => {
|
|
11
13
|
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
14
|
+
const context = (0, react_1.useContext)(CanUseRemotionHooks_1.CanUseRemotionHooks);
|
|
12
15
|
if (!videoConfig) {
|
|
13
16
|
if (typeof window !== 'undefined' && window.remotion_isPlayer) {
|
|
14
17
|
throw new Error('No video config found. You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.');
|
|
15
18
|
}
|
|
16
19
|
throw new Error('No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.');
|
|
17
20
|
}
|
|
21
|
+
if (!context) {
|
|
22
|
+
throw new Error('Called useVideoConfig() outside a Remotion composition.');
|
|
23
|
+
}
|
|
18
24
|
return videoConfig;
|
|
19
25
|
};
|
|
20
26
|
exports.useVideoConfig = useVideoConfig;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { RemotionAudioProps } from './audio';
|
|
2
|
-
import { RemotionVideoProps } from './video';
|
|
3
|
-
|
|
1
|
+
import type { RemotionAudioProps } from './audio';
|
|
2
|
+
import type { RemotionVideoProps } from './video';
|
|
3
|
+
import type { OffthreadVideoProps } from './video/props';
|
|
4
|
+
export declare const validateMediaProps: (props: RemotionVideoProps | RemotionAudioProps | OffthreadVideoProps, component: 'Video' | 'Audio') => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const validateFps: (fps: number, location: string) => void;
|
|
1
|
+
export declare const validateFps: (fps: number, location: string, isGif: boolean) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateFps = void 0;
|
|
4
|
-
const validateFps = (fps, location) => {
|
|
4
|
+
const validateFps = (fps, location, isGif) => {
|
|
5
5
|
if (typeof fps !== 'number') {
|
|
6
6
|
throw new Error(`"fps" must be a number, but you passed a value of type ${typeof fps} ${location}`);
|
|
7
7
|
}
|
|
@@ -14,5 +14,8 @@ const validateFps = (fps, location) => {
|
|
|
14
14
|
if (fps <= 0) {
|
|
15
15
|
throw new TypeError(`"fps" must be positive, but got ${fps} ${location}`);
|
|
16
16
|
}
|
|
17
|
+
if (isGif && fps > 50) {
|
|
18
|
+
throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --skip-n-frames option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
|
|
19
|
+
}
|
|
17
20
|
};
|
|
18
21
|
exports.validateFps = validateFps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateOffthreadVideoImageFormat: (input: unknown) => void;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateOffthreadVideoImageFormat = void 0;
|
|
4
|
+
const validateOffthreadVideoImageFormat = (input) => {
|
|
5
|
+
if (typeof input === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof input !== 'string') {
|
|
9
|
+
throw new TypeError(`<OffthreadVideo imageFormat=""> must be a string, but got ${JSON.stringify(input)} instead.`);
|
|
10
|
+
}
|
|
11
|
+
if (input !== 'png' && input !== 'jpeg') {
|
|
12
|
+
throw new TypeError(`<OffthreadVideo imageFormat=""> must be either "png" or "jpeg", but got ${input}`);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
exports.validateOffthreadVideoImageFormat = validateOffthreadVideoImageFormat;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const validateSpringDuration: (dur: unknown) => void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateSpringDuration = void 0;
|
|
4
|
+
const validateSpringDuration = (dur) => {
|
|
5
|
+
if (typeof dur === 'undefined') {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
if (typeof dur !== 'number') {
|
|
9
|
+
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
10
|
+
}
|
|
11
|
+
if (Number.isNaN(dur)) {
|
|
12
|
+
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
13
|
+
}
|
|
14
|
+
if (!Number.isFinite(dur)) {
|
|
15
|
+
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
16
|
+
}
|
|
17
|
+
if (dur <= 0) {
|
|
18
|
+
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.validateSpringDuration = validateSpringDuration;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffthreadVideo = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const get_environment_1 = require("../get-environment");
|
|
6
|
+
const Sequence_1 = require("../Sequence");
|
|
7
|
+
const validate_media_props_1 = require("../validate-media-props");
|
|
8
|
+
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
9
|
+
const validate_offthreadvideo_image_format_1 = require("../validation/validate-offthreadvideo-image-format");
|
|
10
|
+
const OffthreadVideoForRendering_1 = require("./OffthreadVideoForRendering");
|
|
11
|
+
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
12
|
+
const OffthreadVideo = (props) => {
|
|
13
|
+
const { startFrom, endAt, ...otherProps } = props;
|
|
14
|
+
if (typeof startFrom !== 'undefined' || typeof endAt !== 'undefined') {
|
|
15
|
+
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
16
|
+
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
17
|
+
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(Sequence_1.Sequence, { layout: "none", from: 0 - startFromFrameNo, showInTimeline: false, durationInFrames: endAtFrameNo, children: (0, jsx_runtime_1.jsx)(exports.OffthreadVideo, { ...otherProps }) }));
|
|
19
|
+
}
|
|
20
|
+
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
21
|
+
(0, validate_offthreadvideo_image_format_1.validateOffthreadVideoImageFormat)(props.imageFormat);
|
|
22
|
+
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(OffthreadVideoForRendering_1.OffthreadVideoForRendering, { ...otherProps });
|
|
24
|
+
}
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: true, ...otherProps });
|
|
26
|
+
};
|
|
27
|
+
exports.OffthreadVideo = OffthreadVideo;
|