Socket
Socket
Sign inDemoInstall

@loomhq/loom-embed

Package Overview
Dependencies
0
Maintainers
80
Versions
41
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @loomhq/loom-embed

SDK for easily embedding videos


Version published
Weekly downloads
45K
increased by7.39%
Maintainers
80
Install size
37.7 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 05 Oct 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc