
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@remotion/player
Advanced tools
The @remotion/player package allows you to embed a video powered by Remotion in a React application.
The dependencies that Remotion requires you to have pre-installed on your machine are Node.js and FFMPEG. You can take a look at this guide on how to get FFMPEG on your machine.
Install this package and Remotion with the package manager that you use for project:
npm i remotion @remotion/player
yarn add remotion @remotion/player
pnpm i remotion @remotion/player
Make sure all Remotion packages you install (
remotion,@remotion/player,@remotion/gif...) have the same version.
Now that you have this package as a dependency in your React project, it is time to see some of the basic examples that you can spin up with this package.
The @remotion/player package can be imported as a React component from the library, which you can make use of in your components, either by nesting it in a custom component of yours or simply making it a standalone component.
// components/MyVideo.js
import React from 'react';
import {useCurrentFrame} from 'remotion';
const MyVideo = () => {
	const frame = useCurrentFrame();
	return (
		<div
			style={{
				flex: 1,
				textAlign: 'center',
				fontSize: '7em',
			}}
		>
			The current frame is {frame}.
		</div>
	);
};
import {Player} from '@remotion/player';
import {MyVideo} from '../components/MyVideo';
export const App = () => {
	return (
		<Player
			component={MyVideo}
			durationInFrames={120}
			compositionWidth={1920}
			compositionHeight={1080}
			fps={30}
		/>
	);
};
The most important props accepted:
| Props | Function | 
|---|---|
| component | A React component that renders the video | 
| durationInFrames | The duration of the video in frames | 
| compositionHeight | The height of the composition in pixels | 
| compositionWidth | The width of the composition in pixels | 
| fps | The frame rate of the video | 
For a complete reference of the available props, refer to @remotion/player API.
FAQs
React component for embedding a Remotion preview into your app
The npm package @remotion/player receives a total of 84,023 weekly downloads. As such, @remotion/player popularity was classified as popular.
We found that @remotion/player demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.