Web Integration

Website

Depending on your needs we have two examples on how you can integrate your game on your website.

  • Embed Code

  • Fullscreen iframe

 

[WEB] Embed Code

<script id="embed-script-v1" type="application/javascript" height="90vh" expander="true" src="https://play.flarie.com/embed.js" embed-url="{your-game-url}"> </script>

Optional attributes

Attribute

Description

top

Set an optional marginTop to the gameView.Example: top='50px'. Default is 0px.

height

Set an optional height to the gameView.
Example: height='90vh'. Default is 100%.

width

Set an optional width to the gameView.Example: width='50vw'. Default is 100%.

expander

Activate an expander button that will trigger fullscreen mode. Example: expander='true'. Default value is false.

expander-img-minimize

Override the default expander minimize image. Example: expander-img-minimize='your-image-url.png'

expander-img-fullscreen

Override the default expander fullscreen image.
Example: expander-img-fullscreen='your-image-url.png'

 

[WEB] Fullscreen iframe


<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no minimal-ui'/>
<meta name='apple-mobile-web-app-capable' content='yes'/>
<meta name='screen-orientation' content='portrait'/>
<meta http-equiv='ScreenOrientation' content='autoRotate:disabled'>
<style>
body, html{
height: 100%;
margin:0;
padding:0;
overflow:hidden;
}
#iframe-game {
overflow:hidden;
display:block;
position: absolute;
height: 100%;
width: 100%;
margin:0;
padding:0;
border:0;
}
</style>
</head>
<body>
<iframe id="iframe-game" src="YOUR_GAME_URL"></iframe>
</body>
</html>