Comparing version 4.0.142 to 4.0.143
@@ -20,2 +20,3 @@ import React from 'react'; | ||
delayRenderRetries?: number | undefined; | ||
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior | undefined; | ||
} & RemotionMainAudioProps & { | ||
@@ -25,3 +26,3 @@ /** | ||
*/ | ||
stack?: string | undefined; | ||
readonly stack?: string | undefined; | ||
}, "ref"> & React.RefAttributes<HTMLAudioElement>>; |
import React from 'react'; | ||
import type { RemotionAudioProps } from './props.js'; | ||
type AudioForPreviewProps = RemotionAudioProps & { | ||
shouldPreMountAudioTags: boolean; | ||
onDuration: (src: string, durationInSeconds: number) => void; | ||
pauseWhenBuffering: boolean; | ||
_remotionInternalNativeLoopPassed: boolean; | ||
_remotionInternalStack: string | null; | ||
showInTimeline: boolean; | ||
readonly shouldPreMountAudioTags: boolean; | ||
readonly onDuration: (src: string, durationInSeconds: number) => void; | ||
readonly pauseWhenBuffering: boolean; | ||
readonly _remotionInternalNativeLoopPassed: boolean; | ||
readonly _remotionInternalStack: string | null; | ||
readonly showInTimeline: boolean; | ||
readonly stack?: string | undefined; | ||
}; | ||
export declare const AudioForPreview: React.ForwardRefExoticComponent<Omit<AudioForPreviewProps, "ref"> & React.RefAttributes<HTMLAudioElement>>; | ||
export {}; |
@@ -24,6 +24,6 @@ "use strict"; | ||
} | ||
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, loopVolumeCurveBehavior, stack, ...nativeProps } = props; | ||
const [mediaVolume] = (0, volume_position_state_js_1.useMediaVolumeState)(); | ||
const [mediaMuted] = (0, volume_position_state_js_1.useMediaMutedState)(); | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(); | ||
const { volume, muted, playbackRate, shouldPreMountAudioTags, src, onDuration, acceptableTimeShiftInSeconds, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, _remotionInternalStack, allowAmplificationDuringRender, name, pauseWhenBuffering, showInTimeline, ...nativeProps } = props; | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat'); | ||
const { hidden } = (0, react_1.useContext)(SequenceManager_js_1.SequenceVisibilityToggleContext); | ||
@@ -30,0 +30,0 @@ if (!src) { |
@@ -16,4 +16,5 @@ import type { ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
delayRenderRetries?: number | undefined; | ||
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior | undefined; | ||
} & { | ||
readonly onDuration: (src: string, durationInSeconds: number) => void; | ||
} & RefAttributes<HTMLAudioElement>>; |
@@ -17,4 +17,5 @@ "use strict"; | ||
const audioRef = (0, react_1.useRef)(null); | ||
const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, delayRenderRetries, delayRenderTimeoutInMilliseconds, loopVolumeCurveBehavior, ...nativeProps } = props; | ||
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)(); | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(); | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat'); | ||
const frame = (0, use_current_frame_js_1.useCurrentFrame)(); | ||
@@ -34,3 +35,2 @@ const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext); | ||
]); | ||
const { volume: volumeProp, playbackRate, allowAmplificationDuringRender, onDuration, toneFrequency, _remotionInternalNeedsDurationCalculation, _remotionInternalNativeLoopPassed, acceptableTimeShiftInSeconds, name, onError, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...nativeProps } = props; | ||
const volume = (0, volume_prop_js_1.evaluateVolume)({ | ||
@@ -37,0 +37,0 @@ volume: volumeProp, |
/// <reference types="react" /> | ||
import type { VolumeProp } from '../volume-prop.js'; | ||
import type { LoopVolumeCurveBehavior } from './use-audio-frame.js'; | ||
export type RemotionMainAudioProps = { | ||
@@ -20,2 +21,3 @@ startFrom?: number; | ||
delayRenderRetries?: number; | ||
loopVolumeCurveBehavior?: LoopVolumeCurveBehavior; | ||
}; |
export declare const useMediaStartsAt: () => number; | ||
export type LoopVolumeCurveBehavior = 'repeat' | 'extend'; | ||
/** | ||
@@ -6,2 +7,2 @@ * When passing a function as the prop for `volume`, | ||
*/ | ||
export declare const useFrameForVolumeProp: () => number; | ||
export declare const useFrameForVolumeProp: (behavior: LoopVolumeCurveBehavior) => number; |
@@ -6,2 +6,3 @@ "use strict"; | ||
const SequenceContext_js_1 = require("../SequenceContext.js"); | ||
const index_js_1 = require("../loop/index.js"); | ||
const use_current_frame_js_1 = require("../use-current-frame.js"); | ||
@@ -19,7 +20,11 @@ const useMediaStartsAt = () => { | ||
*/ | ||
const useFrameForVolumeProp = () => { | ||
const useFrameForVolumeProp = (behavior) => { | ||
const loop = index_js_1.Loop.useLoop(); | ||
const frame = (0, use_current_frame_js_1.useCurrentFrame)(); | ||
const startsAt = (0, exports.useMediaStartsAt)(); | ||
return frame + startsAt; | ||
if (behavior === 'repeat' || loop === null) { | ||
return frame + startsAt; | ||
} | ||
return frame + startsAt + loop.durationInFrames * loop.iteration; | ||
}; | ||
exports.useFrameForVolumeProp = useFrameForVolumeProp; |
import React from 'react'; | ||
export declare const CanUseRemotionHooks: React.Context<boolean>; | ||
export declare const CanUseRemotionHooksProvider: React.FC<{ | ||
children: React.ReactNode; | ||
readonly children: React.ReactNode; | ||
}>; |
@@ -68,2 +68,3 @@ "use strict"; | ||
if (typeof window !== 'undefined') { | ||
const isPremounting = Boolean(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting); | ||
// eslint-disable-next-line react-hooks/rules-of-hooks | ||
@@ -78,3 +79,3 @@ (0, react_1.useLayoutEffect)(() => { | ||
}); | ||
const unblock = pauseWhenLoading && !(sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting) | ||
const unblock = pauseWhenLoading && !isPremounting | ||
? delayPlayback().unblock | ||
@@ -114,3 +115,3 @@ : () => undefined; | ||
pauseWhenLoading, | ||
sequenceContext === null || sequenceContext === void 0 ? void 0 : sequenceContext.premounting, | ||
isPremounting, | ||
]); | ||
@@ -117,0 +118,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/// <reference types="node" /> | ||
/// <reference types="bun-types" /> | ||
/// <reference types="react" /> | ||
@@ -19,3 +19,3 @@ import './asset-types.js'; | ||
label: string | null; | ||
timeout: number | NodeJS.Timeout; | ||
timeout: number | Timer; | ||
}; | ||
@@ -22,0 +22,0 @@ }; |
@@ -72,3 +72,3 @@ /// <reference types="react" /> | ||
readonly CanUseRemotionHooksProvider: import("react").FC<{ | ||
children: import("react").ReactNode; | ||
readonly children: import("react").ReactNode; | ||
}>; | ||
@@ -120,4 +120,2 @@ readonly CanUseRemotionHooks: import("react").Context<boolean>; | ||
readonly useTimelineSetFrame: () => (u: import("react").SetStateAction<Record<string, number>>) => void; | ||
readonly FILE_TOKEN: "remotion-file:"; | ||
readonly DATE_TOKEN: "remotion-date:"; | ||
readonly NativeLayersProvider: import("react").FC<{ | ||
@@ -151,5 +149,2 @@ children?: import("react").ReactNode; | ||
readonly enableSequenceStackTraces: () => void; | ||
readonly colorNames: { | ||
[key: string]: number; | ||
}; | ||
readonly CurrentScaleContext: import("react").Context<import("./use-current-scale.js").CurrentScaleContextType | null>; | ||
@@ -156,0 +151,0 @@ readonly PreviewSizeContext: import("react").Context<import("./use-current-scale.js").PreviewSizeCtx>; |
@@ -39,4 +39,2 @@ "use strict"; | ||
const get_remotion_environment_js_1 = require("./get-remotion-environment.js"); | ||
const input_props_serialization_js_1 = require("./input-props-serialization.js"); | ||
const interpolate_colors_js_1 = require("./interpolate-colors.js"); | ||
const is_player_js_1 = require("./is-player.js"); | ||
@@ -118,4 +116,2 @@ const NativeLayers_js_1 = require("./NativeLayers.js"); | ||
useTimelineSetFrame: timeline_position_state_js_1.useTimelineSetFrame, | ||
FILE_TOKEN: input_props_serialization_js_1.FILE_TOKEN, | ||
DATE_TOKEN: input_props_serialization_js_1.DATE_TOKEN, | ||
NativeLayersProvider: NativeLayers_js_1.NativeLayersProvider, | ||
@@ -130,3 +126,2 @@ ClipComposition: Composition_js_1.ClipComposition, | ||
enableSequenceStackTraces: enable_sequence_stack_traces_js_1.enableSequenceStackTraces, | ||
colorNames: interpolate_colors_js_1.colorNames, | ||
CurrentScaleContext: use_current_scale_js_1.CurrentScaleContext, | ||
@@ -133,0 +128,0 @@ PreviewSizeContext: use_current_scale_js_1.PreviewSizeContext, |
import React from 'react'; | ||
import type { LayoutAndStyle } from '../Sequence.js'; | ||
export type LoopProps = { | ||
readonly durationInFrames: number; | ||
readonly times?: number; | ||
readonly name?: string; | ||
readonly children: React.ReactNode; | ||
} & LayoutAndStyle; | ||
type LoopContextType = { | ||
iteration: number; | ||
durationInFrames: number; | ||
times?: number; | ||
name?: string; | ||
children: React.ReactNode; | ||
} & LayoutAndStyle; | ||
}; | ||
declare const useLoop: () => LoopContextType | null; | ||
/** | ||
@@ -13,2 +18,5 @@ * @description This component allows you to quickly lay out an animation so it repeats itself. | ||
*/ | ||
export declare const Loop: React.FC<LoopProps>; | ||
export declare const Loop: React.FC<LoopProps> & { | ||
useLoop: typeof useLoop; | ||
}; | ||
export {}; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Loop = void 0; | ||
const jsx_runtime_1 = require("react/jsx-runtime"); | ||
const react_1 = require("react"); | ||
const react_1 = __importStar(require("react")); | ||
const Sequence_js_1 = require("../Sequence.js"); | ||
@@ -10,2 +33,6 @@ const use_current_frame_js_1 = require("../use-current-frame.js"); | ||
const validate_duration_in_frames_js_1 = require("../validation/validate-duration-in-frames.js"); | ||
const LoopContext = (0, react_1.createContext)(null); | ||
const useLoop = () => { | ||
return react_1.default.useContext(LoopContext); | ||
}; | ||
/** | ||
@@ -35,3 +62,4 @@ * @description This component allows you to quickly lay out an animation so it repeats itself. | ||
const maxFrame = durationInFrames * (actualTimes - 1); | ||
const start = Math.floor(currentFrame / durationInFrames) * durationInFrames; | ||
const iteration = Math.floor(currentFrame / durationInFrames); | ||
const start = iteration * durationInFrames; | ||
const from = Math.min(start, maxFrame); | ||
@@ -45,4 +73,11 @@ const loopDisplay = (0, react_1.useMemo)(() => { | ||
}, [actualTimes, durationInFrames, from]); | ||
return ((0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name !== null && name !== void 0 ? name : '<Loop>', _remotionInternalLoopDisplay: loopDisplay, layout: props.layout, style: style, children: children })); | ||
const loopContext = (0, react_1.useMemo)(() => { | ||
return { | ||
iteration: Math.floor(currentFrame / durationInFrames), | ||
durationInFrames, | ||
}; | ||
}, [currentFrame, durationInFrames]); | ||
return ((0, jsx_runtime_1.jsx)(LoopContext.Provider, { value: loopContext, children: (0, jsx_runtime_1.jsx)(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name !== null && name !== void 0 ? name : '<Loop>', _remotionInternalLoopDisplay: loopDisplay, layout: props.layout, style: style, children: children }) })); | ||
}; | ||
exports.Loop = Loop; | ||
exports.Loop.useLoop = useLoop; |
@@ -48,2 +48,7 @@ export type { TRenderAsset } from './CompositionManager'; | ||
MIN_BUN_VERSION: string; | ||
colorNames: { | ||
[key: string]: number; | ||
}; | ||
DATE_TOKEN: string; | ||
FILE_TOKEN: string; | ||
}; |
@@ -10,2 +10,3 @@ "use strict"; | ||
const input_props_serialization_1 = require("./input-props-serialization"); | ||
const input_props_serialization_js_1 = require("./input-props-serialization.js"); | ||
const interpolate_colors_1 = require("./interpolate-colors"); | ||
@@ -41,2 +42,5 @@ const truthy_1 = require("./truthy"); | ||
MIN_BUN_VERSION: v5_flag_1.ENABLE_V5_BREAKING_CHANGES ? '1.1.3' : '1.0.3', | ||
colorNames: interpolate_colors_1.colorNames, | ||
DATE_TOKEN: input_props_serialization_js_1.DATE_TOKEN, | ||
FILE_TOKEN: input_props_serialization_js_1.FILE_TOKEN, | ||
}; |
@@ -1,2 +0,2 @@ | ||
import type { SpringConfig } from './spring-utils.js'; | ||
import type { SpringConfig } from './spring-utils'; | ||
/** | ||
@@ -31,2 +31,2 @@ * @description Calculates a position based on physical parameters, start and end value, and time. | ||
export { measureSpring } from './measure-spring.js'; | ||
export { SpringConfig } from './spring-utils.js'; | ||
export type { SpringConfig } from './spring-utils'; |
@@ -1,2 +0,2 @@ | ||
import type { SpringConfig } from './spring-utils.js'; | ||
import type { SpringConfig } from './spring-utils'; | ||
/** | ||
@@ -3,0 +3,0 @@ * @description The function returns how long it takes for a spring animation to settle |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "4.0.142"; | ||
export declare const VERSION = "4.0.143"; |
@@ -5,2 +5,2 @@ "use strict"; | ||
// Automatically generated on publish | ||
exports.VERSION = '4.0.142'; | ||
exports.VERSION = '4.0.143'; |
export { OffthreadVideo } from './OffthreadVideo.js'; | ||
export { Video } from './Video.js'; | ||
export { RemotionMainVideoProps, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionVideoProps, } from './props.js'; | ||
export type { RemotionMainVideoProps, OffthreadVideoProps as RemotionOffthreadVideoProps, RemotionVideoProps, } from './props'; |
@@ -21,6 +21,6 @@ "use strict"; | ||
const offthread_video_source_js_1 = require("./offthread-video-source.js"); | ||
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneMapped = true, toneFrequency, name, ...props }) => { | ||
const OffthreadVideoForRendering = ({ onError, volume: volumeProp, playbackRate, src, muted, allowAmplificationDuringRender, transparent = false, toneMapped = true, toneFrequency, name, loopVolumeCurveBehavior, ...props }) => { | ||
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)(); | ||
const frame = (0, use_current_frame_js_1.useCurrentFrame)(); | ||
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(); | ||
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat'); | ||
const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)(); | ||
@@ -27,0 +27,0 @@ const sequenceContext = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext); |
import type React from 'react'; | ||
import type { LoopVolumeCurveBehavior } from '../audio/use-audio-frame.js'; | ||
import type { VolumeProp } from '../volume-prop.js'; | ||
@@ -21,2 +22,3 @@ export type RemotionMainVideoProps = { | ||
delayRenderTimeoutInMilliseconds?: number; | ||
loopVolumeCurveBehavior?: LoopVolumeCurveBehavior; | ||
delayRenderRetries?: number; | ||
@@ -46,2 +48,3 @@ }; | ||
pauseWhenBuffering?: boolean; | ||
loopVolumeCurveBehavior?: LoopVolumeCurveBehavior; | ||
/** | ||
@@ -48,0 +51,0 @@ * @deprecated For internal use only |
@@ -44,6 +44,4 @@ "use strict"; | ||
exports.appendVideoFragment = appendVideoFragment; | ||
const isSubsetOfDuration = (prevStartFrom, newStartFrom, prevDuration, newDuration) => { | ||
return (prevStartFrom <= newStartFrom && | ||
prevStartFrom + prevDuration >= newStartFrom + newDuration); | ||
}; | ||
const isSubsetOfDuration = ({ prevStartFrom, newStartFrom, prevDuration, newDuration, }) => prevStartFrom <= newStartFrom && | ||
prevStartFrom + prevDuration >= newStartFrom + newDuration; | ||
const useAppendVideoFragment = ({ actualSrc: initialActualSrc, actualFrom: initialActualFrom, duration: initialDuration, fps, }) => { | ||
@@ -53,3 +51,9 @@ const actualFromRef = (0, react_1.useRef)(initialActualFrom); | ||
const actualSrc = (0, react_1.useRef)(initialActualSrc); | ||
if (!isSubsetOfDuration || initialActualSrc !== actualSrc.current) { | ||
if (!isSubsetOfDuration({ | ||
prevStartFrom: actualFromRef.current, | ||
newStartFrom: initialActualFrom, | ||
prevDuration: actualDuration.current, | ||
newDuration: initialDuration, | ||
}) || | ||
initialActualSrc !== actualSrc.current) { | ||
actualFromRef.current = initialActualFrom; | ||
@@ -56,0 +60,0 @@ actualDuration.current = initialDuration; |
import React from 'react'; | ||
import type { RemotionMainVideoProps } from './props.js'; | ||
import type { RemotionMainVideoProps } from './props'; | ||
/** | ||
@@ -17,2 +17,3 @@ * @description allows you to include a video file in your Remotion project. It wraps the native HTMLVideoElement. | ||
delayRenderTimeoutInMilliseconds?: number | undefined; | ||
loopVolumeCurveBehavior?: import("../audio/use-audio-frame.js").LoopVolumeCurveBehavior | undefined; | ||
delayRenderRetries?: number | undefined; | ||
@@ -23,3 +24,3 @@ } & RemotionMainVideoProps & { | ||
*/ | ||
stack?: string | undefined; | ||
readonly stack?: string | undefined; | ||
}, "ref"> & React.RefAttributes<HTMLVideoElement>>; |
import React from 'react'; | ||
import type { RemotionVideoProps } from './props.js'; | ||
import type { RemotionVideoProps } from './props'; | ||
type VideoForPreviewProps = RemotionVideoProps & { | ||
onlyWarnForMediaSeekingError: boolean; | ||
onDuration: (src: string, durationInSeconds: number) => void; | ||
pauseWhenBuffering: boolean; | ||
_remotionInternalNativeLoopPassed: boolean; | ||
_remotionInternalStack: string | null; | ||
showInTimeline: boolean; | ||
readonly onlyWarnForMediaSeekingError: boolean; | ||
readonly onDuration: (src: string, durationInSeconds: number) => void; | ||
readonly pauseWhenBuffering: boolean; | ||
readonly _remotionInternalNativeLoopPassed: boolean; | ||
readonly _remotionInternalStack: string | null; | ||
readonly showInTimeline: boolean; | ||
}; | ||
export declare const VideoForPreview: React.ForwardRefExoticComponent<Omit<VideoForPreviewProps, "ref"> & React.RefAttributes<HTMLVideoElement>>; | ||
export {}; |
@@ -21,3 +21,6 @@ "use strict"; | ||
const videoRef = (0, react_1.useRef)(null); | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(); | ||
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration, | ||
// @ts-expect-error | ||
acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, showInTimeline, loopVolumeCurveBehavior, ...nativeProps } = props; | ||
const volumePropFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat'); | ||
const { fps, durationInFrames } = (0, use_video_config_js_1.useVideoConfig)(); | ||
@@ -28,5 +31,2 @@ const parentSequence = (0, react_1.useContext)(SequenceContext_js_1.SequenceContext); | ||
const isSequenceHidden = (_a = hidden[timelineId]) !== null && _a !== void 0 ? _a : false; | ||
const { volume, muted, playbackRate, onlyWarnForMediaSeekingError, src, onDuration, | ||
// @ts-expect-error | ||
acceptableTimeShift, acceptableTimeShiftInSeconds, toneFrequency, name, _remotionInternalNativeLoopPassed, _remotionInternalStack, style, pauseWhenBuffering, showInTimeline, ...nativeProps } = props; | ||
if (typeof acceptableTimeShift !== 'undefined') { | ||
@@ -71,5 +71,3 @@ throw new Error('acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.'); | ||
}); | ||
const actualFrom = parentSequence | ||
? parentSequence.relativeFrom + parentSequence.cumulatedFrom | ||
: 0; | ||
const actualFrom = parentSequence ? parentSequence.relativeFrom : 0; | ||
const duration = parentSequence | ||
@@ -76,0 +74,0 @@ ? Math.min(parentSequence.durationInFrames, durationInFrames) |
@@ -13,2 +13,3 @@ import type { ForwardRefExoticComponent, RefAttributes } from 'react'; | ||
delayRenderTimeoutInMilliseconds?: number | undefined; | ||
loopVolumeCurveBehavior?: import("../audio/use-audio-frame.js").LoopVolumeCurveBehavior | undefined; | ||
delayRenderRetries?: number | undefined; | ||
@@ -15,0 +16,0 @@ } & { |
@@ -20,6 +20,6 @@ "use strict"; | ||
const seek_until_right_js_1 = require("./seek-until-right.js"); | ||
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, toneFrequency, name, acceptableTimeShiftInSeconds, delayRenderRetries, delayRenderTimeoutInMilliseconds, ...props }, ref) => { | ||
const VideoForRenderingForwardFunction = ({ onError, volume: volumeProp, allowAmplificationDuringRender, playbackRate, onDuration, toneFrequency, name, acceptableTimeShiftInSeconds, delayRenderRetries, delayRenderTimeoutInMilliseconds, loopVolumeCurveBehavior, ...props }, ref) => { | ||
const absoluteFrame = (0, timeline_position_state_js_1.useTimelinePosition)(); | ||
const frame = (0, use_current_frame_js_1.useCurrentFrame)(); | ||
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(); | ||
const volumePropsFrame = (0, use_audio_frame_js_1.useFrameForVolumeProp)(loopVolumeCurveBehavior !== null && loopVolumeCurveBehavior !== void 0 ? loopVolumeCurveBehavior : 'repeat'); | ||
const videoConfig = (0, use_unsafe_video_config_js_1.useUnsafeVideoConfig)(); | ||
@@ -26,0 +26,0 @@ const videoRef = (0, react_1.useRef)(null); |
{ | ||
"name": "remotion", | ||
"version": "4.0.142", | ||
"version": "4.0.143", | ||
"description": "Render videos in React", | ||
@@ -24,2 +24,4 @@ "main": "dist/cjs/index.js", | ||
"@testing-library/react": "14.0.0", | ||
"@happy-dom/global-registrator": "14.5.1", | ||
"happy-dom": "14.5.1", | ||
"@types/node": "18.14.6", | ||
@@ -26,0 +28,0 @@ "@types/react": "18.2.48", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
633290
243
14565
0
20