The configuration object used when Ruffle is instantiated.
The version of this particular API, as a string in a semver compatible format.
Create a Ruffle player element using this particular version of Ruffle.
The player element. This is a DOM element that may be inserted into the current page as you wish.
The version of the public API.
This is not the version of Ruffle itself.
This allows a page with an old version of the Public API to be upgraded to a new version of the API. The public API is intended to be changed very infrequently, if at all, but this provides an escape mechanism for newer Ruffle sources to upgrade older installations.
The version of this public API.
Static
negotiateJoin a source into the public API, if it doesn't already exist.
Optional
prevRuffle: null | PublicAPILikeThe previous iteration of the Ruffle API.
The prevRuffle
param lists the previous object in the RufflePlayer
slot. We perform some checks to see if this is a Ruffle public API or a
conflicting object. If this is conflicting, then a new public API will
be constructed (see the constructor information for what happens to
prevRuffle
).
Note that Public API upgrades are deliberately not enabled in this version of Ruffle, since there is no Public API to upgrade from.
Optional
sourceName: stringThe name of this particular Ruffle source.
If both parameters are provided they will be used to define a new Ruffle source to register with the public API.
The Ruffle Public API.
Look up the newest Ruffle source and return it's API.
An instance of the Source API.
Look up a specific Ruffle version (or any version satisfying a given set of requirements) and return it's API.
A set of semantic version requirement strings that the player version must satisfy.
An instance of the Source API, if one or more sources satisfied the requirement.
Look up the newest Ruffle version compatible with the local
source, if
it's installed. Otherwise, use the latest version.
An instance of the Source API
Look up the newest Ruffle version with the exact same version as the
local
source, if it's installed. Otherwise, use the latest version.
An instance of the Source API
Indicates that this version of the public API has been superseded by a newer version.
This should only be called by a newer version of the Public API. Identical versions of the Public API should not supersede older versions of that same API.
Unfortunately, we can't disable polyfills after-the-fact, so this only lets you disable the init event...
Represents the Ruffle public API.
The public API exists primarily to allow multiple installs of Ruffle on a page (e.g. an extension install and a local one) to cooperate. In an ideal situation, all Ruffle sources on the page install themselves into a single public API, and then the public API picks the newest version by default.
This API is versioned, in case we need to upgrade it. However, it must be backwards- and forwards-compatible with all known sources.