Interface SourceAPI

Represents this particular version of Ruffle.

Multiple APIs can be instantiated from different sources; e.g. an "extension" version, versus a "local" version. This expresses to the Public API negotiator (see PublicAPI) what this particular version of Ruffle is and how to control it.

interface SourceAPI {
    version: string;
    polyfill(): void;
    pluginPolyfill(): void;
    createPlayer(): PlayerElement;
}

Properties

version: string

The version of this particular API, as a string in a semver compatible format.

Methods

  • Start up the polyfills.

    Do not run polyfills for more than one Ruffle source at a time.

    Returns void

  • Polyfill the plugin detection.

    This needs to run before any plugin detection script does.

    Returns void