Skip to main content

Getting started

Installation​

The embedSDK is available on npm.

$ npm install @loomhq/loom-embed

It is also accessible via a script tag you can put directly into your HTML.

<script type="module">
import * as loomEmbedSDK from "https://www.unpkg.com/@loomhq/loom-embed@1.2.2/dist/esm/index.js?module";
</script>

Embedding Looms​

With a given Loom URL you can use the oembed method to fetch metadata about the video. This metadata includes an html property which can be used to set the inner HTML of a DOM node.

Input:

Output:


There is also a textReplace method which will replace Loom URLs in a given string with the embeddable HTML.

Input:

Output:

To expand a Loom URL directly, you can use the linkReplace method which targets a provided selector—such as '.loom-video' for example—and inserts the embed player on your page.

Loom Video Link

Click “Expand” below to auto-expand the link above.