{"_id":"@azharrasheed/ngx-embed-video","_rev":"1-ff610ca86a8e75f6735b2d0f3fec6138","name":"@azharrasheed/ngx-embed-video","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@azharrasheed/ngx-embed-video","version":"1.0.0","scripts":{"build":"ngc -p tsconfig.json","lint":"tslint --force --project tsconfig.json src/*.ts","prepublish":"tsc","tsc":"tsc","test":"karma start"},"repository":{"type":"git","url":"git+https://github.com/azharrashe3d/ngx-embed-video.git"},"author":{"name":"SamirHodzic","email":"samir.sgd@gmail.com"},"keywords":["typescript","angular","angular6","ng6","ngx","embed-video","embed","typescript","youtube","vimeo","dailymotion","video"],"license":"MIT","bugs":{"url":"https://github.com/azharrashe3d/ngx-embed-video/issues"},"main":"./dist/index.js","peerDependencies":{"@angular/core":"^6.0.0","@angular/common":"^6.0.0"},"devDependencies":{"@angular/common":"^12.2.17","@angular/compiler":"^12.2.17","@angular/compiler-cli":"^12.2.17","@angular/core":"^12.2.17","@angular/http":"^7.2.16","@angular/platform-browser":"^12.2.17","@angular/platform-browser-dynamic":"^12.2.17","@angular/platform-server":"^12.2.17","@types/jasmine":"^2.8.9","codelyzer":"^4.5.0","core-js":"^2.5.7","jasmine-core":"^2.99.1","karma":"^1.7.0","karma-chrome-launcher":"^2.2.0","karma-jasmine":"^1.1.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"^0.0.31","karma-webpack":"^2.0.13","rxjs":"^6.3.3","rxjs-compat":"^6.3.3","ts-helpers":"^1.1.2","ts-loader":"^2.0.3","tslint":"^5.11.0","typescript":"^2.9.2","webpack":"^2.3.1","zone.js":"^0.8.26"},"engines":{"node":">=0.8.0"},"description":"> Get embed code for embedding youtube/vimeo/dailymotion/\\* video in websites from URL or ID in Angular 6+. > Currently supports YouTube, Vimeo and Dailymotion. Feel free to make pull request to add others!","homepage":"https://github.com/azharrashe3d/ngx-embed-video#readme","directories":{"test":"tests"},"gitHead":"4b9242336f743ccea0fbc401dfa51573a387868d","_id":"@azharrasheed/ngx-embed-video@1.0.0","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-RJDZeA8od4J+uLTzIP5R8WCzyPbIOiGCp1ZmLLl6tZ3Dzn5VXzthnGVD44oCqHuZiCFHyjk3AvjxI4Hz7CfyZw==","shasum":"e3cdd07826fe3cd842e27fd39435a6615be5fc69","tarball":"https://registry.npmjs.org/@azharrasheed/ngx-embed-video/-/ngx-embed-video-1.0.0.tgz","fileCount":3,"unpackedSize":9581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFbH0J1ktHqM41Y/AZlqsuakUoHQFTq2/+LwIrxG3PTAiA4yEdpE0RUoRhGzcI8u6/gjqZHWkhrMCPdXBHdEjeoAg=="}]},"_npmUser":{"name":"azharrasheed","email":"azhar.rasheed19@gmail.com"},"maintainers":[{"name":"azharrasheed","email":"azhar.rasheed19@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-embed-video_1.0.0_1699885818275_0.9355433146989012"},"_hasShrinkwrap":false},"1.0.1":{"name":"@azharrasheed/ngx-embed-video","version":"1.0.1","scripts":{"build":"ngc -p tsconfig.json","lint":"tslint --force --project tsconfig.json src/*.ts","prepublish":"tsc","tsc":"tsc","test":"karma start"},"repository":{"type":"git","url":"git+https://github.com/azharrashe3d/ngx-embed-video.git"},"author":{"name":"SamirHodzic","email":"samir.sgd@gmail.com"},"keywords":["typescript","angular","angular6","ng6","ngx","embed-video","embed","typescript","youtube","vimeo","dailymotion","video"],"license":"MIT","bugs":{"url":"https://github.com/azharrashe3d/ngx-embed-video/issues"},"main":"./dist/index.js","peerDependencies":{"@angular/core":"^6.0.0","@angular/common":"^6.0.0"},"devDependencies":{"@angular/common":"^12.2.17","@angular/compiler":"^12.2.17","@angular/compiler-cli":"^12.2.17","@angular/core":"^12.2.17","@angular/http":"^7.2.16","@angular/platform-browser":"^12.2.17","@angular/platform-browser-dynamic":"^12.2.17","@angular/platform-server":"^12.2.17","@types/jasmine":"^2.8.9","codelyzer":"^4.5.0","core-js":"^2.5.7","jasmine-core":"^2.99.1","karma":"^1.7.0","karma-chrome-launcher":"^2.2.0","karma-jasmine":"^1.1.2","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"^0.0.31","karma-webpack":"^2.0.13","rxjs":"^6.3.3","rxjs-compat":"^6.3.3","ts-helpers":"^1.1.2","ts-loader":"^2.0.3","tslint":"^5.11.0","typescript":"^2.9.2","webpack":"^2.3.1","zone.js":"^0.8.26"},"engines":{"node":">=0.8.0"},"description":"> Get embed code for embedding youtube/vimeo/dailymotion/\\* video in websites from URL or ID in Angular 6+. > Currently supports YouTube, Vimeo and Dailymotion. Feel free to make pull request to add others!","homepage":"https://github.com/azharrashe3d/ngx-embed-video#readme","directories":{"test":"tests"},"gitHead":"c20f4a69ac49d1e09e1ba3f381745df815d1ff0c","_id":"@azharrasheed/ngx-embed-video@1.0.1","_nodeVersion":"16.20.2","_npmVersion":"8.19.4","dist":{"integrity":"sha512-7OnSUUogpzqC+Jkm4P524tjinKQVSLDsz+XUl9QaQRf+2dzYIaq/hSCnaDDQ2ZZB3FNw/0DTDwwa1G66wUeI/w==","shasum":"b09401017ca697c963319a6b48be662b7e3474f9","tarball":"https://registry.npmjs.org/@azharrasheed/ngx-embed-video/-/ngx-embed-video-1.0.1.tgz","fileCount":3,"unpackedSize":9581,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA8FIUoPJA9923/xuLcMwK2ikGhj5BkENLLPlUG9qDRaAiAyhYl44F0WBIfS8ZQxFSDF/8iawlMvwuFoSMqwtOUH5w=="}]},"_npmUser":{"name":"azharrasheed","email":"azhar.rasheed19@gmail.com"},"maintainers":[{"name":"azharrasheed","email":"azhar.rasheed19@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ngx-embed-video_1.0.1_1699885905311_0.9350133252018114"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-13T14:30:18.172Z","1.0.0":"2023-11-13T14:30:18.482Z","modified":"2023-11-13T14:31:45.645Z","1.0.1":"2023-11-13T14:31:45.455Z"},"maintainers":[{"name":"azharrasheed","email":"azhar.rasheed19@gmail.com"}],"description":"> Get embed code for embedding youtube/vimeo/dailymotion/\\* video in websites from URL or ID in Angular 6+. > Currently supports YouTube, Vimeo and Dailymotion. Feel free to make pull request to add others!","homepage":"https://github.com/azharrashe3d/ngx-embed-video#readme","keywords":["typescript","angular","angular6","ng6","ngx","embed-video","embed","typescript","youtube","vimeo","dailymotion","video"],"repository":{"type":"git","url":"git+https://github.com/azharrashe3d/ngx-embed-video.git"},"author":{"name":"SamirHodzic","email":"samir.sgd@gmail.com"},"bugs":{"url":"https://github.com/azharrashe3d/ngx-embed-video/issues"},"license":"MIT","readme":"# ngx-embed-video\n\n> Get embed code for embedding youtube/vimeo/dailymotion/\\* video in websites from URL or ID in Angular 6+.\n> Currently supports YouTube, Vimeo and Dailymotion. Feel free to make pull request to add others!\n\n[![npm-url][npm-url-svg]][npm-url]\n[![npm-url][down-url-svg]][npm-url]\n[![npm-url][down-url-dw-svg]][npm-url]\n[![build-url][build-url-svg]][build-url]\n[![Dependencies][dependencies]][dependencies-url]\n\nPlay with `ngx-embed-video` live on [stackblitz.com/ngx-embed-video-example](https://stackblitz.com/edit/ngx-embed-video-example).\n\n## Installation\n\nTo install ngx-embed-video library, run:\n\n```bash\n$ npm install ngx-embed-video --save\n```\n\n## Consuming EmbedVideo library\n\nand then in your Angular `AppModule`:\n\n```typescript\nimport { HttpClientModule } from '@angular/common/http';\nimport { EmbedVideo } from 'ngx-embed-video';\n\n@NgModule({\n  imports: [HttpClientModule, EmbedVideo.forRoot()]\n})\nexport class AppModule {}\n```\n\nOnce your library is imported, you can use it in your Angular application.\n\nExample usage:\n\n```typescript\nimport { Component } from '@angular/core';\nimport { EmbedVideoService } from 'ngx-embed-video';\n\n@Component({\n  selector: 'app-component',\n  templateUrl: './template.html'\n})\nexport class AppComponent {\n  vimeoUrl = 'https://vimeo.com/197933516';\n  youtubeUrl = 'https://www.youtube.com/watch?v=iHhcHTlGtRs';\n  dailymotionUrl =\n    'https://www.dailymotion.com/video/x20qnej_red-bull-presents-wild-ride-bmx-mtb-dirt_sport';\n\n  vimeoId = '197933516';\n  youtubeId = 'iHhcHTlGtRs';\n  dailymotionId = 'x20qnej';\n\n  constructor(private embedService: EmbedVideoService) {\n    console.log(this.embedService.embed(this.vimeoUrl));\n    console.log(this.embedService.embed(this.youtubeUrl));\n    console.log(this.embedService.embed(this.dailymotionUrl));\n\n    console.log(this.embedService.embed_vimeo(this.vimeoId));\n    console.log(this.embedService.embed_youtube(this.youtubeId));\n    console.log(this.embedService.embed_dailymotion(this.dailymotionId));\n  }\n}\n```\n\nExample output:\n\n```html\n<iframe\n  src=\"https://player.vimeo.com/video/197933516\"\n  frameborder=\"0\"\n  webkitallowfullscreen\n  mozallowfullscreen\n  allowfullscreen\n></iframe>\n<iframe\n  src=\"https://www.youtube.com/embed/iHhcHTlGtRs\"\n  frameborder=\"0\"\n  allowfullscreen\n></iframe>\n<iframe\n  src=\"https://www.dailymotion.com/embed/video/x20qnej\"\n  frameborder=\"0\"\n  allowfullscreen\n></iframe>\n\n<iframe\n  src=\"https://player.vimeo.com/video/197933516\"\n  frameborder=\"0\"\n  webkitallowfullscreen\n  mozallowfullscreen\n  allowfullscreen\n></iframe>\n<iframe\n  src=\"https://www.youtube.com/embed/iHhcHTlGtRs\"\n  frameborder=\"0\"\n  allowfullscreen\n></iframe>\n<iframe\n  src=\"https://www.dailymotion.com/embed/video/x20qnej\"\n  frameborder=\"0\"\n  allowfullscreen\n></iframe>\n```\n\nExample usage with sanitized innerHtml iframe:\n\n```typescript\nimport { Component } from '@angular/core';\nimport { EmbedVideoService } from 'ngx-embed-video';\n\n@Component({\n  selector: 'app-component',\n  template: '<div [innerHtml]=\"iframe_html\"></div>',\n})\nexport class AppComponent {\n  iframe_html: any;\n  youtubeUrl = \"https://www.youtube.com/watch?v=iHhcHTlGtRs\";\n\n  constructor(\n    private embedService: EmbedVideoService\n  ) {\n    this.iframe_html = this.embedService.embed(youtubeUrl);\n  )\n}\n```\n\n## Usage\n\n### embed(url, [options])\n\nReturn an HTML fragment embed code (string) for the given video URL.\n\n### embed_vimeo(id, [options])\n\nReturn an HTML fragment embed code (string) for the given _vimeo_ video ID.\n\n### embed_youtube(id, [options])\n\nReturn an HTML fragment embed code (string) for the given _youtube_ video ID.\n\n### embed_dailymotion(id, [options])\n\nReturn an HTML fragment embed code (string) for the given _dailymotion_ video ID.\n\n### embed_image(url, [options])\n\nReturns an HTML `<img>` tag (string) for the given url and the `link` in a callback.\n\n```js\n{\n  link: //img.youtube.com/vi/iHhcHTlGtRs/default.jpg,\n  http: html: <img src=\"http://img.youtube.com/vi/iHhcHTlGtRs/default.jpg\" />;\n}\n```\n\n## Options\n\n### query\n\nObject to be serialized as a querystring and appended to the embedded content url.\n\n#### Example\n\n```typescript\nthis.embedService.embed_vimeo('197933516', {\n  query: { portrait: 0, color: '333' }\n});\n```\n\nOutput:\n\n```html\n<iframe\n  src=\"https://player.vimeo.com/video/197933516?portrait=0&color=333\"\n  frameborder=\"0\"\n  webkitallowfullscreen\n  mozallowfullscreen\n  allowfullscreen\n></iframe>\n```\n\n### attributes\n\nObject to add additional attributes (any) to the iframe\n\n#### Example\n\n```typescript\nthis.embedService.embed('https://youtu.be/iHhcHTlGtRs', {\n  query: { portrait: 0, color: '333' },\n  attr: { width: 400, height: 200 }\n});\n```\n\nOutput:\n\n```html\n<iframe\n  src=\"https://www.youtube.com/embed/iHhcHTlGtRs?portrait=0&color=333\"\n  frameborder=\"0\"\n  allowfullscreen\n  width=\"400\"\n  height=\"200\"\n></iframe>\n```\n\n#### Youtube Image options\n\n- default\n- mqdefault\n- hqdefault\n- sddefault\n- maxresdefault\n\n```typescript\nthis.embedService\n  .embed_image(\n    'https://www.youtube.com/watch?v=iHhcHTlGtRs', \n    { image: 'mqdefault' }\n  )\n  .then(res => {\n    this.thumbnail = res.html;\n  });\n```\n\n#### Vimeo Image options\n\n- thumbnail_small\n- thumbnail_medium\n- thumbnail_large\n\n```typescript\nthis.embedService\n  .embed_image(\n    'https://vimeo.com/197933516', \n    { image: 'thumbnail_medium' }\n  )\n  .then(res => {\n    this.thumbnail = res.html;\n  });\n```\n\n#### Dailymotion Image options\n\n- thumbnail_60_url\n- thumbnail_120_url\n- thumbnail_180_url\n- thumbnail_240_url\n- thumbnail_360_url\n- thumbnail_480_url\n- thumbnail_720_url\n- thumbnail_1080_url\n\n```typescript\nthis.embedService\n  .embed_image(\n    'https://www.dailymotion.com/video/x20qnej_red-bull-presents-wild-ride-bmx-mtb-dirt_sport',\n    { image: 'thumbnail_720_url' }\n  )\n  .then(res => {\n    this.thumbnail = res.html;\n  });\n```\n\n## License\n\nMIT\n\n[build-url]: https://travis-ci.org/SamirHodzic/ngx-embed-video\n[build-url-svg]: https://travis-ci.org/SamirHodzic/ngx-embed-video.svg?branch=master\n[down-url-svg]: https://img.shields.io/npm/dt/ngx-embed-video.svg\n[down-url-dw-svg]: https://img.shields.io/npm/dw/ngx-embed-video.svg\n[dependencies]: https://david-dm.org/samirhodzic/ngx-embed-video.svg\n[dependencies-url]: https://david-dm.org/samirhodzic/ngx-embed-video\n[npm-url-svg]: https://img.shields.io/npm/v/ngx-embed-video.svg\n[npm-url]: https://www.npmjs.com/package/ngx-embed-video\n","readmeFilename":"README.md"}