![]() ![]() Or in a *.css/scss etc: "~react-lite-youtube-embed/dist/LiteYouTubeEmbed.css" Import 'react-lite-youtube-embed/dist/LiteYouTubeEmbed.css' Not work on every framework but you can import the css directly, check what works best with your bundler / framework. Using your CSS-In-JS tool of choice encapsulate this component and use the css provided as a guide. Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, */īorder-color: transparent transparent transparent #fff įont-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, ![]() * responsive iframe with a 16:9 aspect ratioīorder-radius: 14% /* TODO: Consider replacing this with YT's actual svg. ![]() Place the necessary CSS in your Global CSS file method of preferenceīackground-image: url(data:image/png base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg=) Instead use now you have three options: Option 1 Since version 2.0.9 you can pass custom aspect-ratio props, so be aware of any changes needed in the CSS options. To play nice with new frameworks like NextJS, we now don't import the. ⚠️ After version 1.0.0 - BREAKING CHANGES ⚠️ React Lite YouTube Embed comes with all original styles from Paul Irish's Lite YouTube Embed but you can customize them as you wish passing as a props. Render(, document.getElementById("root")) Īnd that's it. Import LiteYouTubeEmbed from 'react-lite-youtube-embed' □️ Basic Usage import React from "react" Use your favorite package manager: yarn add react-lite-youtube-embed Meaning that will not preconnect with the ad network from Google and connect to YouTube via the Privacy-Enhanced Mode using. The biggest change is, from 2.0.0 this component is private by default. An "Adaptive Loading" way to handle iframes for YouTube. The gain is not the same as the web component of the original implementation but saves some requests and gives you more control of the embed visual. Provide videos with a supercharged focus on visual performance. Port of Paul Irish's Lite YouTube Embed to a React Component. □ React Lite YouTube Embed A private by default, faster and cleaner YouTube embed component for React applications ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |