{"_id":"@barcia/astro-youtube","name":"@barcia/astro-youtube","dist-tags":{"latest":"1.0.0-beta.2"},"versions":{"1.0.0-beta.2":{"name":"@barcia/astro-youtube","description":"Astro component for embedding YouTube videos","version":"1.0.0-beta.2","type":"module","exports":{".":"./YouTube.astro"},"keywords":["astro","youtube","component","embed","lite-youtube-embed","lite-youtube","astro-component"],"author":{"name":"Iván Barcia"},"license":"MIT","dependencies":{"lite-youtube-embed":"^0.3.3"},"homepage":"https://github.com/barcia/astro-utils","repository":{"type":"git","url":"git+https://github.com/barcia/astro-utils.git"},"_id":"@barcia/astro-youtube@1.0.0-beta.2","gitHead":"d5f2a88f5d4c62c00ae1b5f97dbd761fadaf1e85","bugs":{"url":"https://github.com/barcia/astro-utils/issues"},"_nodeVersion":"22.10.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-lcAAfPRtjYvZDkaQy3e6aGuGVpa5MbpfxTZJrBFScO1HH3E3Ucuz8bJRWhPCDzXRN9GkWYPJ7fH8ZurctFs6WQ==","shasum":"c25ab696aca389596b0cc55a403e9fd7b69031b3","tarball":"https://registry.npmjs.org/@barcia/astro-youtube/-/astro-youtube-1.0.0-beta.2.tgz","fileCount":5,"unpackedSize":6746,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKnbu2EtyUyE4odeSAOz+4aXdqtf8M95XAGT8mScloYAiBrIQXCcn0P3w4FROdeHcHXVzk31p/bS5kMTwSUlMcQsw=="}]},"_npmUser":{"name":"barcia","email":"ivanbarcia@icloud.com"},"directories":{},"maintainers":[{"name":"barcia","email":"ivanbarcia@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/astro-youtube_1.0.0-beta.2_1731014275476_0.9232053659445645"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-07T21:17:55.338Z","1.0.0-beta.2":"2024-11-07T21:17:55.705Z","modified":"2024-11-07T21:17:56.042Z"},"maintainers":[{"name":"barcia","email":"ivanbarcia@icloud.com"}],"description":"Astro component for embedding YouTube videos","homepage":"https://github.com/barcia/astro-utils","keywords":["astro","youtube","component","embed","lite-youtube-embed","lite-youtube","astro-component"],"repository":{"type":"git","url":"git+https://github.com/barcia/astro-utils.git"},"author":{"name":"Iván Barcia"},"bugs":{"url":"https://github.com/barcia/astro-utils/issues"},"license":"MIT","readme":"# Astro YouTube Component\nA YouTube component for Astro with type safety and support for YouTube Player Parameters. Is a wrapper of [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) with some improvements.\n\n* Type safety.\n* Lightweight and minimalistic.\n* Can be used with `url` or `id` of the YouTube video.\n* Support for custom title.\n* Support for official YouTube Player Parameters with type safety.\n* By default, uses the best available cover resolution.\n* By default, sets equal borders radius of official YouTube website (can be disabled).\n* Set aspect ratio to 16/9 by default.\n* Wrapper of [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed).\n    * approximately 224x faster\n    * lite-youtube uses youtube-nocookie.com instead of youtube.com in order to be more privacy friendly\n\n\n## Usage\n\nImport the component and use with the `url` prop or the `id` prop:\n```jsx\nimport YouTube from \"@barcia/astro-youtube\";\n\n<YouTube url=\"https://www.youtube.com/watch?v=QdBZY2fkU-0\" />\n\n<!-- or -->\n\n<YouTube id=\"QdBZY2fkU-0\" />\n```\nAdd the `title` prop to set the title of the video.\n\n```jsx\n<YouTube url=\"https://www.youtube.com/watch?v=QdBZY2fkU-0\" title=\"GTA 6 Trailer\" />\n```\n\nAdd any YouTube Player Parameters to the component, listed [here](https://developers.google.com/youtube/player_parameters) and with type safety.\n\n```jsx\n<YouTube url=\"https://www.youtube.com/watch?v=QdBZY2fkU-0\" autoplay=\"1\" />\n```\n\n## Props\n### Component related\n| Prop name | Description |\n| --------- | ----------- |\n| `url` | The URL of the YouTube video. |\n| `id` | The ID of the YouTube video. |\n| `title` | Optional title of the YouTube video. |\n| `borderRadius` | Set false to remove the official YouTube player border radius. By default, is true. |\n\n### YouTube Player Parameters\nSee the [Official YouTube Player Parameters](https://developers.google.com/youtube/player_parameters#Parameters) for check all available parameters.\n\n## Acknowledgments\n* [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) by [Paul Irish](https://github.com/paulirish)\n* [eleventy-plugin-youtube-embed](https://github.com/gfscott/eleventy-plugin-youtube-embed/blob/main/lib/extractMatches.js)\n\n\n## Author\n* https://barcia.dev\n* https://github.com/barcia\n* https://bsky.app/profile/barcia.dev\n\n## License\nMIT License.\n\n","readmeFilename":"README.md"}