{"id":14990243,"url":"https://github.com/social-embed/social-embed","last_synced_at":"2026-02-22T13:03:03.208Z","repository":{"id":125002253,"uuid":"565241193","full_name":"social-embed/social-embed","owner":"social-embed","description":"Utilities and web components for embeddable content (YouTube, Vimeo, Dailymotion)","archived":false,"fork":false,"pushed_at":"2025-04-11T00:24:15.000Z","size":9072,"stargazers_count":13,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T02:06:20.975Z","etag":null,"topics":["custom-element","lit","o-embed","typescript","url-parser","video","webcomponent","youtube","youtube-embed"],"latest_commit_sha":null,"homepage":"https://social-embed.git-pull.com/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/social-embed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-12T19:19:45.000Z","updated_at":"2025-04-11T00:24:18.000Z","dependencies_parsed_at":"2024-06-20T00:07:07.955Z","dependency_job_id":"6cf7bbc1-77a2-4740-a778-badfecb208a2","html_url":"https://github.com/social-embed/social-embed","commit_stats":{"total_commits":796,"total_committers":1,"mean_commits":796.0,"dds":0.0,"last_synced_commit":"aeeb64cc7920679d92e0ac1f2c3ab94d27f6ed82"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/social-embed%2Fsocial-embed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/social-embed%2Fsocial-embed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/social-embed%2Fsocial-embed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/social-embed%2Fsocial-embed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/social-embed","download_url":"https://codeload.github.com/social-embed/social-embed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505862,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-element","lit","o-embed","typescript","url-parser","video","webcomponent","youtube","youtube-embed"],"created_at":"2024-09-24T14:19:46.148Z","updated_at":"2026-02-22T13:03:03.199Z","avatar_url":"https://github.com/social-embed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Social Embed\n\n\u003e A lightweight, browser-friendly toolkit for transforming media URLs into embeddable content.\n\n[![npm version](https://img.shields.io/npm/v/@social-embed/lib.svg?style=flat)](https://www.npmjs.com/package/@social-embed/lib)\n[![npm version](https://img.shields.io/npm/v/@social-embed/wc.svg?style=flat)](https://www.npmjs.com/package/@social-embed/wc)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n\nEasily convert URLs from popular platforms (YouTube, Spotify, Vimeo, etc.) into embeddable content with zero server-side dependencies. Available as a JavaScript library or a drop-in Web Component.\n\n## Demo\n\n[Try it on CodePen](https://codepen.io/attachment/pen/poRRwdy) | [Live Examples](https://social-embed.org/wc/)\n\n```html\n\u003c!-- Before: Raw URL that users need to manually process --\u003e\nhttps://www.youtube.com/watch?v=Bd8_vO5zrjo\n\n\u003c!-- After: Simply wrap in o-embed tags --\u003e\n\u003co-embed url=\"https://www.youtube.com/watch?v=Bd8_vO5zrjo\"\u003e\u003c/o-embed\u003e\n```\n\n## Key Features\n\n- **Zero dependencies** - Client-side parsing with no backend requirements\n- **Multi-platform support** - YouTube, Spotify, Vimeo, DailyMotion, and more\n- **Lightweight** - Small footprint for fast page loads\n- **Framework-agnostic** - Works with any frontend technology\n- **Simple API** - Easy to integrate with straightforward methods\n\n## Quick Start\n\n### Option 1: Web Component\n\n```html\n\u003c!-- Add the web component --\u003e\n\u003cscript type=\"module\" src=\"https://unpkg.com/@social-embed/wc?module\"\u003e\u003c/script\u003e\n\n\u003c!-- Use it in your HTML --\u003e\n\u003co-embed url=\"https://www.youtube.com/watch?v=Bd8_vO5zrjo\"\u003e\u003c/o-embed\u003e\n```\n\n### Option 2: JavaScript Library\n\n```bash\n# Install the package\nnpm install @social-embed/lib\n```\n\n```javascript\n// Convert a URL to its embed form\nimport { convertUrlToEmbedUrl } from \"@social-embed/lib\";\n\nconst embedUrl = convertUrlToEmbedUrl(\"https://youtu.be/Bd8_vO5zrjo\");\n// Output: \"https://www.youtube.com/embed/Bd8_vO5zrjo\"\n```\n\n## Supported Platforms\n\n| Platform    | URL Examples                                     | Status      |\n|-------------|--------------------------------------------------|-------------|\n| YouTube     | youtube.com/watch?v=ID, youtu.be/ID              | ✅ Stable   |\n| Spotify     | open.spotify.com/track/ID, spotify:track:ID      | ✅ Stable   |\n| Vimeo       | vimeo.com/ID, vimeo.com/channels/staff/ID        | ✅ Stable   |\n| DailyMotion | dailymotion.com/video/ID                         | ✅ Stable   |\n| Loom        | loom.com/share/ID                                | ✅ Stable   |\n| EdPuzzle    | edpuzzle.com/media/ID                            | ✅ Stable   |\n| Wistia      | support.wistia.com/medias/ID                     | ✅ Stable   |\n\nFor more details and examples for each platform, [see the documentation](https://social-embed.org/).\n\n## Packages\n\n| Package | Description | Status | Links |\n|---------|-------------|--------|-------|\n| **@social-embed/lib** | Core library for parsing and generating embed URLs | 🟡 API in development | [Documentation](https://social-embed.org/lib/) · [npm](https://www.npmjs.com/package/@social-embed/lib) |\n| **@social-embed/wc** | Web Component for easy embedding in any HTML | ✅ Stable | [Documentation](https://social-embed.org/wc/) · [npm](https://www.npmjs.com/package/@social-embed/wc) |\n\n## Use Cases\n\n- **Content Management Systems** - Add embed functionality to user-generated content\n- **Markdown Editors** - Enhance editors with automatic embeds\n- **Social Platforms** - Turn shared links into rich embeds\n- **Documentation Sites** - Embed media examples in tutorials\n- **WYSIWYG Editors** - Integrate with HTML editors like CKEditor\n\n## Browser Support\n\nWorks in all modern browsers that support Web Components.\n\n## Projects\n\n| Package     | Source          | Website                                                | Status          | Description                               |\n| ----------- | --------------- | ------------------------------------------------------ | --------------- | ----------------------------------------- |\n| Library     | [packages/lib/] | https://social-embed.org/lib/                 | 🟡 API unstable | Constants, regexes, id scraper, url maker |\n| `\u003co-embed\u003e` | [packages/wc/]  | https://social-embed.org/wc/                  | ✅ Stable       | [custom element] / [web component]        |\n\n[packages/wc/]: packages/wc/\n[packages/lib/]: packages/lib/\n[custom element]: https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements\n[web component]: https://developer.mozilla.org/en-US/docs/Web/Web_Components\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocial-embed%2Fsocial-embed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocial-embed%2Fsocial-embed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocial-embed%2Fsocial-embed/lists"}