I coded somthing to rip the url of the embed for games on gd.games so i can make it on a custom page and auto full screen without needing to download the game and unzip it, (if ur interested in the code, or want to figure out what URL it gets i will put it in the end of the message), the problem is that for some games like this one it shows this
how can this be fixed?
(also i discovered that this page stopped working today and have no idea how longago this started, i have tried using other devices, republishing the game and more, this only seems to happen for some of my games not all)
and here is the code i made for the website (you can also fork on replit at replit.com/@gabrielzv1233/GDgames-fullscreener)
updater.sh (for linux)
#!/bin/bash
clear
#define color variables
GREEN='\033[0;32m'; BLUE='\033[0;34m'; RED='\033[0;31m'; NC='\033[0m'
# define variables
txt=$(<URLs.txt)
url="https://gd.games/gabrielzv1233/gun-test"
html=$(curl -s $url)
# Parse the HTML and find the first iframe element that contains the specified string
url=$(echo "$html" | pup 'iframe[src*="games.gdevelop-app.com/game"]:first-of-type attr{src}')
# Check if the extracted URL contains the specified string
if [[ "$url" == *"games.gdevelop-app.com/game"* ]]; then
# Write the extracted URL to URLs.txt
echo "$url" > URLs.txt
# log program finish
echo -e "[${BLUE}updater${NC}] ${GREEN}game updated!${NC} find the URL in URLs.txt"
echo -e "[${BLUE}updater${NC}] Old URL: ${GREEN}${txt}"
else
echo -e "[${BLUE}updater${NC}] ${RED}An unknown error has occurred${NC}"
exit 1
fi
index.html
<html>
<head>
<link rel="shortcut icon"
href="/favicon.png">
<title>gun test</title>
<style>
html
{
overflow: auto;
}
html, body, div, iframe
{
margin: 0px;
padding: 0px;
height: 100%;
border: none;
}
iframe
{
display: block;
width: 100%;
border: none;
overflow-y: auto;
overflow-x: hidden;
}
</style>
</head>
<body>
<iframe id="game-frame"
allow="autoplay; fullscreen *; geolocation; microphone; camera; midi; monetization; xr-spatial-tracking; gamepad; gyroscope; accelerometer; xr; keyboard-map *; focus-without-user-activation *; screen-wake-lock" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-presentation allow-scripts allow-same-origin allow-popups-to-escape-sandbox allow-downloads" scrolling="no" allowfullscreen="" style="width:100%;height:100%" frameborder="0"
marginheight="0" marginwidth="0" width="100%" height="100%"></iframe>
<script>
fetch("URLs.txt")
.then(response => response.text())
.then(url => {
const iframe = document.getElementById("game-frame");
iframe.src = url;
});
</script>
</body>
</html>