
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-ruffle
Advanced tools

Render Flash media in React
A React component for rendering Flash & ActionScript content using the Rust-based ruffle emulator.
Ruffle is a Flash Player emulator built in the Rust programming language.
Read the Ruffle documentation for more information.
onFSCommand callbacks for Flash-to-JavaScript communicationUsing NPM:
npm install react-ruffle
React 18 or 19.
import { Flash } from "react-ruffle";
// ...
<Flash src="path/to/my.swf" />
// ...or, with configuration and fallback content
<Flash src="path/to/my.swf" config={{
// Ruffle configuration options
autoplay: "off",
parameters: {
// Parameters to pass to the Flash content
// AKA: FlashVars
}
}}>
<p>This content will be displayed if the Flash content cannot be rendered.</p>
</Flash>
// ...or, with an FSCommand callback
<Flash
src="path/to/my.swf"
onFSCommand={(command, args) => {
console.log("FSCommand received:", command, args);
return true;
}}
/>
Note: Both
<Flash />and<Ruffle />components are exported. They are identical.
props.srcThe path to the Flash media file.
Required
Type: string
props.configRuffle configuration options.
These options are passed directly to the ruffle player. The full list of options are listed in the Ruffle API documentation.
Read the ruffle documentation for more information.
Optional
Type: Object
props.onFSCommandA callback invoked when Flash content calls the FSCommand function. Receives command (string) and args (string) parameters and should return a boolean.
This enables Flash-to-JavaScript communication. See the Ruffle player API docs for details.
Optional
Type: (command: string, args: string) => boolean
props.childrenFallback content to display while the Flash media is loading.
Optional
Type: ReactNode
All other props are passed directly to the root <div> element returned by this library.
Version 2.0.0 introduces the following breaking changes:
<div> container instead of an <object> element. Any props previously passed to <object> (e.g. data, HTML object attributes) are no longer supported; use props.src and props.config instead.window.RufflePlayer.newest()) to create and manage the player instance directly, rather than relying on Ruffle's automatic embed detection via <object> tags.react >= 18 (supports React 18 and 19).FAQs
Render Flash media in React using the Rust-based Ruffle emulator
We found that react-ruffle 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
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.