Use the OTP and cofiguration in embed code

❗️

Use this code in your front-end to embed any video with your dynamic watermark:

  • {DOCUMENT_ID}: The ID of your EPUB document.
  • {OTP_RESPONSE.data.otp}: The OTP from the API response.

Example Embed Code

<div id="container" style="height: 100%;width:100%;"></div>

<script>
  (function(i, n, k, r, y, p, t ) {
      i[p] = i[p] || {};
      i[p].add = i[p].add || function I(j) {
          (i[p].a = i[p].a || []).push(j);
      };
      if (!i[p].d) {
          i[p].d = 1 * new Date();
          i[p].t = y;
          const a = n.createElement(k);
          const m = n.getElementsByTagName(k)[0];
          a.async = 1;
          a.src = r;
          i[p].y = t;
          m.parentNode.insertBefore(a, m);
      }
  })(window, document, "script", "https://docreader.inkryptvideos.com/v1/ink.js", true, "inkrypt_doc_reader_client", "1.x" );
  window.inkrypt_doc_reader_client.add({
    container   : document.querySelector("#container"),
    document_id : '{DOCUMENT_ID}',
    otp         : '{OTP_RESPONSE.data.otp}' ,
    api         : 'api' ,
    license     : 'license' ,
  });
</script>