The data to load a movie from.
OptionalswfThe filename of the SWF movie to provide to ActionScript.
OptionalallowIf set to true, the movie is allowed to interact with the page through
JavaScript, using a flash concept called ExternalInterface.
This should only be enabled for movies you trust.
OptionalparametersAlso known as "flashvars" - these are values that may be passed to and loaded by the movie.
If a URL if specified when loading the movie, some parameters will be extracted by the query portion of that URL and then overwritten by any explicitly set here.
OptionalautoplayControls the auto-play behaviour of Ruffle.
OptionalbackgroundControls the background color of the player.
Must be an HTML color (e.g. "#FFFFFF"). CSS colors are not allowed.
null uses the background color of the SWF file.
OptionalletterboxControls letterbox behavior when the Flash container size does not match the movie size.
OptionalunmuteControls the visibility of the unmute overlay when the player is started muted.
OptionalupgradeWhether or not to auto-upgrade all embedded URLs to https.
Flash content that embeds http urls will be blocked from
accessing those urls by the browser when Ruffle is loaded
in a https context. Set to true to automatically change
http:// to https:// for all embedded URLs when Ruffle is
loaded in an https context.
OptionalcompatibilityEnable (true) or disable (false) Ruffle's built in compatibility rules.
These are rules that may make some content work by deliberately changing behaviour, for example by rewriting requests or spoofing SWF urls if they rely on websites that no longer exist.
OptionalfavorFavor using the real Adobe Flash Player over Ruffle if the browser supports it.
OptionalwarnThis is no longer used and does not affect anything. It is only kept for backwards compatibility.
Previously: "Whether or not to display an overlay with a warning when loading a movie with unsupported content."
OptionallogConsole logging level.
OptionalshowIf set to true, the context menu has an option to download the SWF.
OptionalcontextWhether or not to show a context menu when right-clicking a Ruffle instance.
OptionalpreloaderWhether or not to show a splash screen before the SWF has loaded with Ruffle (backwards-compatibility).
OptionalsplashWhether or not to show a splash screen before the SWF has loaded with Ruffle.
OptionalmaxMaximum amount of time a script can take before scripting is disabled.
OptionalbaseSpecifies the base directory or URL used to resolve all relative path statements in the SWF file. null means the current directory.
OptionalmenuIf set to true, the built-in context menu items are visible
This is equivalent to Stage.showMenu.
OptionalsalignThis is equivalent to Stage.align.
OptionalfullControls orientation on mobile in fullscreen mode.
This is equivalent to the AIR-only method Stage.setAspectRatio.
OptionalforceIf set to true, movies are prevented from changing the stage alignment.
OptionalqualityThis is equivalent to Stage.quality.
OptionalscaleThis is equivalent to Stage.scaleMode.
OptionalforceIf set to true, movies are prevented from changing the stage scale mode.
OptionalallowIf set to true, the Stage's displayState can be changed
OptionalframeSets and locks the player's frame rate, overriding the movie's frame rate.
OptionalwmodeThe window mode of the Ruffle player.
This setting controls how the Ruffle container is layered and rendered with other content on the page.
OptionalplayerThe emulated version of the player.
This controls the version that is reported to the movie. null means latest version.
OptionalpreferredThe preferred render backend of the Ruffle player.
This option should only be used for testing; the available backends may change in future releases. By default, Ruffle chooses the most featureful backend supported by the user's system, falling back to more basic backends if necessary. The available values in order of default preference are: "webgpu", "wgpu-webgl", "webgl", "canvas".
OptionalpublicThe URL at which Ruffle can load its extra files (i.e. .wasm).
OptionalpolyfillsWhether or not to enable polyfills on the page.
Polyfills will look for "legacy" flash content like <object>
and <embed> elements, and replace them with compatible
Ruffle elements.
OptionalopenThe handling mode of links opening a new website.
OptionalallowWhich flash networking APIs may be accessed.
OptionalopenA function to call for opening content in a new tab.
This is only used if the content cannot be loaded due to CORS, and the Extension version of Ruffle will override this to provide a local player.
OptionalsocketAn array of SocketProxy objects.
When a SWF tries to establish a Socket connection, Ruffle will search for a matching SocketProxy object in this array and use it to establish a WebSocket connection, through which all communication is tunneled through.
When none are found, Ruffle will fail the connection gracefully. When multiple matching SocketProxy objects exist, the first one is used.
OptionalfontAn array of font URLs to eagerly load and provide to Ruffle.
These will be fetched by the browser as part of the loading of Flash content, which may slow down load times.
Currently only SWFs are supported, and each font embedded within that SWF will be used as device font by Flash content.
If any URL fails to load (either it's an invalid file, or a network error occurs), Ruffle will log an error but continue without it.
OptionaldefaultThe font names to use for each "default" Flash device font.
OptionalcredentialAn array of origins that credentials may be sent to. Credentials are cookies, authorization headers, or TLS client certificates.
Entries should include the protocol and host, for example https://example.org or http://subdomain.example.org.
Cookies will always be sent to the same origin as the page the content was loaded on. If you configure this to send cookies to an origin but that origin does not configure CORS to allow it, then requests will start failing due to CORS. See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials.
This directly corresponds to https://developer.mozilla.org/en-US/docs/Web/API/fetch#credentials
Every request will be same-origin unless specified here, in which case it will be include.
OptionalplayerThe player runtime to emulate
This allows you to emulate Adobe AIR or Adobe Flash Player.
Optional ExperimentalgamepadAn object mapping gamepad button names to ActionScript key codes.
With the appropriate mapping pressing a button on the gamepad will look like the corresponding key press to the loaded SWF. This can be used for adding gamepad support to games that don't support it otherwise.
An example config for mapping the D-pad to the arrow keys would look like this:
{ "dpad-up": 38, "dpad-down": 40, "dpad-left": 37, "dpad-right": 39, }
OptionalurlA set of rules that rewrite URLs in both network requests and links.
They are always scanned in order, and the first one that matches is used.
A rule either matches using a RegExp (in which case the replacement may use $...),
or a string (in which case the match and the replacement are always exact).
They are useful when a SWF uses an obsolete URL, in which case you can rewrite it to something else that works.
OptionalscrollingSet the scrolling behavior, i.e. how scrolling Flash content affects the web page.
The original behavior in Flash Player differed across versions, browsers, and wmode settings.
Options to load a movie by a data stream.