1.7.0 • Published 7 months ago

@loomhq/loom-embed v1.7.0

Weekly downloads
935
License
ISC
Repository
-
Last release
7 months ago

npm version CircleCI codecov

Installing

npm package

npm install @loomhq/loom-embed

Script tag

<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 for installation and usage.

Usage

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

1.7.0

7 months ago

1.6.0

7 months ago

1.5.0

2 years ago

1.2.18

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.12

2 years ago

1.2.13

2 years ago

1.2.16

2 years ago

1.2.17

2 years ago

1.2.14

2 years ago

1.2.15

2 years ago

1.2.8

2 years ago

1.2.9

2 years ago

1.2.10

2 years ago

1.2.11

2 years ago

1.2.7

2 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.2.0-beta.1

3 years ago

1.2.0-beta.0

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.4

5 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago