remotion 4.0.0-fastlambda.9 → 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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffthreadVideoForRendering = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const absolute_src_1 = require("../absolute-src");
|
|
7
|
+
const use_audio_frame_1 = require("../audio/use-audio-frame");
|
|
8
|
+
const CompositionManager_1 = require("../CompositionManager");
|
|
9
|
+
const default_css_1 = require("../default-css");
|
|
10
|
+
const Img_1 = require("../Img");
|
|
11
|
+
const internals_1 = require("../internals");
|
|
12
|
+
const random_1 = require("../random");
|
|
13
|
+
const Sequence_1 = require("../Sequence");
|
|
14
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
15
|
+
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
16
|
+
const volume_prop_1 = require("../volume-prop");
|
|
17
|
+
const get_current_time_1 = require("./get-current-time");
|
|
18
|
+
const DEFAULT_IMAGE_FORMAT = 'jpeg';
|
|
19
|
+
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, imageFormat, ...props }) => {
|
|
20
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
21
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
22
|
+
const volumePropsFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
23
|
+
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
24
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
25
|
+
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
26
|
+
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
27
|
+
if (!src) {
|
|
28
|
+
throw new TypeError('No `src` was passed to <OffthreadVideo>.');
|
|
29
|
+
}
|
|
30
|
+
// Generate a string that's as unique as possible for this asset
|
|
31
|
+
// but at the same time the same on all threads
|
|
32
|
+
const id = (0, react_1.useMemo)(() => `video-${(0, random_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}-muted:${muted}`, [
|
|
33
|
+
src,
|
|
34
|
+
muted,
|
|
35
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.cumulatedFrom,
|
|
36
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.relativeFrom,
|
|
37
|
+
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.durationInFrames,
|
|
38
|
+
]);
|
|
39
|
+
if (!videoConfig) {
|
|
40
|
+
throw new Error('No video config found');
|
|
41
|
+
}
|
|
42
|
+
const volume = (0, volume_prop_1.evaluateVolume)({
|
|
43
|
+
volume: volumeProp,
|
|
44
|
+
frame: volumePropsFrame,
|
|
45
|
+
mediaVolume: 1,
|
|
46
|
+
});
|
|
47
|
+
(0, react_1.useEffect)(() => {
|
|
48
|
+
if (!src) {
|
|
49
|
+
throw new Error('No src passed');
|
|
50
|
+
}
|
|
51
|
+
if (!window.remotion_videoEnabled) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
if (muted) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
registerAsset({
|
|
58
|
+
type: 'video',
|
|
59
|
+
src: (0, absolute_src_1.getAbsoluteSrc)(src),
|
|
60
|
+
id,
|
|
61
|
+
frame: absoluteFrame,
|
|
62
|
+
volume,
|
|
63
|
+
mediaFrame: frame,
|
|
64
|
+
playbackRate: playbackRate !== null && playbackRate !== void 0 ? playbackRate : 1,
|
|
65
|
+
});
|
|
66
|
+
return () => unregisterAsset(id);
|
|
67
|
+
}, [
|
|
68
|
+
muted,
|
|
69
|
+
src,
|
|
70
|
+
registerAsset,
|
|
71
|
+
id,
|
|
72
|
+
unregisterAsset,
|
|
73
|
+
volume,
|
|
74
|
+
frame,
|
|
75
|
+
absoluteFrame,
|
|
76
|
+
playbackRate,
|
|
77
|
+
]);
|
|
78
|
+
const currentTime = (0, react_1.useMemo)(() => {
|
|
79
|
+
return ((0, get_current_time_1.getExpectedMediaFrameUncorrected)({
|
|
80
|
+
frame,
|
|
81
|
+
playbackRate: playbackRate || 1,
|
|
82
|
+
startFrom: -mediaStartsAt,
|
|
83
|
+
}) / videoConfig.fps);
|
|
84
|
+
}, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);
|
|
85
|
+
const actualSrc = (0, react_1.useMemo)(() => {
|
|
86
|
+
return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent((0, absolute_src_1.getAbsoluteSrc)(src))}&time=${encodeURIComponent(currentTime)}&imageFormat=${imageFormat !== null && imageFormat !== void 0 ? imageFormat : DEFAULT_IMAGE_FORMAT}`;
|
|
87
|
+
}, [currentTime, imageFormat, src]);
|
|
88
|
+
const onErr = (0, react_1.useCallback)((e) => {
|
|
89
|
+
onError === null || onError === void 0 ? void 0 : onError(e);
|
|
90
|
+
}, [onError]);
|
|
91
|
+
const className = (0, react_1.useMemo)(() => {
|
|
92
|
+
return [default_css_1.OFFTHREAD_VIDEO_CLASS_NAME, props.className]
|
|
93
|
+
.filter(internals_1.Internals.truthy)
|
|
94
|
+
.join(' ');
|
|
95
|
+
}, [props.className]);
|
|
96
|
+
return ((0, jsx_runtime_1.jsx)(Img_1.Img, { src: actualSrc, className: className, ...props, onError: onErr }));
|
|
97
|
+
};
|
|
98
|
+
exports.OffthreadVideoForRendering = OffthreadVideoForRendering;
|
package/dist/video/Video.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionMainVideoProps } from './props';
|
|
2
|
+
import type { RemotionMainVideoProps } from './props';
|
|
3
3
|
export declare const Video: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
4
4
|
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
|
-
} & RemotionMainVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
6
|
+
} & RemotionMainVideoProps, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | keyof RemotionMainVideoProps> & React.RefAttributes<HTMLVideoElement>>;
|
package/dist/video/Video.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.Video = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const get_environment_1 = require("../get-environment");
|
|
7
|
-
const
|
|
7
|
+
const Sequence_1 = require("../Sequence");
|
|
8
8
|
const validate_media_props_1 = require("../validate-media-props");
|
|
9
9
|
const validate_start_from_props_1 = require("../validate-start-from-props");
|
|
10
10
|
const VideoForDevelopment_1 = require("./VideoForDevelopment");
|
|
@@ -18,12 +18,12 @@ const VideoForwardingFunction = (props, ref) => {
|
|
|
18
18
|
(0, validate_start_from_props_1.validateStartFromProps)(startFrom, endAt);
|
|
19
19
|
const startFromFrameNo = startFrom !== null && startFrom !== void 0 ? startFrom : 0;
|
|
20
20
|
const endAtFrameNo = endAt !== null && endAt !== void 0 ? endAt : Infinity;
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
21
|
+
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.Video, { ...otherProps, ref: ref }) }));
|
|
22
22
|
}
|
|
23
23
|
(0, validate_media_props_1.validateMediaProps)(props, 'Video');
|
|
24
24
|
if ((0, get_environment_1.getRemotionEnvironment)() === 'rendering') {
|
|
25
|
-
return (0, jsx_runtime_1.jsx)(VideoForRendering_1.VideoForRendering, { ...otherProps, ref: ref }
|
|
25
|
+
return (0, jsx_runtime_1.jsx)(VideoForRendering_1.VideoForRendering, { ...otherProps, ref: ref });
|
|
26
26
|
}
|
|
27
|
-
return (0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { ...otherProps, ref: ref }
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(VideoForDevelopment_1.VideoForDevelopment, { onlyWarnForMediaSeekingError: false, ...otherProps, ref: ref }));
|
|
28
28
|
};
|
|
29
29
|
exports.Video = (0, react_1.forwardRef)(VideoForwardingFunction);
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export declare const VideoForDevelopment: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "onEnded" | "autoPlay" | "controls" | "loop"> & {
|
|
3
|
+
volume?: import("../volume-prop").VolumeProp | undefined;
|
|
4
|
+
playbackRate?: number | undefined;
|
|
5
|
+
} & {
|
|
6
|
+
onlyWarnForMediaSeekingError: boolean;
|
|
7
|
+
}, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback" | "onlyWarnForMediaSeekingError"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -13,7 +13,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
13
13
|
var _a;
|
|
14
14
|
const videoRef = (0, react_1.useRef)(null);
|
|
15
15
|
const volumePropFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
16
|
-
const { volume, muted, playbackRate, ...nativeProps } = props;
|
|
16
|
+
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, ...nativeProps } = props;
|
|
17
17
|
const actualVolume = (0, use_media_tag_volume_1.useMediaTagVolume)(videoRef);
|
|
18
18
|
const [mediaVolume] = (0, volume_position_state_1.useMediaVolumeState)();
|
|
19
19
|
const [mediaMuted] = (0, volume_position_state_1.useMediaMutedState)();
|
|
@@ -36,10 +36,31 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
36
36
|
src: nativeProps.src,
|
|
37
37
|
mediaType: 'video',
|
|
38
38
|
playbackRate: (_a = props.playbackRate) !== null && _a !== void 0 ? _a : 1,
|
|
39
|
+
onlyWarnForMediaSeekingError,
|
|
39
40
|
});
|
|
40
41
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
41
42
|
return videoRef.current;
|
|
42
43
|
});
|
|
43
|
-
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
const { current } = videoRef;
|
|
46
|
+
if (!current) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const errorHandler = () => {
|
|
50
|
+
var _a;
|
|
51
|
+
if (current === null || current === void 0 ? void 0 : current.error) {
|
|
52
|
+
console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
|
|
53
|
+
throw new Error(`The browser threw an error while playing the video: Code ${current.error.code} - ${(_a = current === null || current === void 0 ? void 0 : current.error) === null || _a === void 0 ? void 0 : _a.message}. See https://remotion.dev/docs/media-playback-error for help`);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
throw new Error('The browser threw an error');
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
current.addEventListener('error', errorHandler, { once: true });
|
|
60
|
+
return () => {
|
|
61
|
+
current.removeEventListener('error', errorHandler);
|
|
62
|
+
};
|
|
63
|
+
}, []);
|
|
64
|
+
return ((0, jsx_runtime_1.jsx)("video", { ref: videoRef, muted: muted || mediaMuted, playsInline: true, ...nativeProps }));
|
|
44
65
|
};
|
|
45
66
|
exports.VideoForDevelopment = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RemotionVideoProps } from './props';
|
|
3
|
-
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
2
|
+
import type { RemotionVideoProps } from './props';
|
|
3
|
+
export declare const VideoForRendering: React.ForwardRefExoticComponent<Pick<RemotionVideoProps, "id" | "height" | "width" | "style" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "src" | "volume" | "playbackRate" | "controlsList" | "crossOrigin" | "mediaGroup" | "muted" | "playsInline" | "preload" | "key" | "poster" | "disablePictureInPicture" | "disableRemotePlayback"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -9,18 +9,19 @@ const CompositionManager_1 = require("../CompositionManager");
|
|
|
9
9
|
const delay_render_1 = require("../delay-render");
|
|
10
10
|
const is_approximately_the_same_1 = require("../is-approximately-the-same");
|
|
11
11
|
const random_1 = require("../random");
|
|
12
|
-
const
|
|
13
|
-
const
|
|
12
|
+
const Sequence_1 = require("../Sequence");
|
|
13
|
+
const use_current_frame_1 = require("../use-current-frame");
|
|
14
14
|
const use_unsafe_video_config_1 = require("../use-unsafe-video-config");
|
|
15
15
|
const volume_prop_1 = require("../volume-prop");
|
|
16
|
+
const warn_about_non_seekable_media_1 = require("../warn-about-non-seekable-media");
|
|
16
17
|
const get_current_time_1 = require("./get-current-time");
|
|
17
18
|
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbackRate, ...props }, ref) => {
|
|
18
|
-
const absoluteFrame = (0,
|
|
19
|
-
const frame = (0,
|
|
19
|
+
const absoluteFrame = (0, use_current_frame_1.useAbsoluteCurrentFrame)();
|
|
20
|
+
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
20
21
|
const volumePropsFrame = (0, use_audio_frame_1.useFrameForVolumeProp)();
|
|
21
22
|
const videoConfig = (0, use_unsafe_video_config_1.useUnsafeVideoConfig)();
|
|
22
23
|
const videoRef = (0, react_1.useRef)(null);
|
|
23
|
-
const sequenceContext = (0, react_1.useContext)(
|
|
24
|
+
const sequenceContext = (0, react_1.useContext)(Sequence_1.SequenceContext);
|
|
24
25
|
const mediaStartsAt = (0, use_audio_frame_1.useMediaStartsAt)();
|
|
25
26
|
const { registerAsset, unregisterAsset } = (0, react_1.useContext)(CompositionManager_1.CompositionManager);
|
|
26
27
|
// Generate a string that's as unique as possible for this asset
|
|
@@ -50,6 +51,9 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
50
51
|
if (props.muted) {
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
54
|
+
if (!window.remotion_audioEnabled) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
53
57
|
registerAsset({
|
|
54
58
|
type: 'video',
|
|
55
59
|
src: (0, absolute_src_1.getAbsoluteSrc)(props.src),
|
|
@@ -75,7 +79,11 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
75
79
|
return videoRef.current;
|
|
76
80
|
});
|
|
77
81
|
(0, react_1.useEffect)(() => {
|
|
78
|
-
if (!
|
|
82
|
+
if (!window.remotion_videoEnabled) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const { current } = videoRef;
|
|
86
|
+
if (!current) {
|
|
79
87
|
return;
|
|
80
88
|
}
|
|
81
89
|
const currentTime = (() => {
|
|
@@ -85,6 +93,7 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
85
93
|
src: props.src,
|
|
86
94
|
playbackRate: playbackRate || 1,
|
|
87
95
|
startFrom: -mediaStartsAt,
|
|
96
|
+
mediaType: 'video',
|
|
88
97
|
});
|
|
89
98
|
})();
|
|
90
99
|
const handle = (0, delay_render_1.delayRender)(`Rendering <Video /> with src="${props.src}"`);
|
|
@@ -92,18 +101,22 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
92
101
|
(0, delay_render_1.continueRender)(handle);
|
|
93
102
|
return;
|
|
94
103
|
}
|
|
95
|
-
if ((0, is_approximately_the_same_1.isApproximatelyTheSame)(
|
|
96
|
-
if (
|
|
104
|
+
if ((0, is_approximately_the_same_1.isApproximatelyTheSame)(current.currentTime, currentTime)) {
|
|
105
|
+
if (current.readyState >= 2) {
|
|
97
106
|
(0, delay_render_1.continueRender)(handle);
|
|
98
107
|
return;
|
|
99
108
|
}
|
|
100
|
-
|
|
109
|
+
const loadedDataHandler = () => {
|
|
101
110
|
(0, delay_render_1.continueRender)(handle);
|
|
102
|
-
}
|
|
103
|
-
|
|
111
|
+
};
|
|
112
|
+
current.addEventListener('loadeddata', loadedDataHandler, { once: true });
|
|
113
|
+
return () => {
|
|
114
|
+
current.removeEventListener('loadeddata', loadedDataHandler);
|
|
115
|
+
};
|
|
104
116
|
}
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
current.currentTime = currentTime;
|
|
118
|
+
const seekedHandler = () => {
|
|
119
|
+
(0, warn_about_non_seekable_media_1.warnAboutNonSeekableMedia)(current, 'exception');
|
|
107
120
|
if (window.navigator.platform.startsWith('Mac')) {
|
|
108
121
|
// Improve me: This is ensures frame perfectness but slows down render.
|
|
109
122
|
// Please see this issue for context: https://github.com/remotion-dev/remotion/issues/200
|
|
@@ -115,20 +128,30 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
115
128
|
else {
|
|
116
129
|
(0, delay_render_1.continueRender)(handle);
|
|
117
130
|
}
|
|
118
|
-
}
|
|
119
|
-
|
|
131
|
+
};
|
|
132
|
+
current.addEventListener('seeked', seekedHandler, { once: true });
|
|
133
|
+
const endedHandler = () => {
|
|
120
134
|
(0, delay_render_1.continueRender)(handle);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
135
|
+
};
|
|
136
|
+
current.addEventListener('ended', endedHandler, { once: true });
|
|
137
|
+
const errorHandler = () => {
|
|
138
|
+
var _a;
|
|
139
|
+
if (current === null || current === void 0 ? void 0 : current.error) {
|
|
140
|
+
console.error('Error occurred in video', current === null || current === void 0 ? void 0 : current.error);
|
|
141
|
+
throw new Error(`The browser threw an error while playing the video: Code ${current.error.code} - ${(_a = current === null || current === void 0 ? void 0 : current.error) === null || _a === void 0 ? void 0 : _a.message}. See https://remotion.dev/docs/media-playback-error for help`);
|
|
127
142
|
}
|
|
128
143
|
else {
|
|
129
|
-
throw new Error('The browser threw an
|
|
144
|
+
throw new Error('The browser threw an error');
|
|
130
145
|
}
|
|
131
|
-
}
|
|
146
|
+
};
|
|
147
|
+
current.addEventListener('error', errorHandler, { once: true });
|
|
148
|
+
// If video skips to another frame or unmounts, we clear the created handle
|
|
149
|
+
return () => {
|
|
150
|
+
current.removeEventListener('ended', endedHandler);
|
|
151
|
+
current.removeEventListener('error', errorHandler);
|
|
152
|
+
current.removeEventListener('seeked', seekedHandler);
|
|
153
|
+
(0, delay_render_1.continueRender)(handle);
|
|
154
|
+
};
|
|
132
155
|
}, [
|
|
133
156
|
volumePropsFrame,
|
|
134
157
|
props.src,
|
|
@@ -137,6 +160,6 @@ const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, playbac
|
|
|
137
160
|
frame,
|
|
138
161
|
mediaStartsAt,
|
|
139
162
|
]);
|
|
140
|
-
return (0, jsx_runtime_1.jsx)("video", { ref: videoRef, ...props, onError: onError }
|
|
163
|
+
return (0, jsx_runtime_1.jsx)("video", { ref: videoRef, ...props, onError: onError });
|
|
141
164
|
};
|
|
142
165
|
exports.VideoForRendering = (0, react_1.forwardRef)(VideoForRenderingForwardFunction);
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const getExpectedMediaFrameUncorrected: ({ frame, playbackRate, startFrom, }: {
|
|
2
|
+
frame: number;
|
|
3
|
+
playbackRate: number;
|
|
4
|
+
startFrom: number;
|
|
5
|
+
}) => number;
|
|
6
|
+
export declare const getMediaTime: ({ fps, frame, src, playbackRate, startFrom, mediaType, }: {
|
|
2
7
|
fps: number;
|
|
3
8
|
frame: number;
|
|
4
9
|
src: string;
|
|
5
10
|
playbackRate: number;
|
|
6
11
|
startFrom: number;
|
|
12
|
+
mediaType: 'video' | 'audio';
|
|
7
13
|
}) => number;
|
|
@@ -1,22 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Calculate the `.currentTime` of a video or audio element
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.getMediaTime = void 0;
|
|
4
|
+
exports.getMediaTime = exports.getExpectedMediaFrameUncorrected = void 0;
|
|
5
5
|
const interpolate_1 = require("../interpolate");
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
const getExpectedMediaFrameUncorrected = ({ frame, playbackRate, startFrom, }) => {
|
|
7
|
+
return (0, interpolate_1.interpolate)(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);
|
|
8
|
+
};
|
|
9
|
+
exports.getExpectedMediaFrameUncorrected = getExpectedMediaFrameUncorrected;
|
|
10
|
+
const getMediaTime = ({ fps, frame, src, playbackRate, startFrom, mediaType, }) => {
|
|
11
|
+
const expectedFrame = (0, exports.getExpectedMediaFrameUncorrected)({
|
|
12
|
+
frame,
|
|
13
|
+
playbackRate,
|
|
14
|
+
startFrom,
|
|
15
|
+
});
|
|
14
16
|
if (src.endsWith('webm')) {
|
|
15
17
|
// For WebM videos, we need to add a little bit of shift to get the right frame.
|
|
16
18
|
const msPerFrame = 1000 / fps;
|
|
17
19
|
const msShift = msPerFrame / 2;
|
|
18
20
|
return (expectedFrame * msPerFrame + msShift) / 1000;
|
|
19
21
|
}
|
|
22
|
+
if (mediaType === 'video') {
|
|
23
|
+
// In Chrome, for MP4s, if 30fps, the first frame is still displayed at 0.033333
|
|
24
|
+
// even though after that it increases by 0.033333333 each.
|
|
25
|
+
// So frame = 0 in Remotion is like frame = 1 for the browser
|
|
26
|
+
return (expectedFrame + 1) / fps;
|
|
27
|
+
}
|
|
20
28
|
// For audio, we don't do any shift correction
|
|
21
29
|
return expectedFrame / fps;
|
|
22
30
|
};
|
package/dist/video/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { OffthreadVideo } from './OffthreadVideo';
|
|
2
|
+
export { OffthreadVideoImageFormat, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionMainVideoProps, RemotionVideoProps, } from './props';
|
|
3
|
+
export { Video } from './Video';
|
package/dist/video/index.js
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
exports.Video = exports.OffthreadVideo = void 0;
|
|
4
|
+
var OffthreadVideo_1 = require("./OffthreadVideo");
|
|
5
|
+
Object.defineProperty(exports, "OffthreadVideo", { enumerable: true, get: function () { return OffthreadVideo_1.OffthreadVideo; } });
|
|
6
|
+
var Video_1 = require("./Video");
|
|
7
|
+
Object.defineProperty(exports, "Video", { enumerable: true, get: function () { return Video_1.Video; } });
|
package/dist/video/props.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { VolumeProp } from '../volume-prop';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { VolumeProp } from '../volume-prop';
|
|
3
3
|
export declare type RemotionMainVideoProps = {
|
|
4
4
|
startFrom?: number;
|
|
5
5
|
endAt?: number;
|
|
@@ -8,3 +8,14 @@ export declare type RemotionVideoProps = Omit<React.DetailedHTMLProps<React.Vide
|
|
|
8
8
|
volume?: VolumeProp;
|
|
9
9
|
playbackRate?: number;
|
|
10
10
|
};
|
|
11
|
+
export declare type OffthreadVideoImageFormat = 'png' | 'jpeg';
|
|
12
|
+
export declare type OffthreadVideoProps = {
|
|
13
|
+
src: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
volume?: VolumeProp;
|
|
17
|
+
playbackRate?: number;
|
|
18
|
+
muted?: boolean;
|
|
19
|
+
onError?: React.ReactEventHandler<HTMLVideoElement | HTMLImageElement>;
|
|
20
|
+
imageFormat?: OffthreadVideoImageFormat;
|
|
21
|
+
};
|
package/dist/volume-prop.js
CHANGED
|
@@ -18,6 +18,6 @@ const evaluateVolume = ({ frame, volume, mediaVolume = 1, }) => {
|
|
|
18
18
|
if (!Number.isFinite(evaluated)) {
|
|
19
19
|
throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${frame}.`);
|
|
20
20
|
}
|
|
21
|
-
return Math.min(1, evaluated);
|
|
21
|
+
return Math.max(0, Math.min(1, evaluated));
|
|
22
22
|
};
|
|
23
23
|
exports.evaluateVolume = evaluateVolume;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement) => void;
|
|
1
|
+
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement | null, type: 'console-warning' | 'console-error' | 'exception') => void;
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.warnAboutNonSeekableMedia = void 0;
|
|
4
4
|
const alreadyWarned = {};
|
|
5
|
-
const warnAboutNonSeekableMedia = (ref) => {
|
|
5
|
+
const warnAboutNonSeekableMedia = (ref, type) => {
|
|
6
6
|
// Media is not loaded yet, but this does not yet mean something is wrong with the media
|
|
7
|
+
if (ref === null) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
7
10
|
if (ref.seekable.length === 0) {
|
|
8
11
|
return;
|
|
9
12
|
}
|
|
@@ -15,7 +18,16 @@ const warnAboutNonSeekableMedia = (ref) => {
|
|
|
15
18
|
}
|
|
16
19
|
const range = { start: ref.seekable.start(0), end: ref.seekable.end(0) };
|
|
17
20
|
if (range.start === 0 && range.end === 0) {
|
|
18
|
-
|
|
21
|
+
const msg = `The media does not support seeking. Remotion cannot properly render it. Please see https://remotion.dev/docs/non-seekable-media for assistance. Source: ${ref.src}`;
|
|
22
|
+
if (type === 'console-error') {
|
|
23
|
+
console.error(msg);
|
|
24
|
+
}
|
|
25
|
+
else if (type === 'console-warning') {
|
|
26
|
+
console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in preview and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
throw new Error(msg);
|
|
30
|
+
}
|
|
19
31
|
alreadyWarned[ref.src] = true;
|
|
20
32
|
}
|
|
21
33
|
};
|
|
@@ -3,8 +3,9 @@ export declare function useRemotionContexts(): {
|
|
|
3
3
|
compositionManagerCtx: import("./CompositionManager").CompositionManagerContext;
|
|
4
4
|
timelineContext: import("./timeline-position-state").TimelineContextValue;
|
|
5
5
|
setTimelineContext: import("./timeline-position-state").SetTimelineContextValue;
|
|
6
|
-
sequenceContext: import("./
|
|
6
|
+
sequenceContext: import("./Sequence").SequenceContextType | null;
|
|
7
7
|
nonceContext: import("./nonce").TNonceContext;
|
|
8
|
+
canUseRemotionHooksContext: boolean;
|
|
8
9
|
};
|
|
9
10
|
export interface RemotionContextProviderProps {
|
|
10
11
|
contexts: ReturnType<typeof useRemotionContexts>;
|