# @loomhq/loom-embed

> SDK for easily embedding videos

Latest version **1.7.0** (published 2023-10-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install @loomhq/loom-embed
pnpm add @loomhq/loom-embed
yarn add @loomhq/loom-embed
bun add @loomhq/loom-embed
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.7.0 |
| Published | 2023-10-05 |
| First published | 2018-10-03 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | @loomhq/platform |
| Maintainers | ploom, sjhsieh.loom, njain-loom, jmreidy, loomit, rekharameshloom, daniel.semmel, yiming-loom, vinraju-loom, parimal.singh, mgranmoe, imartinezmorales-loom, ayushgr.loom, romaindejean58, davidfyu, harrisonnovak, rahirikar, peterheesterman, steveatloom, dainguyendo-loom, complicated-cog, gchildsloom, garshythoel, anthonyloom, swac-loom, yoannloom, avanikaloom, amanda-loom, loom-infra-robot, lingrino, brett-loom, ilyalavrenov, stuti43, gkim795, laurabarrera, wmiller112, sadebrowne, emilyteng, joeyma22, yoichi, paul.kuang, pjang-loom, nathanthomas, andi-ni-loom, jflashlight, dkim96, btuttle, brian-nguyen-loom, maitri.shah, jose.medina, ben.lo, sergioloom, dainguyendo, tatiana_loom, jessica.pancer, thefriendlyghost, josh_loom, vinayh, loom.embed-sdk, nymerias, ydep, luis.loom, premaloom, vladloom, angelaliu, rodrigoloom, juliannaroenloom, marni.kostman, cndreisbach, narayangowraj8, dj_haile, catherinelin, andrzej.wisniewski, mosesj-loom, erinbyerly, aditya_singla, jiaweiou, loominghoward, vishalsantoshi, wilbertthelam |
| Keywords | SDK, embed |

## Links

- npm: https://www.npmjs.com/package/@loomhq/loom-embed
- Issues: https://github.com/loomhq/loom-embed/issues
- npm.io page: https://npm.io/package/@loomhq/loom-embed

## Recent versions

- 1.7.0 (latest) — 2023-10-05
- 1.1.5 (next) — 2021-02-01
- 1.6.0 — 2023-09-29
- 1.5.0 — 2022-05-12
- 1.4.0 — 2022-03-18
- 1.3.0 — 2022-03-09
- 1.2.18 — 2022-02-28
- 1.2.17 — 2022-02-16
- 1.2.16 — 2022-02-15
- 1.2.15 — 2022-02-11
- 1.2.14 — 2022-02-03
- 1.2.13 — 2022-02-02
- 1.2.12 — 2022-01-06
- 1.2.11 — 2021-12-14
- 1.2.10 — 2021-12-06
- … 26 more at https://npm.io/package/@loomhq/loom-embed/versions

## README

[![npm version](https://img.shields.io/npm/v/@loomhq/loom-embed)](https://www.npmjs.com/package/@loomhq/loom-embed)
[![CircleCI](https://img.shields.io/circleci/build/gh/loomhq/platform?token=510d0d800cbfbb8c1757c8e1705472c5d1c81238)](https://app.circleci.com/pipelines/github/loomhq/platform/2351/workflows/54eaa124-7378-48ac-80a7-a83ee3195322)
[![codecov](https://img.shields.io/badge/CodeCoverage-90%25-green)]()

## Installing

### npm package

```sh
npm install @loomhq/loom-embed
```

### Script tag
```html
<script type="module"> import * as loom from "https://www.unpkg.com/@loomhq/loom-embed@1.2.4/dist/esm/index.js?module"; </script>
```

See [documentation](https://dev.loom.com/docs/embed-sdk/getting-started) for installation and usage.

## Usage

```js
import * as loom from '@loomhq/loom-embed';
````

## Methods

### .linkReplace(selector, [options], target)

Replaces any loom links at the nodes matching the selector with the embedded video. Replacement occurs on the entire document, or on the optional target DOM element.

### .textReplace(textString, [options])

Takes a string and replaces any Loom URLs with the embed html

_-> returns a promise_

### .oembed(videoUrl, [options])

oembed metadata from the given video url

_-> returns a promise_

## Options

**The embed code is responsive by default. Only set the width/height values if you require your embed code to be a fixed size**

`width` - [Number] value specifying the max pixel width

`height` - [Number] value specifying the max pixel height

---
_Source: https://npm.io/package/@loomhq/loom-embed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
