Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-youtube-lite

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-youtube-lite - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

14

CHANGELOG.md

@@ -0,1 +1,15 @@

# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [1.1.0](https://github.com/danestves/react-youtube-lite/compare/v1.0.0...v1.1.0) (2021-10-20)
### Features
* adding changelog ([f9837d1](https://github.com/danestves/react-youtube-lite/commit/f9837d18d28577254f6ab04941c7c6491d8c3fe7))
* adding metadata for package.json ([e837ee3](https://github.com/danestves/react-youtube-lite/commit/e837ee3b1ce0aab3ef8be986634d66bfc0e0994a))
* adding normal iframe story ([bf6ff56](https://github.com/danestves/react-youtube-lite/commit/bf6ff56d5cd613c12c2398831339b2b15a39d90f))
* new docs with more examples ([0f09dc5](https://github.com/danestves/react-youtube-lite/commit/0f09dc5f40d588e110f9278dbe75ed7eb474ea34))
<a name="v1.0.0"></a>

@@ -2,0 +16,0 @@

2

dist/react-youtube-lite.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){var t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return t&&11==t[7].length?t[7]:""}!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.embed-responsive{position:relative!important;display:block!important;height:0!important;padding:0!important;overflow:hidden!important}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.aspect-ratio-none{padding-bottom:0!important}.aspect-ratio-square{padding-bottom:100%!important}.aspect-ratio-16\\/9{padding-bottom:56.25%!important}.aspect-ratio-4\\/3{padding-bottom:75%!important}.aspect-ratio-21\\/9{padding-bottom:42.86%!important}.ryt-lite{background-color:#000;position:relative;display:block;contain:content;background-position:50%;background-size:cover;cursor:pointer}.ryt-lite:before{content:"";display:block;position:absolute;top:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);background-position:top;background-repeat:repeat-x;height:60px;padding-bottom:50px;width:100%;transition:all .2s cubic-bezier(0,0,.2,1)}.ryt-lite:after{content:"";display:block;padding-bottom:56.25%}.ryt-lite>iframe{width:100%;height:100%;position:absolute;top:0;left:0}.ryt-lite>.lty-playbtn{width:70px;height:46px;background-color:#212121;z-index:1;opacity:.8;border-radius:14%;transition:all .2s cubic-bezier(0,0,.2,1)}.ryt-lite:hover>.lty-playbtn{background-color:red;opacity:1}.ryt-lite>.lty-playbtn:before{content:"";border-color:transparent transparent transparent #fff;border-style:solid;border-width:11px 0 11px 19px}.ryt-lite>.lty-playbtn,.ryt-lite>.lty-playbtn:before{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.ryt-lite.lyt-activated{cursor:unset}.ryt-lite.lyt-activated:before,.ryt-lite.lyt-activated>.lty-playbtn{opacity:0;pointer-events:none}'),exports.ReactYouTubeLite=function(o){var r=o.adNetwork,i=void 0===r||r,a=o.url,n=void 0===a?"":a,l=o.playlist,d=void 0!==l&&l,s=o.poster,p=void 0===s?"hqdefault":s,c=o.title,m=void 0===c?"React YouTube Lite":c,b=o.noCookie,u=void 0!==b&&b,y=o.activatedClass,g=void 0===y?"lyt-activated":y,h=o.iframeClass,v=void 0===h?"embed-responsive-item":h,f=o.playerClass,A=void 0===f?"lty-playbtn":f,k=o.wrapperClass,w=void 0===k?"ryt-lite embed-responsive":k,E=o.aspectRatio,x=void 0===E?"aspect-ratio-16/9":E,C=e.useState(!1),F=C[0],R=C[1],B=e.useState(!1),S=B[0],N=B[1],T=encodeURIComponent(t(n)),q=m,z="https://i.ytimg.com/vi/"+T+"/"+p+".jpg",I=u?"https://www.youtube-nocookie.com":"https://www.youtube.com",O=d?I+"/embed/videoseries?list="+T:I+"/embed/"+T+"?autoplay=1";return e.createElement(e.Fragment,null,e.createElement("link",{rel:"preload",href:z,as:"image"}),e.createElement(e.Fragment,null,F&&e.createElement(e.Fragment,null,e.createElement("link",{rel:"preconnect",href:I}),e.createElement("link",{rel:"preconnect",href:"https://www.google.com"}),i&&e.createElement(e.Fragment,null,e.createElement("link",{rel:"preconnect",href:"https://static.doubleclick.net"}),e.createElement("link",{rel:"preconnect",href:"https://googleads.g.doubleclick.net"})))),e.createElement("div",{onPointerOver:function(){F||R(!0)},onClick:function(){S||N(!0)},className:w+" "+x+" "+(S?g:""),"data-title":q,style:{backgroundImage:"url("+z+")"}},e.createElement("div",{className:A}),S&&e.createElement("iframe",{className:v,title:q,width:"560",height:"315",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:O})))},exports.getYoutubeId=t;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){var t=e.match(/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/);return t&&11==t[7].length?t[7]:""}!function(e,t){void 0===t&&(t={});var o=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}('.embed-responsive{display:block!important;height:0!important;overflow:hidden!important;padding:0!important;position:relative!important}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{border:0;bottom:0;height:100%;left:0;position:absolute;top:0;width:100%}.aspect-ratio-none{padding-bottom:0!important}.aspect-ratio-square{padding-bottom:100%!important}.aspect-ratio-16\\/9{padding-bottom:56.25%!important}.aspect-ratio-4\\/3{padding-bottom:75%!important}.aspect-ratio-21\\/9{padding-bottom:42.86%!important}.ryt-lite{background-color:#000;background-position:50%;background-size:cover;contain:content;cursor:pointer;display:block;position:relative}.ryt-lite:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);background-position:top;background-repeat:repeat-x;content:"";display:block;height:60px;padding-bottom:50px;position:absolute;top:0;transition:all .2s cubic-bezier(0,0,.2,1);width:100%}.ryt-lite:after{content:"";display:block;padding-bottom:56.25%}.ryt-lite>iframe{height:100%;left:0;position:absolute;top:0;width:100%}.ryt-lite>.lty-playbtn{background-color:#212121;border-radius:14%;height:46px;opacity:.8;transition:all .2s cubic-bezier(0,0,.2,1);width:70px;z-index:1}.ryt-lite:hover>.lty-playbtn{background-color:red;opacity:1}.ryt-lite>.lty-playbtn:before{border-color:transparent transparent transparent #fff;border-style:solid;border-width:11px 0 11px 19px;content:""}.ryt-lite>.lty-playbtn,.ryt-lite>.lty-playbtn:before{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.ryt-lite.lyt-activated{cursor:unset}.ryt-lite.lyt-activated:before,.ryt-lite.lyt-activated>.lty-playbtn{opacity:0;pointer-events:none}'),exports.ReactYouTubeLite=function(o){var r=o.adNetwork,i=void 0===r||r,a=o.url,n=void 0===a?"":a,l=o.playlist,d=void 0!==l&&l,s=o.poster,p=void 0===s?"hqdefault":s,c=o.title,m=void 0===c?"React YouTube Lite":c,b=o.noCookie,u=void 0!==b&&b,y=o.activatedClass,g=void 0===y?"lyt-activated":y,h=o.iframeClass,v=void 0===h?"embed-responsive-item":h,f=o.playerClass,A=void 0===f?"lty-playbtn":f,k=o.wrapperClass,w=void 0===k?"ryt-lite embed-responsive":k,E=o.aspectRatio,x=void 0===E?"aspect-ratio-16/9":E,C=e.useState(!1),F=C[0],R=C[1],B=e.useState(!1),S=B[0],N=B[1],T=encodeURIComponent(t(n)),q=m,z="https://i.ytimg.com/vi/"+T+"/"+p+".jpg",I=u?"https://www.youtube-nocookie.com":"https://www.youtube.com",O=d?I+"/embed/videoseries?list="+T:I+"/embed/"+T+"?autoplay=1";return e.createElement(e.Fragment,null,e.createElement("link",{rel:"preload",href:z,as:"image"}),e.createElement(e.Fragment,null,F&&e.createElement(e.Fragment,null,e.createElement("link",{rel:"preconnect",href:I}),e.createElement("link",{rel:"preconnect",href:"https://www.google.com"}),i&&e.createElement(e.Fragment,null,e.createElement("link",{rel:"preconnect",href:"https://static.doubleclick.net"}),e.createElement("link",{rel:"preconnect",href:"https://googleads.g.doubleclick.net"})))),e.createElement("div",{onPointerOver:function(){F||R(!0)},onClick:function(){S||N(!0)},className:w+" "+x+" "+(S?g:""),"data-title":q,style:{backgroundImage:"url("+z+")"}},e.createElement("div",{className:A}),S&&e.createElement("iframe",{className:v,title:q,width:"560",height:"315",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:O})))},exports.getYoutubeId=t;
//# sourceMappingURL=react-youtube-lite.cjs.production.min.js.map

@@ -30,3 +30,3 @@ import { useState, createElement, Fragment } from 'react';

var css_248z = ".embed-responsive{position:relative!important;display:block!important;height:0!important;padding:0!important;overflow:hidden!important}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.aspect-ratio-none{padding-bottom:0!important}.aspect-ratio-square{padding-bottom:100%!important}.aspect-ratio-16\\/9{padding-bottom:56.25%!important}.aspect-ratio-4\\/3{padding-bottom:75%!important}.aspect-ratio-21\\/9{padding-bottom:42.86%!important}.ryt-lite{background-color:#000;position:relative;display:block;contain:content;background-position:50%;background-size:cover;cursor:pointer}.ryt-lite:before{content:\"\";display:block;position:absolute;top:0;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);background-position:top;background-repeat:repeat-x;height:60px;padding-bottom:50px;width:100%;transition:all .2s cubic-bezier(0,0,.2,1)}.ryt-lite:after{content:\"\";display:block;padding-bottom:56.25%}.ryt-lite>iframe{width:100%;height:100%;position:absolute;top:0;left:0}.ryt-lite>.lty-playbtn{width:70px;height:46px;background-color:#212121;z-index:1;opacity:.8;border-radius:14%;transition:all .2s cubic-bezier(0,0,.2,1)}.ryt-lite:hover>.lty-playbtn{background-color:red;opacity:1}.ryt-lite>.lty-playbtn:before{content:\"\";border-color:transparent transparent transparent #fff;border-style:solid;border-width:11px 0 11px 19px}.ryt-lite>.lty-playbtn,.ryt-lite>.lty-playbtn:before{position:absolute;top:50%;left:50%;transform:translate3d(-50%,-50%,0)}.ryt-lite.lyt-activated{cursor:unset}.ryt-lite.lyt-activated:before,.ryt-lite.lyt-activated>.lty-playbtn{opacity:0;pointer-events:none}";
var css_248z = ".embed-responsive{display:block!important;height:0!important;overflow:hidden!important;padding:0!important;position:relative!important}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{border:0;bottom:0;height:100%;left:0;position:absolute;top:0;width:100%}.aspect-ratio-none{padding-bottom:0!important}.aspect-ratio-square{padding-bottom:100%!important}.aspect-ratio-16\\/9{padding-bottom:56.25%!important}.aspect-ratio-4\\/3{padding-bottom:75%!important}.aspect-ratio-21\\/9{padding-bottom:42.86%!important}.ryt-lite{background-color:#000;background-position:50%;background-size:cover;contain:content;cursor:pointer;display:block;position:relative}.ryt-lite:before{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==);background-position:top;background-repeat:repeat-x;content:\"\";display:block;height:60px;padding-bottom:50px;position:absolute;top:0;transition:all .2s cubic-bezier(0,0,.2,1);width:100%}.ryt-lite:after{content:\"\";display:block;padding-bottom:56.25%}.ryt-lite>iframe{height:100%;left:0;position:absolute;top:0;width:100%}.ryt-lite>.lty-playbtn{background-color:#212121;border-radius:14%;height:46px;opacity:.8;transition:all .2s cubic-bezier(0,0,.2,1);width:70px;z-index:1}.ryt-lite:hover>.lty-playbtn{background-color:red;opacity:1}.ryt-lite>.lty-playbtn:before{border-color:transparent transparent transparent #fff;border-style:solid;border-width:11px 0 11px 19px;content:\"\"}.ryt-lite>.lty-playbtn,.ryt-lite>.lty-playbtn:before{left:50%;position:absolute;top:50%;transform:translate3d(-50%,-50%,0)}.ryt-lite.lyt-activated{cursor:unset}.ryt-lite.lyt-activated:before,.ryt-lite.lyt-activated>.lty-playbtn{opacity:0;pointer-events:none}";
styleInject(css_248z);

@@ -33,0 +33,0 @@

{
"version": "1.0.1",
"version": "1.1.0",
"license": "MIT",

@@ -10,3 +10,3 @@ "main": "dist/index.js",

],
"homepage": "https://danestves.github.io/react-youtube-lite",
"homepage": "https://danestves.github.io/react-youtube-lite/?path=/story/component-react-youtube-lite--default",
"repository": {

@@ -23,3 +23,3 @@ "type": "git",

"test": "tsdx test --passWithNoTests",
"lint": "tsdx lint",
"lint": "tsdx lint src",
"prepare": "tsdx build",

@@ -29,6 +29,7 @@ "size": "size-limit",

"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"release": "standard-version"
},
"peerDependencies": {
"react": ">=16"
"react": ">=17"
},

@@ -47,3 +48,3 @@ "husky": {

"name": "react-youtube-lite",
"author": "Daniel Esteves",
"author": "Daniel Esteves <danestves@gmail.com>",
"module": "dist/react-youtube-lite.esm.js",

@@ -61,25 +62,32 @@ "size-limit": [

"devDependencies": {
"@babel/core": "^7.12.10",
"@size-limit/preset-small-lib": "^4.9.1",
"@storybook/addon-essentials": "^6.1.11",
"@babel/core": "7.15.8",
"@size-limit/preset-small-lib": "^6.0.3",
"@storybook/addon-essentials": "6.3.12",
"@storybook/addon-info": "^5.3.21",
"@storybook/addon-links": "^6.1.11",
"@storybook/addons": "^6.1.11",
"@storybook/react": "^6.1.11",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"autoprefixer": "9.0.0",
"babel-loader": "^8.2.2",
"cssnano": "^4.1.10",
"husky": "^4.3.6",
"@storybook/addon-links": "6.3.12",
"@storybook/addon-postcss": "^2.0.0",
"@storybook/addons": "6.3.12",
"@storybook/react": "6.3.12",
"@types/react": "^17.0.30",
"@types/react-dom": "^17.0.10",
"autoprefixer": "10.3.7",
"babel-jest": "^27.3.1",
"babel-loader": "8.2.2",
"cssnano": "^5.0.8",
"eslint": "^8.0.1",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.2",
"identity-obj-proxy": "^3.0.0",
"postcss": "^8.3.9",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-is": "^17.0.1",
"rollup-plugin-postcss": "^4.0.0",
"size-limit": "^4.9.1",
"source-map-support": "^0.5.19",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"rollup-plugin-postcss": "^4.0.1",
"size-limit": "^6.0.3",
"source-map-support": "^0.5.20",
"standard-version": "^9.3.2",
"tsdx": "^0.14.1",
"tslib": "^2.0.3",
"typescript": "^4.1.3"
"tslib": "^2.3.1",
"typescript": "^4.4.4"
},

@@ -90,3 +98,4 @@ "jest": {

}
}
},
"dependencies": {}
}

@@ -23,3 +23,3 @@ # React YouTube Lite

You can see a [demo here](https://danestves.github.io/react-youtube-lite)
You can see a [demo here](https://danestves.github.io/react-youtube-lite/?path=/story/component-react-youtube-lite--default)

@@ -26,0 +26,0 @@ ## ⏳ Installation

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc