0.1.0-next.12 • Published 6 months ago

@social-embed/wc v0.1.0-next.12

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

<o-embed> · GitHub license npm version

A Web Component that transforms URLs from various media platforms (YouTube, Spotify, Vimeo, etc.) into embeddable frames. Because it’s a standard browser component, <o-embed> works in any HTML environment without requiring a custom server or third-party API.

Highlights

  • Browser-friendly. Built on modern Web Components.
  • No extra services. Client-side parsing from @social-embed/lib.
  • Drop-in usage. Insert <o-embed> in your HTML, or load it via ES modules.

Just want the parsing logic without the web component? See @social-embed/lib.

Demo

Example Embeds


Use Cases

  • Dynamic content backends where users enter a media URL (e.g., YouTube links).
  • WYSIWYG or HTML editors such as CKEditor with its MediaEmbed module (ckeditor#2737).
  • Embed detection: checking if a URL is embeddable. If you only need to detect and parse, consider using @social-embed/lib directly.

Tech Stack

Setup

Below are typical installation commands for each package manager.

NPM:

npm i @social-embed/wc

Yarn:

yarn add @social-embed/wc

pnpm:

pnpm add @social-embed/wc

Usage

Include the component and place an <o-embed> element in your HTML. For example:

<script type="module" src="https://unpkg.com/@social-embed/wc?module"></script>

<o-embed url="https://www.youtube.com/watch?v=G_QhTdzWBJk"></o-embed>

Alternatively, import it into your JavaScript or TypeScript file:

import "https://unpkg.com/@social-embed/wc?module";

document.body.innerHTML = `
  <o-embed url="https://youtu.be/Bd8_vO5zrjo" allowfullscreen></o-embed>
`;

Similar Tools


0.1.0-next.9

6 months ago

0.1.0-next.11

6 months ago

0.1.0-next.10

6 months ago

0.1.0-next.12

6 months ago

0.1.0-next.3

2 years ago

0.1.0-next.4

2 years ago

0.1.0-next.5

2 years ago

0.1.0-next.6

2 years ago

0.1.0-next.7

2 years ago

0.1.0-next.8

2 years ago

0.1.0-next.0

2 years ago

0.1.0-next.1

2 years ago

0.1.0-next.2

2 years ago

0.0.5-next.0

3 years ago

0.0.5-next.1

3 years ago

0.0.4-next.0

4 years ago

0.0.3-next.5

4 years ago

0.0.3-next.4

4 years ago

0.0.3-next.3

4 years ago

0.0.3-next.2

4 years ago

0.0.3-next.1

4 years ago

0.0.3-next.0

4 years ago

0.0.2

4 years ago

0.0.1-next.8

4 years ago

0.0.1-next.9

4 years ago

0.0.1-next.7

4 years ago

0.0.1-next.6

4 years ago

0.0.1-next.5

4 years ago

0.0.1-next.4

4 years ago

0.0.1-next.3

4 years ago

0.0.1-next.2

4 years ago

0.0.1-next.1

4 years ago

0.0.1-next.0

4 years ago