Step 3: Use the OTP and cofiguration in embed code

❗️

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

  • {VIDEO_ID}: The ID of your video.
  • {OTP_RESPONSE.data.otp}: The OTP from the API response.

Example Embed Code

<div id="embedBox" style="width:600px;max-width:100%;height:auto;"></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://resource.inkryptvideos.com/v2-a83ns52/ink.js", true, "inkrypt", "2.x" );
    window.inkrypt.add({
        video_id    : '{VIDEO_ID}',
        otp         : '{OTP_RESPONSE.data.otp}' ,
        api         : 'api' ,
        license     : 'license' ,
        config      : '{OTP_RESPONSE.data.configuration}' ,
        container: document.querySelector("#embedBox"),
    });
</script>