0

How can I run ruffle in full screen from a browser?

This is the HTML code I use to run ruffle on a web page:

<!DOCTYPE HTML>
<html>
    <head>
        <meta charset='utf8'>
    </head>
    <body>
        <div id='ruffle' style="text-align: center;"></div>
        <script src='https://xxsibxx.github.io/ruffleembedsetup112/ruffle/ruffle.js'></script>
        <script>
var swfobject = {};

swfobject.embedSWF = function(url, cont, width, height){
    var ruffle = window.RufflePlayer.newest(),
        player = Object.assign(document.getElementById(cont).appendChild(ruffle.createPlayer()), {
            width: width,
            height: height,
            style: 'width: ' + width + 'px; height: ' + height + 'px',
        });
        window.RufflePlayer.config = {
    // Options affecting the whole page
    "publicPath": undefined,
    "polyfills": true,

    // Options affecting files only
    "autoplay": "on",
    "unmuteOverlay": "hidden",
    "backgroundColor": "#000000",
    "letterbox": "fullscreen",
    "warnOnUnsupportedContent": true,
    "contextMenu": false,
    "showSwfDownload": false,
    "upgradeToHttps": window.location.protocol === "https:",
    "maxExecutionDuration": {"secs": 15, "nanos": 0},
    "logLevel": "error",
    "base": null,
    "menu": true,
    "salign": "",
    "scale": "showAll",
    "quality": "medium",
};
    
    player.load({ url: url });
}

swfobject.embedSWF('URL', 'ruffle', 890, 529);
        </script>
    </body>
</html>
    </div>

Also, how can I add a loading bar when the flash movie starts, since it stays loading blank?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • Did you [try making a button](https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_element_requestfullscreen) to make the Flash/Ruffle `
    ` go to full screen?
    – VC.One Jul 28 '22 at 14:13
  • Could you help me with the code? – WrathfulScript Jul 30 '22 at 18:29
  • Did you try anything from that example? [Show us](https://stackoverflow.com/posts/73144095/edit) your code attempt that you need help with and I'll advise... – VC.One Jul 31 '22 at 20:15
  • I already solved the problem, thanks. however I would like to know how to add these lines of code to activate the loading screen of "RUFFLE" in the flash movie. – WrathfulScript Aug 01 '22 at 22:01
  • On the page it says to add to the code: "preloader": true, and then add the following: – WrathfulScript Aug 01 '22 at 22:01
  • --preloader-background - The background of the preloader. The default is Ruffle's normal blue color. Suggested options are none or any valid color value, but it can technically be any valid background. – WrathfulScript Aug 01 '22 at 22:01
  • --logo-display: Whether to display the Ruffle logo in the preloader. The default value is block. The other suggested value is none, but it can technically be any valid display. – WrathfulScript Aug 01 '22 at 22:01
  • Here is the page with the information: https://github.com/ruffle-rs/ruffle/wiki/Using-Ruffle I hope you can help me. – WrathfulScript Aug 01 '22 at 22:02
  • After your `"quality": "medium",` if you add `"preloader": true,` what happens? – VC.One Aug 02 '22 at 19:47

0 Answers0