forked from GameDistribution/GD-HTML5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
85 lines (83 loc) · 2.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<html>
<head>
<title>Gamedistribution.com HTML5 SDK</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
html {
height: 100%;
}
body {
margin: 0;
padding: 0;
background-color: black;
overflow: hidden;
height: 100%;
}
#container {
position: absolute;
top: 0;
left: 0;
width: 0;
height: 0;
overflow: hidden;
max-width: 100%;
max-height: 100%;
min-width: 100%;
min-height: 100%;
box-sizing: border-box;
}
</style>
<script src="//acdn.adnxs.com/cmp/cmp.complete.bundle.js" async></script>
</head>
<body
style="height: 100%; margin: 0; padding: 0; background: linear-gradient(90deg,#1b3786,#24b3c0);"
>
<div id="container"></div>
<script type="text/javascript">
window["GD_OPTIONS"] = {
debug: false, // Enable debugging console. This will set a value in local storage as well, remove this value if you don't want debugging at all. You can also call it by running gdsdk.openConsole() within your browser console.
gameId: "49258a0e497c42b5b5d87887f24d27a6", // Your gameId which is unique for each one of your games; can be found at your Gamedistribution.com account.
advertisementSettings: {
autoplay: true
},
onEvent: function (event) {
switch (event.name) {
case "SDK_GAME_START":
// ...
break;
case "SDK_GAME_PAUSE":
// ...
break;
case "SDK_READY":
// ...
break;
case "SDK_ERROR":
// ...
break;
case "SDK_GDPR_TRACKING":
// ..
break;
case "SDK_GDPR_TARGETING":
// ..
break;
case "SDK_GDPR_THIRD_PARTY":
// ..
break;
}
}
};
(function (d, s, id) {
var js,
fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id))
return;
js = d.createElement(s);
js.id = id;
js.src = "./lib/main.js?v=1";
fjs
.parentNode
.insertBefore(js, fjs);
})(document, "script", "gamedistribution-jssdk");
</script>
</body>
</html>