Installation

Installing the JavaScript SDK.

To set up the JavaScript SDK three files must be made available:

  • JavaScript resource

  • CSS resource

  • JWPlayer JavaScript resource

All three files must be added to your web application's index.html. These files are made available via CDN (Content Delivery Network). The following code can be copied and pasted to access the CDN and obtain the SDK.

<link href="https://cdn.snapodds.com/sdk/v1/clipshare-sdk.css" type="text/css" rel="stylesheet">
<script src="https://cdn.snapodds.com/sdk/v1/clipshare-sdk.js" type="text/javascript"></script>
<script src="https://cdn.jwplayer.com/libraries/ptBc3HHU.js" type="text/javascript"></script>

The SDK must be presented on the whole view port. For this reason, the following styles must be added. If you already have overlaying elements rendered inside your page, please adjust your z-index accordingly.

<style type="text/css">
  snapodds-sdk {
    z-index: 1;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
  }
</style>

Last updated