Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loomhq/loom-embed

Package Overview
Dependencies
Maintainers
7
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loomhq/loom-embed

SDK for easy embedding videos

  • 1.1.1
  • npm
  • Socket score

Version published
Weekly downloads
18K
decreased by-21.38%
Maintainers
7
Weekly downloads
 
Created
Source

loom-embed

Easy embedding and link expansion of Loom videos

Visit the Docs for full examples

Installing

npm package

npm install @loomhq/loom-embed

script tag

<script src="https://cdn.loom.com/loom-embed/v1.0.4/sdk.js"></script>

See the CHANGELOG.md for the latest version

Usage

import loom from '@loomhq/loom-embed'

If installed by script tag, the methods are exposed through window.loom

Methods

.expand(selector, [options])

expands any loom links at the nodes matching the selector

.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

Development

Documentation/Examples

For working examples of each method run the local dev server

npm start

visit http://localhost:8989/ in your browser

Running tests

npm test

FAQs

Package last updated on 20 Jan 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc