How To Upload & Embed Videos

This guide will walk you through the process of uploading and embedding videos on your websites.

Embed videos uploaded via API

If you've used our API to upload videos, you'll receive a channelKey in the upload response. This channelKey is essential for creating a video embed code on your HTML page.

Follow these steps:

Step 1

First things first, ensure that DynTube's script finds its way into the <head> section of your webpage.

<script>!function (e, t, i) { if (void 0 === e._dyntube_v1_init) { e._dyntube_v1_init = !0; var a = t.createElement("script"); a.type = "text/javascript", a.async = !0, a.src = "https://embed.dyntube.com/v1.0/dyntube.js", t.getElementsByTagName("head")[0].appendChild(a) } }(window, document);</script>

Step 2

Add a <div> element with the attribute data-dyntube-key and set its value to the channelKey.

    <div data-dyntube-key="{channelKey}"></div>

Last updated