Getting started

Integration & migration

Image & video API

DAM user guide

API overview

Account

Embed video

Learn how to embed videos stored in the ImageKit DAM on your website or application.


Embedding a video from ImageKit DAM allows you to add the video directly to a web page or a blog without integrating your own video player.

Embedded videos are ready for playback without any other effort, show a preview thumbnail before playing, and provide a great streaming experience, quick start, and consistent playback.

You can also configure Adaptive Bitrate Streaming ABS for embedded videos supporting HLS and MPEG-DASH, and use video transformations compatible with ABS. This will create an experience similar to YouTube, where the video stream adjusts according to the user's network speed and other factors.

ImageKit automatically generates the necessary encoded streaming representations and the required files.

Typically, the code to embed a video appears as follows:

Copy
<iframe width="560" height="315" 
    src="https://imagekit.io/player/embed/demo/sample-video.mp4?thumbnail=https%3A%2F%2Fik.imagekit.io%2Fdemo%2Fsample-video.mp4%2Fik-thumbnail.jpg" 
    title="ImageKit video player" 
    frameBorder="0" 
    allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen">
</iframe>

Get embed code

You can only embed [published] video files. To get the embed code, right-click on the video file and select "Embed" from the dropdown menu. You can access the same option from the file detail page by clicking on the "Embed" button at the top.

Upon selecting "Embed", a modal will appear with various configuration options and the embed iframe code.

The following embed options are available:

Expiration time

The expiration time option is only available for private video files.

By default, embedded video does not expire. To specify an expiration date and time, deselect the "Never expire" checkbox.

Adaptive Bitrate Streaming (ABS)

You can enable Adaptive Bitrate Streaming(ABS) and embed the videos using either HTTP Live Streaming (HLS) or Dynamic Adaptive Streaming over HTTP (MPEG-DASH) protocols. To do so, select the "Enable ABS" option and choose your preferred protocol and resolution options from the dropdown menu.

An option to enter custom ABS transformation strings is also available. This can be used to add other supported video transformation parameters compatible with Adaptive Bitrate Streaming-enabled video.

The transformation string must contain sr-<representations> transformation for ABS.

Additionally, named transformation can be incorporated as part of a custom transformation string by specifying tr:n-<named_transform>.