ruffle/web/packages/selfhosted
Nathan Adams 085c61b94f tests: In browser based tests, actually press play and check that the movie spits out some text 2020-09-13 13:51:39 -07:00
..
js web: Switch to using commonjs style require/exports 2020-05-19 11:42:55 +02:00
test/polyfill tests: In browser based tests, actually press play and check that the movie spits out some text 2020-09-13 13:51:39 -07:00
test_assets web(test): Add test for spl 2020-08-20 05:30:28 -07:00
.eslintrc.json web: Move each web package into a packages/ directory 2020-05-19 11:42:53 +02:00
.npmrc web: Add polyfill tests 2020-05-24 08:57:16 -07:00
LICENSE_APACHE chore: Copy LICENSE* to relevant places where package managers complain if they don't exist, and make sure they're included in distributions 2020-05-27 00:11:02 -07:00
LICENSE_MIT chore: Copy LICENSE* to relevant places where package managers complain if they don't exist, and make sure they're included in distributions 2020-05-27 00:11:02 -07:00
README.md chore: Document web with readmes 2020-05-27 00:11:02 -07:00
index.js web: Switch to using commonjs style require/exports 2020-05-19 11:42:55 +02:00
package.json web: Hoist common dev dependencies up to the top (except CLI) and hopefully improve how we bootstrap 2020-06-13 12:35:14 -07:00
wdio.conf.js chore: Workaround for chrome not being found on windows tests 2020-09-04 11:31:39 -07:00
webpack.config.js chore: Copy LICENSE* to relevant places where package managers complain if they don't exist, and make sure they're included in distributions 2020-05-27 00:11:02 -07:00

README.md

ruffle-selfhosted

ruffle-selfhosted is the intended way to get Ruffle onto your website.

You may either include it and forget about it, and we will polyfill existing Flash content, or use our APIs for custom configurations or more advanced usages of the Ruffle player.

Using ruffle-selfhosted

For more examples and in-depth documentation on how to use Ruffle on your website, please check out our wiki.

Host Ruffle

Before you can get started with using Ruffle on your website, you must host its files yourself. Either take the latest build or build it yourself, and make these files accessible by your web server.

Please note that the .wasm file must be served properly, and some web servers may not do that correctly out of the box. Please see our wiki for instructions on how to configure this, if you encounter a Incorrect response MIME type error.

"Plug and Play"

If you have an existing website with flash content, you can simply include Ruffle as a script and our polyfill magic will replace everything for you. No fuss, no mess.

<script src="path/to/ruffle/ruffle.js"></script>

Javascript API

If you want to control the Ruffle player, you may use our Javascript API.

<script>
    window.RufflePlayer = window.RufflePlayer || {};

    window.addEventListener("DOMContentLoaded", () => {
        let ruffle = window.RufflePlayer.newest();
        let player = ruffle.create_player();
        let container = document.getElementById("container");
        container.appendChild(player);
        player.stream_swf_url("movie.swf");
    });
</script>
<script src="path/to/ruffle/ruffle.js"></script>

Building, testing or contributing

Please see the ruffle-web README.