@jonny/remotion-tester
v0.0.1
Published
Example react hook for use in remotion to get current second.
Downloads
2
Readme
Use Second
A react hook for use with Remotion that returns the current second based on current frame and fps.
Part of Remotion Library Starter as an example hook.
Usage
import { useSecond } from "@jonny/remotion-tester";
import { Composition, AbsoluteFill } from "remotion";
import { render} from React;
export const MyVideo: React.FC = () => {
const second = useSecond();
return (
<AbsoluteFill>
<h1>Second: {second}</h1>
</AbsoluteFill>
);
};
render(
<Composition
fps={30}
durationInFrames={30 * 10}
component={MyVideo}
width={1080}
height={1080}
/>,
document.getElementById("root")
);
License
This project is licensed under the MIT License - see the LICENSE.md file for details