3

I am converting my legacy swf into my blog using Ruffle. I use this code that is perfectly working, but I'd like to make the swf autoplay on loading. Can you help me? Thanks.

<script src="https://www.sinapsi.org/public/ruffle/ruffle.js"></script>
<object width="750" height="550">
    <param name="movie" value="https://www.sinapsi.org/public/espressione01.swf">
    <embed src="https://www.sinapsi.org/public/espressione01.swf">
    </embed>
</object>
passegua
  • 71
  • 1
  • 7

2 Answers2

0

I just sorted this out yesterday! There are many configurations that you can add to ruffle, but the documentation is not too easy to understand (or find!). Open your ruffle.js file and add:

window.RufflePlayer = window.RufflePlayer || {};
    window.RufflePlayer.config = {
    "autoplay": "on", 
    "splashscreen": false, 
    "unmuteOverlay":"hidden",
};

and providing that you have the call to ruffle on all webpages then the swfs will play automatically.

charco
  • 71
  • 6
  • Thanks, but I'd rather leave ruffle.js untouched. I am using these lines as suggested by another user. See my own answer. – passegua Jul 13 '23 at 08:41
0

Thanks, but I'd rather leave ruffle.js untouched. I am using these lines as suggested by another user:

<script>
    window.RufflePlayer = window.RufflePlayer || {};
    window.RufflePlayer.config = {
        "warnOnUnsupportedContent": false, 
        "autoplay": "on", 
        "unmuteOverlay": "hidden"
    };
</script>

<script src="https://www.sinapsi.org/public/ruffle/ruffle.js"></script>
<object width="750" height="550">    
<param name="movie" value="https://www.sinapsi.org/public/mygame.swf" />    
<embed src="https://www.sinapsi.org/public/mygame.swf" />    
</object>
passegua
  • 71
  • 1
  • 7