Reputation: 1
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?
Upvotes: 0
Views: 2616