{"id":28763416,"url":"https://github.com/verbb/craft-videoembedder","last_synced_at":"2025-07-22T19:34:08.847Z","repository":{"id":57017095,"uuid":"99496675","full_name":"verbb/craft-videoembedder","owner":"verbb","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-13T21:03:19.000Z","size":124,"stargazers_count":17,"open_issues_count":4,"forks_count":16,"subscribers_count":3,"default_branch":"v1","last_synced_at":"2025-07-14T06:35:37.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/verbb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null},"funding":{"github":"verbb"}},"created_at":"2017-08-06T15:44:56.000Z","updated_at":"2025-01-13T21:03:23.000Z","dependencies_parsed_at":"2025-05-13T05:15:40.599Z","dependency_job_id":"9a49802e-42c3-464d-8305-a296462957ce","html_url":"https://github.com/verbb/craft-videoembedder","commit_stats":null,"previous_names":["mikestecker/craft-videoembedder"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/verbb/craft-videoembedder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fcraft-videoembedder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fcraft-videoembedder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fcraft-videoembedder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fcraft-videoembedder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verbb","download_url":"https://codeload.github.com/verbb/craft-videoembedder/tar.gz/refs/heads/v1","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verbb%2Fcraft-videoembedder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265893234,"owners_count":23845125,"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":[],"created_at":"2025-06-17T09:09:12.540Z","updated_at":"2025-07-22T19:34:08.824Z","avatar_url":"https://github.com/verbb.png","language":"PHP","funding_links":["https://github.com/sponsors/verbb"],"categories":[],"sub_categories":[],"readme":"\u003e [!IMPORTANT]\n\u003e **Video Embedder** is no longer in development, in favour of [Video Picker](https://verbb.io/blog/video-picker).\n\u003e\n\u003e If you've got a Craft 3 site using Video Embedder, [talk to us](https://verbb.io/contact) about a **free** licenses for Video Picker to get your site upgraded.\n\n# Video Embedder plugin for Craft CMS 3.x\nCraft plugin to generate an embed URL from a YouTube or Vimeo URL. This plugin will be 100% free.\n\nPorted over from [Viget's](https://viget.com) [Video Embed plugin for Craft 2.x](https://github.com/vigetlabs/craft-videoembed).\n\n## Requirements\n\nThis plugin requires Craft CMS 3.0.0 or later.\n\n## Installation\n\nTo install Video Embedder, follow these steps:\n\n1. Install with Composer via `composer require mikestecker/craft-videoembedder` from your project directory\n2. Install plugin in the Craft Control Panel under Settings \u003e Plugins\n\nVideo Embedder works on Craft 3.x.\n\n## Video Embedder Overview\n\nVideo Embedder will take your YouTube or Vimeo URL's and convert the URL into an embed-friendly URL for use inside an iframe tag. Video Embedder also has a variable which will take the same URL and get the thumbnail image URL.\n\n## Using Video Embedder\n\nPass a YouTube or Vimeo URL to the `getEmbedUrl` variable and an embed URL will be returned. The plugin will check if the URL is valid and allows embedding. If it doesn't, it will return an empty string.\n\n```\n{% set embed = craft.videoEmbedder.getEmbedUrl('https://www.youtube.com/watch?v=6xWpo5Dn254') %}\n\n{% if embed | length %}\n    {{ embed }}\n{% endif %}\n```\n\n**Example:**\n\n```\n{% set embed = craft.videoEmbedder.getEmbedUrl('https://www.youtube.com/watch?v=6xWpo5Dn254') %}\n\n{% if embed | length %}\n    \u003ciframe src=\"{{ embed }}\"\u003e\u003c/iframe\u003e\n{% endif %}\n```\n\n**Output:**\n\n```\n\u003ciframe src=\"//www.youtube.com/embed/6xWpo5Dn254\"\u003e\u003c/iframe\u003e\n```\n\n___\n\n***New in 1.0.5:***\n\n `getEmbedUrl` will now accept optional parameters to YouTube and Vimeo URL's such as `autoplay`, `rel`, etc:\n\n```\n{% set embed = craft.videoEmbedder.getEmbedUrl('https://www.youtube.com/watch?v=6xWpo5Dn254', {autoplay: 1, rel: 0, theme: 'dark'}) %}\n```\n\n___\n\nVideo Embedder will also pull the largest thumbnail URL from YouTube or Vimeo using the `getVideoThumbnail` variable.\n\n```\n{% set thumbnail = craft.videoEmbedder.getVideoThumbnail('https://www.youtube.com/watch?v=6xWpo5Dn254') %}\n\n{% if thumbnail | length %}\n    {{ thumbnail }}\n{% endif %}\n```\n\n**Output:**\n\n```\n//img.youtube.com/vi/6xWpo5Dn254/0.jpg\n```\n\n___\n\n***New in 1.0.5:*** \n\nVideo Embedder will now generate the iframe code. Simple use the `embed` variable with your URL. You can also pass in optional parameters to YouTube and Vimeo URL's such as `autoplay`, `rel`, etc.\n\nBasic example:\n```\n{% set embed = craft.videoEmbedder.embed('https://www.youtube.com/watch?v=6xWpo5Dn254') %}\n\n{% if embed | length %}\n    {{ embed }}\n{% endif %}\n```\n\nWith parameters:\n```\n{% set embed = craft.videoEmbedder.embed('https://www.youtube.com/watch?v=6xWpo5Dn254', {autoplay: 1, rel: 0, theme: 'dark'}) %}\n```\n\nThese parameters will simply output at the end of the embed URL string and have only been tested with YouTube and Vimeo. Check with each provider for which parameters are supported.\n\n___\n\n***New in 1.0.9:*** \n\nReturn only the Vimeo or YouTube ID from the URL. This is helpful in use cases such as using it with [Plyr](https://github.com/sampotts/plyr/)\n\nBasic example:\n```\n{% set videoUrl = 'https://www.youtube.com/watch?v=6xWpo5Dn254' %}\n{% set videoId = craft.videoEmbedder.getVideoId(videoUrl) %}\n{% set providerName = craft.videoEmbedder.getProviderName(videoUrl) %}\n\n{% if videoId | length %}\n    \u003cdiv id=\"player\" data-plyr-provider=\"{{ providerName | lower }}\" data-plyr-embed-id=\"{{ videoId }}\"\u003e\u003c/div\u003e\n{% endif %}\n```\n\n\n## Video Embedder Roadmap\n\nSome things to do, and ideas for potential features:\n\n- [x] Add in the ability to actually generate the iframe HTML\n- [x] Add new Video URL fieldype (thanks @samuelbirch!)\n- [ ] Limit Video URL fieldtype to only allow for supported video URL's\n- [ ] Add support for more video providers (partially added with 1.0.5 by switching to using the [Embed](https://github.com/oscarotero/Embed) library)\n- [ ] Add more thumbnail size options\n- [ ] Testing\n\nThis is my first plugin and I'm not very experienced with plugin development. Feel free to fork away, add whatever you'd like to see and send me a pull request.\n\nBrought to you by [Mike Stecker](http://github.com/mikestecker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverbb%2Fcraft-videoembedder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverbb%2Fcraft-videoembedder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverbb%2Fcraft-videoembedder/lists"}