- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Problem with embed code (html game)
I'm trying to insert an iframe (html game), the full resolution is seen on the computer but when I do the mobile test only half the resolution is seen, I tried to adjust the resolution in height and width but it still looks bad.
this is the code:
<script type='text/javascript' id=452680> (function(d, gn,scriptId){ var prop = {'agent': 'm.softgames.de', 'bgcolor':'#fff', 'wrapperwidth':'640px', 'wrapperheight':'640px', 'gamewidth':'100%', 'gameheight':'100%', 'game_fullscreen_on_mobile':'true', 'locale':'en'}; jsid = 'sgEmbedJS';if( d.getElementById(jsid) ) {embed(d,scriptId,gn, prop); } else { var s = d.createElement('script'); s.id = jsid; s.type = 'text/javascript'; s.onload = function(){embed(d,scriptId,gn, prop);}; s.src='//dop3jnx8my3ym.cloudfront.net/embedder.js'; d.getElementsByTagName('head')[0].appendChild(s);} }(document,'touch-and-catch-sakura-blossom',452680)); </script>
I want the game to run with the full resolution also on the phone,
Help me please
sorry for my English
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report

- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Which figures in your code are you changing? The wrapper heights? It might be a little complicated trying to get that code to do something different on mobile screens.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Try adjusting the wrapper heights, if something good is achieved but the game canvas does not show the full resolution. I have been verifying another code and it works very well in computer and mobile phones.
This is the code:
<!-- Play.iDevGames.co.uk Responsive Embed Code for Glow Air Hockey Classic --> <script> window.onload = function() { var thegamelink = "https://play.idevgames.co.uk/embed/glow-air-hockey-classic"; var ref = document.referrer; var theurl = document.referrer; ref = ref.substring(ref.indexOf("://") + 3) ref = ref.split("/")[0]; if(ref == "my-ga.me"){ theurl = "true" } else { theurl = "false" } document.getElementById("embededGame").src=thegamelink+"/"+theurl; } </script> <div style="position: relative;height: 0;overflow: hidden;padding-bottom: 56.25%;"> <iframe id="embededGame" src="https://play.idevgames.co.uk/embed/glow-air-hockey-classic" width="840px" height="480px" scrolling="no" seamless="seamless" frame style="position: absolute;top:0;left: 0;width: 100%;height: 100%;">Browser not compatible.</iframe> </div> <!-- End Embed Code -->
I want to achieve the same result with this code, but I do not know the correct way to adjust the code and achieve the same result.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report