Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

renderMediaOnLambda not passing/overwriting defaultProps #2672

Closed
alexfernandez803 opened this issue Aug 3, 2023 · 1 comment 路 Fixed by #2674
Closed

renderMediaOnLambda not passing/overwriting defaultProps #2672

alexfernandez803 opened this issue Aug 3, 2023 · 1 comment 路 Fixed by #2674
Labels
bug Something isn't working

Comments

@alexfernandez803
Copy link
Contributor

Bug Report 馃悰

I've noticed that 4.0.16 that inputprops from Lambda are not being passed to the composition.

Setup

<Composition
id="frame"
component={Frame}
fps={30}
width={1280}
height={720}
defaultProps={{
audioUrl:"a valid audio should be in here"
text: "text"
}}
calculateMetadata={async ({ props }) => {
const data = await getAudioDurationInSeconds(props.audioUrl);
return {
durationInFrames: Math.floor(data * 30),
};
}}
/>

Component
import React, { useEffect, useMemo, useState } from "react";
import {
Audio,

AbsoluteFill,
} from "remotion";

export const Frame: React.FC<{
audioUrl: string;
text: string;
}> = ({ audioUrl }) => {
return (

  <Audio src={audioUrl} title="audio" />
</AbsoluteFill>

);
};

Render Media Lambda

const { renderId, bucketName } = await renderMediaOnLambda({
region: region,
functionName: FUNCTION_NAME,
serveUrl: SITE_ID,
composition: COMP_NAME,
inputProps: {
audioUrl: "ddd",
text: ""
},
codec: "h264",
imageFormat: "jpeg",
maxRetries: 2,
privacy: "private",
});

The passed text does not override text in the component.

@JonnyBurger
Copy link
Member

confirmed! Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants