Friday, 16 July 2021

Ruffle not working on mobile browsers (Chrome)

I made some simple .swf object (Actionscript 2) and wrapped it with Ruffle:

http://www.tanadsplinare.com.hr/test1/3.htm

Here's the complete code:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
</head>
<body>
<div id="container"></div>
</body>
</html>
<script>
    var file = '3';
    window.RufflePlayer = window.RufflePlayer || {};
    window.addEventListener("DOMContentLoaded", function() {
        var ruffle = window.RufflePlayer.newest();
        var player = ruffle.createPlayer();
        var container = document.getElementById("container");
        container.appendChild(player);
        player.load(file + '.swf');
    });
</script>
<script src="ruffle.js"></script>

I can open it in FF and Chrome on PC/Laptop (however, Chrome is displaying the play button at first, but that's another issue, I guess I could overcome it).

But I failed to open it on my Android phone using Chrome. I know Ruffle is supported on mobile browsers, because I've opened already sites like: https://www.albinoblacksheep.com/games/bloxorz

Here are some variations, also not working: Same thing, but scripts moved within body tag: http://www.tanadsplinare.com.hr/test1/ruffle1.htm DOMContentLoaded event fires as it should, and I proved it with an alert.

Take 2: Flash object and just ruffle plugin (according to documentation, this is enough. And yes, this works on FF and Chrome, but not in mobile Chrome) http://www.tanadsplinare.com.hr/test1/ruffle2.htm

Even more like Bloxorz: Flash object, configuring ruffle (like Bloxorz did) and ruffle plugin. And yes, this works on FF and Chrome, but not in mobile Chrome) http://www.tanadsplinare.com.hr/test1/ruffle3.htm

All possible listed variations work fine on PC/Laptop browsers, but not on mobile (Xaomi Redmi 6, Android, Chrome)



from Ruffle not working on mobile browsers (Chrome)

No comments:

Post a Comment