- Create a web page which will be used to integrate the Applixir SDK.
- Create a WebView component in your iOS application. This component is used to get and post messages between the game code and the Applixir SDK. Perform the following tests on the WebView interface.
- WebView loads itself without cutting off any content on the webpage.
- Test for all the application supported screen resolutions.
- Test your game content and video content for all the supported screen resolutions.
- Integrate Applixir SDK. Refer the HTML integration guide for detailed instructions. The steps are listed here briefly for reference.
a) Load the Applixir library inside the head tag of the webpage.
<script type="text/javascript" src="https://cdn.applixir.com/applixir.sdk3.0m.js"></script>
b) Add the video frame. Refer Appendix C to check all the available video frame customizations.
<div id="applixir_vanishing_div" hidden>
<iframe id="applixir_parent" allow="autoplay"></iframe>
</div>
c) Define the status callback function. Refer Appendix A for the list of all the status events generated by the Applixir SDK.
function adStatusCallback(status){
switch(status) {
case "ad-started":{ //Code (if needed) to execute for “ad-started”
}
break;
case "network-error":{ //Code (if needed) for “network-error”
}
break;
…… //Code for various events generated as status
}
}
d) Define option values. Refer Appendix B for a list of all the options.
var options = {
devId: your dev id, // Account ID
gameId: your game id,
zoneId: your zone id,
cTitle: your page title or primary subject,
keywords: set of comma separated keywords describing your content,
adStatusCb: adStatusCallback, // status callback method
};
e) Invoke the video player as per the implementation.
invokeApplixirVideoUnit(options);