{"_id":"@cometburn/vue-lazytube","_rev":"2-0ae7bc2e40301038d4ac3b40abd283f8","name":"@cometburn/vue-lazytube","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.3":{"name":"@cometburn/vue-lazytube","version":"1.0.3","private":false,"keywords":["youtube","youtube-video","vimeo","vue-youtube","lazyload","vue","vuejs","iframe","lazytube","plugin"],"homepage":"https://github.com/seeratawan01/vue-lazytube","bugs":{"url":"https://github.com/seeratawan01/vue-lazytube/issues"},"author":{"name":"Seerat Awan","email":"seeratsdsking@gmail.com","url":"https://github.com/seeratawan01/"},"main":"./dist/vue-lazytube.umd.min.js","unpkg":"./dist/vue-lazytube.umd.min.js","jsdelivr":"./dist/vue-lazytube.umd.min.js","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build --target lib --name vue-lazytube src/index.js","build:tgz":"vue-cli-service build --target lib --name vue-lazytube src/index.js && npm pack","pack":"npm pack","lint":"vue-cli-service lint","deploy":"node --version"},"license":"MIT","dependencies":{"axios":"^0.21.1","core-js":"^3.6.5","vue-styled-components":"^1.6.0"},"devDependencies":{"@vue/cli-plugin-babel":"~4.5.0","@vue/cli-plugin-eslint":"~4.5.0","@vue/cli-service":"~4.5.0","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","vue":"^2.6.11","vue-template-compiler":"^2.6.11"},"peerDependencies":{"vue":"^2.6.11"},"externals":{"vue":"vue"},"funding":"https://www.patreon.com/seeratawan","eslintConfig":{"root":true,"env":{"node":true},"extends":["plugin:vue/essential","eslint:recommended"],"parserOptions":{"parser":"babel-eslint"},"rules":{}},"browserslist":["> 1%","last 2 versions","not dead"],"publishConfig":{"registry":"https://npm.pkg.github.com/@cometburn/vue-lazytube"},"gitHead":"6a0943a627cd21eb0cd554027b61c103aaa5a432","description":"Embed a YouTube or Vimeo player easily and lazy load the video to save resources and reduces initial load size. Useful when performance and page size is important or for sites with many embedded videos.","_id":"@cometburn/vue-lazytube@1.0.3","_nodeVersion":"12.22.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-igB0zGK9wpIbbkQ3bNPmY1p22xsnN4aHLXOeY1M6XhlvKG1biCN0A6ozzPyinerrcvaePgYu9gmElLKt70WuDA==","shasum":"d14484f6a3f9df680dbfd39906873f3dd8afcf72","tarball":"https://registry.npmjs.org/@cometburn/vue-lazytube/-/vue-lazytube-1.0.3.tgz","fileCount":10,"unpackedSize":1623636,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPP37CRA9TVsSAnZWagAAB5AQAJ0h8gnOdWOP+EW0cjah\nW9rkBv/nV7Ya79B0bHK8+NYEYuj1hULkg+RUffnveyyL9z6H/diz4jsOfF/b\nXHIsuJW4SU/X5yAtEu8Gfc/FGdqAaBK7ZLixienunj2oQ8a7Oi4/nU9xH+gm\nwmWxE2qxhyoNI+mOz6AN2wkBHFlOdwHVLlYMgkmveUZiu3WYSCg3LRAaiKkK\n+gIqEivBLfvvnE00upO8BKPbPHvktBALByNimVyvwyf6ikpyuy/uX5sTJXmP\nHq67Xg4v+j8s1tAzGzF0oVuYOkXlJy8403EujHnz89kAzEoiZjUus0dsuOJg\neoYZyX198W1d44AtnoPLe8X9RorWO2zu+NeQR5/NQRMri7Uhw5Jy4M0c7Lq6\nX2vbOnZ1AjCICJqfHcwK3IzZc3l7gkRJFhxnyNvjo9MKFGM+eWoPsvMCpf1l\nqFn4E0EmUcn84l3SS+SqDTOi0x8Nu1VfK1hbuw6lel/Imo2I2VgfR6PF2u+i\nuDGynKvJ7bM02tX6CVsJa4ZNM3kd/vPnLfq3vOwRl2k5Rg6MneRG/FmkVqXK\nzSNuAwpNTnGk6fVqE6x+Kwb7yizFQO1uq7ClIt0vBHNlLuKPDfaIMhSRjez1\n+vLDlCPttdobR15ZaHb3wkomKE9OMuGpujk7H6srmKteTyloea2k0R/MM1Yx\nMiAz\r\n=V+Pw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCR/n5arRZAODQ/8Q3XQQ0dEc86STFT75V2FOWtlr7O6gIgYAWRGrWlJqcaS6GfsI4C2UUHA6Bn/c/RRvSXWB7lEa8="}]},"_npmUser":{"name":"cometburn","email":"cometburn@gmail.com"},"directories":{},"maintainers":[{"name":"cometburn","email":"cometburn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-lazytube_1.0.3_1631387131004_0.2515388637754663"},"_hasShrinkwrap":false},"1.0.4":{"name":"@cometburn/vue-lazytube","version":"1.0.4","private":false,"keywords":["youtube","youtube-video","vimeo","vue-youtube","lazyload","vue","vuejs","iframe","lazytube","plugin"],"homepage":"https://github.com/seeratawan01/vue-lazytube","bugs":{"url":"https://github.com/seeratawan01/vue-lazytube/issues"},"author":{"name":"Seerat Awan","email":"seeratsdsking@gmail.com","url":"https://github.com/seeratawan01/"},"main":"./dist/vue-lazytube.umd.min.js","unpkg":"./dist/vue-lazytube.umd.min.js","jsdelivr":"./dist/vue-lazytube.umd.min.js","scripts":{"serve":"vue-cli-service serve","build":"vue-cli-service build --target lib --name vue-lazytube src/index.js","build:tgz":"vue-cli-service build --target lib --name vue-lazytube src/index.js && npm pack","pack":"npm pack","lint":"vue-cli-service lint","deploy":"node --version"},"license":"MIT","dependencies":{"axios":"^0.21.1","core-js":"^3.6.5","vue-styled-components":"^1.6.0"},"devDependencies":{"@vue/cli-plugin-babel":"~4.5.0","@vue/cli-plugin-eslint":"~4.5.0","@vue/cli-service":"~4.5.0","babel-eslint":"^10.1.0","eslint":"^6.7.2","eslint-plugin-vue":"^6.2.2","vue":"^2.6.11","vue-template-compiler":"^2.6.11"},"peerDependencies":{"vue":"^2.6.11"},"externals":{"vue":"vue"},"funding":"https://www.patreon.com/seeratawan","eslintConfig":{"root":true,"env":{"node":true},"extends":["plugin:vue/essential","eslint:recommended"],"parserOptions":{"parser":"babel-eslint"},"rules":{}},"browserslist":["> 1%","last 2 versions","not dead"],"publishConfig":{"registry":"https://npm.pkg.github.com/@cometburn/vue-lazytube"},"gitHead":"6a0943a627cd21eb0cd554027b61c103aaa5a432","description":"Embed a YouTube or Vimeo player easily and lazy load the video to save resources and reduces initial load size. Useful when performance and page size is important or for sites with many embedded videos.","_id":"@cometburn/vue-lazytube@1.0.4","_nodeVersion":"12.22.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-0MzuZNFvOnjpnv+8qu9cWi8pcwVjNGmZHgOrrXhukA/aQVmba/x6Z1Df2KgMiKvEj4AHp3vT9/rOO5wyOs9wYQ==","shasum":"bb5e0020bcb9d5cfdd0fb856da88174e3508729a","tarball":"https://registry.npmjs.org/@cometburn/vue-lazytube/-/vue-lazytube-1.0.4.tgz","fileCount":10,"unpackedSize":1665530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPP+lCRA9TVsSAnZWagAAR3sP/jdI2U9ewjiH82NiEiyx\nKbOFry1+eOTje7/EqM9d5th8LyEXoP3HqPvz4nh1ISmtXFR+H66A5hpBhAxU\nYG+1Uzj80VK4YkWguvJl6/rMDgwmFt/QenClkHO10McnGieGenXm5lrzw92o\nTWKFkVxxnobebQgKv0D+lHUX7uFQ62GUcdfdOCxna5edTePIw/NIxhQtZVEs\ny2PEM5E/anpRVBjWJ0Dve+QjQSGIbE0FvC1ka+egYYbIhkUibhTwgcU5YqzB\n5CbBr8WUyUfIxSVT49PImsfP6GWAvwXjnYWDl9Fr6v6CCjB7Kd8EHj3lcGZX\nty+LCkwajRWKCfxzRTv48CPbWPhAfPZ1uJs/vEPzlRsrmVZuBMsJkeEn6CGD\n2YIcx7PLc522eAYOT6EKbTnvNhdJUhudhSc6oVj4uCNFNTh/HzSlPHsw4DIK\nHM3kNyJ1uanirM0PMebBLzu/qekVbX9AgZKAiZL7X9onPiGsYjuxqkBvvmk4\nzDWnolRP1GZ1N/VFkmsq5LNx+MwLIuutELa1Kl7DNF0Y9lV+KffnXxmIuxB8\nrkvhDUvoBh420b9QSxxEXEQlwvWsez/Vh1J6n8uXMB5Za2YxgC1kPYTSVREh\nw8VRneRP5SvR8nhhtUAhFr0TL6VfGKzlzZ9mWR6Z/0t+qs4tXhQobaLBOW7q\nNJQD\r\n=OqER\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAdBDu1lWs0kwXSsfGAdXnVkwD0ScQI0AWaIUHOcFPWAIhAKaYv3Y4886mGhlgZtYnY45F68yT3dhQHL76uvHOEOOv"}]},"_npmUser":{"name":"cometburn","email":"cometburn@gmail.com"},"directories":{},"maintainers":[{"name":"cometburn","email":"cometburn@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vue-lazytube_1.0.4_1631387557299_0.7821871649753269"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-11T19:05:30.953Z","1.0.3":"2021-09-11T19:05:31.215Z","modified":"2022-04-05T00:24:16.557Z","1.0.4":"2021-09-11T19:12:37.494Z"},"maintainers":[{"name":"cometburn","email":"cometburn@gmail.com"}],"description":"Embed a YouTube or Vimeo player easily and lazy load the video to save resources and reduces initial load size. Useful when performance and page size is important or for sites with many embedded videos.","homepage":"https://github.com/seeratawan01/vue-lazytube","keywords":["youtube","youtube-video","vimeo","vue-youtube","lazyload","vue","vuejs","iframe","lazytube","plugin"],"author":{"name":"Seerat Awan","email":"seeratsdsking@gmail.com","url":"https://github.com/seeratawan01/"},"bugs":{"url":"https://github.com/seeratawan01/vue-lazytube/issues"},"license":"MIT","readme":"# Vue Lazytube\n\nEmbed a YouTube or Vimeo player easily and lazy load the video to save resources and reduces initial load size.\nUseful when performance and page size is important or for sites with many embedded videos.\n\nFor a simple example page with 10 videos, vue-lazytube will reduce loadtime by 7x and memory usage by 2-3x.\n\n\n[Demo online](https://codesandbox.io/s/vue-lazytube-forked-17o8v?file=/src/App.vue) | [Tutorial](https://medium.com/geekculture/light-and-responsive-youtube-embeds-faster-vue-web-page-load-speeds-c8e477b93f0f) | [Sponsor](https://patreon.com/seeratawan)\n\n[![GitHub release](https://img.shields.io/github/package-json/v/seeratawan01/vue-lazytube?label=Version%20)](https://github.com/seeratawan01/vue-lazytube) [![License](https://img.shields.io/badge/License-MIT-red.svg)](https://opensource.org/licenses/MIT) [![downloads](https://img.shields.io/npm/dt/vue-lazytube?color=orange&label=Downloads)](https://www.npmjs.com/package/vue-lazytube)  [![filesize](https://img.shields.io/bundlephobia/min/vue-lazytube?color=yellow&label=File%20Size)](https://www.npmjs.com/package/vue-lazytube)\n\n\n---\n#### Table of Content\n- [Features](#features)\n- [Demo](#demo)\n- [Installation](#installation)\n    * [Install Globally](#to-make-the-plugin-available-globally)\n    * [Install Locally](#to-include-only-in-specific-components)\n- [Usage](#usage)\n- [API](#api)\n    * [Props](#props)\n    * [Slots](#slots)\n    * [Methods](#methods)\n    * [Example](#example)\n- [License](#open-source-license)\n- [Buy Me a Coffee](#buy-me-a-coffee)\n\n\n## Features\n- reduces initial load size by ~1.1 MB per video\n- fully responsive and customizable through `props`\n- provides methods to control (`play`, `stop`, `pause` and `reset`) embedded videos\n- provide options to set up custom title and preview of embedded videos\n- platform supported: Youtube and Vimeo\n\n## Demo\n\n[![view vue-lazytube](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/vue-lazytube-forked-17o8v?file=/src/App.vue)\n\n## Installation\n\nWith a build systems\n\n```sh\n$ npm install --save vue-lazytube\n```\n```sh\n$ yarn add vue-lazytube\n```\n\n### To make the plugin available globally\nIn your `main.js`:\n\n```javascript\nimport LazyTube from \"vue-lazytube\";\n\nVue.use(LazyTube);\n```\n\n### To include only in specific components\n```javascript\nimport { LazyYoutube, LazyVimeo } from \"vue-lazytube\";\n\nexport default {\n    name: 'YourComponent',\n    components: {\n        LazyYoutube,\n        LazyVimeo\n    },\n}\n```\n\n\n## Usage\n\n```javascript\n<template>\n    <!-- Youtube Embed -->\n    <LazyYoutube src=\"https://www.youtube.com/watch?v=TcMBFSGVi1c\" />\n\n    <!-- Vimeo Embed -->\n    <LazyVimeo src=\"https://player.vimeo.com/video/64654583\" />\n</template>\n```\n\n## API\n\n### Props\n| Name | Type | Default Value | Description | Required |\n| ------ | ------ | ------ | ------ | ------ |\n| `src` | `String` | `` | To load video and iframe, should be Youtube/Vimeo video link. | `true` |\n| `aspectRatio` | `String` | `16:9` | Maintaining the aspect ratio of video, perfect for responsively handling video embeds based on the width of the parent, should be in `*:*` format. e.g, `1:1`, `4:3`, `16:9` and `21:9`. | `false` |\n| `maxWidth` | `String` | `560px` | Defines maximum width of video container.  | `false` |\n| `showTitle` | `Boolean` | `true` | Defines whether to show video title on top. | `false` |\n| `autoplay` | `Boolean` | `false` | Defines whether to load the iframe as the page loads _(not recommended)_ | `false` |\n| `thumbnailQuality` | `String` | `standard` | Defines the quality of thumbnail, should be one of the following `default`, `medium`, `high`, `standard` or `maxres` | `false` |\n| `iframeClass` | `String` | `ly-iframe` | Defines the class on iframe element | `false` |\n| `customTitle` | `String` | `` | Defines the custom title of the video | `false` |\n| `customThumbnail` | `String` | `` | Defines the custom thumbnail image link of the video | `false` |\n\n\n### Slots\nThis Component provides some slots. You can use the named slot to render custom play button and loader:\n\n| Slot | Description |\n| ------ | ------ |\n| button | Slot gives an ability to provide custom play button |\n| loader | Slot gives an ability to provide custom loader |\n\n\n\n### Methods\nThese methods let you control the player using JavaScript, so you can perform the operations like `play`, `stop`, `pause` and `reset`.\n\n>The user's browser must support the HTML5 postMessage feature. Most modern browsers support postMessage.\n\n| Name | Type | Usage |\n| ------ | ------ | ------ | \n| playVideo | `function` | `this.$refs[\"lazyVideo\"]['playVideo']()` |\n| stopVideo | `function` | `this.$refs[\"lazyVideo\"]['stopVideo']()` |\n| pauseVideo | `function` | `this.$refs[\"lazyVideo\"]['pauseVideo']()` |\n| resetView | `function` | `this.$refs[\"lazyVideo\"]['resetView']()` |\n\n_Note: Must Replace `lazyVideo` with your [ref](https://v3.vuejs.org/guide/component-template-refs.html)._\n\n### Example\n```javascript\n<template>\n    <LazyYoutube\n        ref=\"lazyVideo\"\n        src=\"https://www.youtube.com/watch?v=TcMBFSGVi1c\"\n    />\n    \n    <button @click=\"handleClick('playVideo')\">Play</button>\n    <button @click=\"handleClick('stopVideo')\">Stop</button>\n    <button @click=\"handleClick('pauseVideo')\">Pause</button>\n    <button @click=\"handleClick('resetView')\">Reset</button>\n</template>\n\n<script>\n    export default {\n      name: \"YourComponent\",\n      components: {},\n      methods: {\n        handleClick(event) {\n          this.$refs[\"lazyVideo\"][event]();\n        },\n      },\n    };\n</script>\n```\n\n## Open Source License\n\nYou may use it under the terms of the [MIT Licenses](https://opensource.org/licenses/MIT)\n\n## Buy Me a Coffee\n[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dseeratawan%26type%3Dpledges&style=for-the-badge)](https://patreon.com/seeratawan)","readmeFilename":"README.md"}