Chapter 61: getVideoMetadata()
Core Idea
:::info Deprecated This function does not support H. 265 videos on Linux and also fails on some other formats.
Key Concepts
- Arguments
- src
- Return value
- Example
- Caching behavior
- See also
Code Examples
await getVideoMetadata(staticFile('video.mp4')); /* {
durationInSeconds: 100.00,
width: 1280,
height: 720,
aspectRatio: 1.77777778,
isRemote: false
} */
await getVideoMetadata('https://example.com/remote-audio.webm'); /* {
durationInSeconds: 40.213,
width: 1920,
height: 1080,
aspectRatio: 1.77777778,
isRemote: true
} */
- What it demonstrates: Usage pattern for getVideoMetadata() from the official docs.
Key Takeaways
- Understand arguments when working with getVideoMetadata().
- Understand src when working with getVideoMetadata().
- Understand return value when working with getVideoMetadata().
- Understand example when working with getVideoMetadata().
- Understand caching behavior when working with getVideoMetadata().
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.