3 ruffle-selfhosted is the intended way to get Ruffle onto your website.
5 You may either include it and forget about it, and we will polyfill existing Flash content,
6 or use our APIs for custom configurations or more advanced usages of the Ruffle player.
8 ## Using ruffle-selfhosted
10 For more examples and in-depth documentation on how to use Ruffle on your website, please
11 [check out our wiki](https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#web).
15 The `selfhosted` package is configured for websites that do not use bundlers or npm and just want
16 to get up and running. If you'd prefer to use Ruffle through npm and a bundler, please
17 [refer to ruffle core](https://github.com/ruffle-rs/ruffle/tree/master/web/packages/core).
19 Before you can get started with using Ruffle on your website, you must host its files yourself.
20 Either take the [latest build](https://github.com/ruffle-rs/ruffle/releases)
21 or [build it yourself](https://github.com/ruffle-rs/ruffle/blob/master/web/README.md), and make these files accessible by your web server.
23 Please note that the `.wasm` file must be served properly, and some web servers may not do that
24 correctly out of the box. Please see [our wiki](https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle#configure-wasm-mime-type)
25 for instructions on how to configure this, if you encounter a `Incorrect response MIME type` error.
29 If you have an existing website with flash content, you can simply include Ruffle as a script and
30 our polyfill magic will replace everything for you. No fuss, no mess.
33 <script src="path/to/ruffle/ruffle.js"></script>
38 If you want to control the Ruffle player, you may use our Javascript API.
42 window.RufflePlayer = window.RufflePlayer || {};
44 window.addEventListener("DOMContentLoaded", () => {
45 let ruffle = window.RufflePlayer.newest();
46 let player = ruffle.createPlayer();
47 let container = document.getElementById("container");
48 container.appendChild(player);
49 player.load("movie.swf");
52 <script src="path/to/ruffle/ruffle.js"></script>
55 ## Building, testing or contributing
57 Please see [the ruffle-web README](https://github.com/ruffle-rs/ruffle/blob/master/web/README.md).