Chapter 81: useVideoConfig()
Core Idea
With this hook, you can retrieve some info about the composition you are in.
Key Concepts
- Example
- Return value
- width
- height
- fps
- durationInFrames
- id
- defaultProps
Code Examples
export const MyComp: React.FC = () => {
const {width, height, fps, durationInFrames} = useVideoConfig();
console.log(width); // 1920
console.log(height); // 1080
console.log(fps); // 30;
console.log(durationInFrames); // 300
return <div>Hello World!</div>;
};
- What it demonstrates: Usage pattern for useVideoConfig() from the official docs.
Key Takeaways
- Understand example when working with useVideoConfig().
- Understand return value when working with useVideoConfig().
- Understand width when working with useVideoConfig().
- Understand height when working with useVideoConfig().
- Understand fps when working with useVideoConfig().
Connects To
- Cancel Render: related page in the Hooks & Data APIs section.
- Continue Render: related page in the Hooks & Data APIs section.
- Data Fetching: related page in the Hooks & Data APIs section.