-
Notifications
You must be signed in to change notification settings - Fork 46
Description
I'll admit it, I cause my own issues. I want to run a CPPS server for personal use on my proxmox server at home. I want it to run through a custom html website that has ruffle built in so I don't need to use a special browser. I asked Gemini to help because I was lazy and now it's definitely not working.
I'm curious if there is a solution for my problem though that exists already instead of the horrid concoction I've made up or if it's easy to do natively.
What happened is it basically told me to setup wand, then create an index.html under the main www/nginx section with the below code (replacing placeholder stuff with the IP). it seemed to work, Ruffle loaded but it's just blank. After 30 more minutes of troubleshooting I realised there must be a better way.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>My CPPS</title>
<style>
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background-color: #1a4379; }
#container { width: 100vw; height: 100vh; }
</style>
<script src="https://unpkg.com/@ruffle-rs/ruffle"></script>
</head>
<body>
<div id="container"></div>
<script>
window.RufflePlayer = window.RufflePlayer || {};
window.RufflePlayer.config = {
"autoplay": "on",
"unmuteOverlay": "visible",
"splashScreen": false
};
window.addEventListener("load", (event) => {
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
const container = document.getElementById("container");
container.appendChild(player);
// Point this to your Wand server's local IP address and the main SWF file
player.load("http://PLACEHOLDER/media/play/v2/client/load.swf");
});
</script>
</body>
</html>