{"id":13608282,"url":"https://github.com/KaneCohen/embed","last_synced_at":"2025-04-12T14:32:28.689Z","repository":{"id":10486613,"uuid":"12666375","full_name":"KaneCohen/embed","owner":"KaneCohen","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-19T09:57:07.000Z","size":83,"stargazers_count":120,"open_issues_count":5,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-04T22:07:33.896Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KaneCohen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2013-09-07T14:52:05.000Z","updated_at":"2025-03-14T13:05:36.000Z","dependencies_parsed_at":"2024-12-02T00:13:11.755Z","dependency_job_id":null,"html_url":"https://github.com/KaneCohen/embed","commit_stats":{"total_commits":68,"total_committers":5,"mean_commits":13.6,"dds":0.08823529411764708,"last_synced_commit":"65ab94e4742db52372b2168a5bf8db3a35300b32"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaneCohen%2Fembed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaneCohen%2Fembed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaneCohen%2Fembed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KaneCohen%2Fembed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KaneCohen","download_url":"https://codeload.github.com/KaneCohen/embed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581331,"owners_count":21128148,"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":"2024-08-01T19:01:25.907Z","updated_at":"2025-04-12T14:32:28.406Z","avatar_url":"https://github.com/KaneCohen.png","language":"PHP","readme":"# New Version\n\nIf you're running PHP 8+ I highly recommend using new version of the library: [OEmbed](https://github.com/KaneCohen/oembed).  \nIt has more features while still working almost the same way as this one.\n\n# Embed\n\nGenerate media html (YouTube, Vimeo, Kickstarter etc.) based on the url.\n\n## Installation\n\nAdd following require to your `composer.json` file:\n\nFor Laravel 5:\n\n~~~\n    \"cohensive/embed\": \"dev-master\"\n    // or\n    \"cohensive/embed\": \"5.5.*\"\n~~~\n\nFor Laravel 4:\n\n~~~\n    \"cohensive/embed\": \"4.3.*\"\n~~~\n\nThen run `composer install` or `composer update` to download it and autoload.\n\nIn `providers` array you need to add new package:\n\n~~~\n'providers' =\u003e array(\n\n\t//...\n\t'Cohensive\\Embed\\EmbedServiceProvider',\n\t//...\n\n)\n~~~\n\nIn aliases:\n\n~~~\n'aliases' =\u003e array(\n\n\t//...\n\t'Embed' =\u003e 'Cohensive\\Embed\\Facades\\Embed'\n\t//...\n\n)\n~~~\n\n## Usage\n\n~~~\n$embed = Embed::make('http://youtu.be/uifYHNyH-jA')-\u003eparseUrl();\n// Will return Embed class if provider is found. Otherwie will return false - not found. No fancy errors for now.\nif ($embed) {\n\t// Set width of the embed.\n\t$embed-\u003esetAttribute(['width' =\u003e 600]);\n\n\t// Print html: '\u003ciframe width=\"600\" height=\"338\" src=\"//www.youtube.com/embed/uifYHNyH-jA\" frameborder=\"0\" allowfullscreen\u003e\u003c/iframe\u003e'.\n\t// Height will be set automatically based on provider width/height ratio.\n\t// Height could be set explicitly via setAttr() method.\n\techo $embed-\u003egetHtml();\n}\n~~~\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKaneCohen%2Fembed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKaneCohen%2Fembed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKaneCohen%2Fembed/lists"}