Gathering detailed insights and metrics for react-lite-yt-embed
Gathering detailed insights and metrics for react-lite-yt-embed
Gathering detailed insights and metrics for react-lite-yt-embed
Gathering detailed insights and metrics for react-lite-yt-embed
React version of lite-youtube-embed iframe which render fast 🚀
npm install react-lite-yt-embed
Typescript
Module System
Min. Node Version
Node Version
NPM Version
72.1
Supply Chain
98.8
Quality
76.1
Maintenance
100
Vulnerability
100
License
TypeScript (72.57%)
CSS (21.57%)
HTML (3.66%)
JavaScript (2.2%)
Total Downloads
265,902
Last Day
7
Last Week
928
Last Month
4,133
Last Year
53,480
MIT License
99 Stars
65 Commits
6 Forks
2 Watchers
2 Branches
4 Contributors
Updated on Apr 03, 2025
Latest Version
1.2.7
Package Id
react-lite-yt-embed@1.2.7
Unpacked Size
39.37 kB
Size
8.87 kB
File Count
13
NPM Version
6.14.6
Node Version
12.18.3
Cumulative downloads
Total Downloads
Last Day
-78.8%
7
Compared to previous day
Last Week
-8.7%
928
Compared to previous week
Last Month
-11.5%
4,133
Compared to previous month
Last Year
-60.7%
53,480
Compared to previous year
React component version of lite-youtube-embed scaffolded with tsdx, which focus on visual performance, rendering just like the real thing but much faster.
Please use version at least above @1.2.1, version below that is experimental and therefore may cause some runtime error.
1$ yarn add react-lite-yt-embed
or
1$ npm install react-lite-yt-embed
'react-lite-yt-embed' is a react component version of popular package lite-youtube-embed, which can use in React project including SSR and CSR project. It renders just like the real iframe but way much faster.
'react-lite-yt-embed' support WebP image format, which is generally 25% - 35% smaller than jpg image, so the network request time will also decrease, making your web app render even faster.
If you use some browsers that not totally support WebP, for example, Safari, 'react-lite-yt-embed' will fallback the image to jpg automatically.
You can see WebP browser support here.
1import { LiteYoutubeEmbed } from 'react-lite-yt-embed'; 2 3// In your react component 4<> 5 <LiteYoutubeEmbed id={id}> {/* ID of YouTube video */} 6 {/* You can add more props, see the description below. */} 7 {/* You can also give the iframe an outer container */} 8</>
props | required | default value | Type | Description |
---|---|---|---|---|
id | true | none | string | The unique id of the youtube video |
defaultPlay | false | false | boolean | Set defaultPlay as true will directly show youtube iframe |
isPlaylist | false | false | boolean | If you want to play playlist, set this as true and pass the playlist id |
noCookie | false | true | boolean | Use "https://www.youtube-nocookie.com" as path or "https://www.youtube.com" |
mute | false | true | boolean | Set the video is mute or not. |
params | false | {} | Object<string, string> | Query string params (autoplay and mute are default query string, you do not have to set them), the value have to be a string type. |
isMobile | false | false | boolean | Use in mobile device or not. |
mobileResolution | false | 'hqdefault' | 'hqdefault' | 'sddefault' | 'maxresdefault' | You can specify the resolution of the thumbnail image on the phone (default is hqdefault, which is a lower resolution). |
desktopResolution | false | 'maxresdefault' | 'hqdefault' | 'sddefault' | 'maxresdefault' | You can specify the resolution of the thumbnail image on the desktop (default is maxresdefault, which is the highest resolution). |
lazyImage | false | false | boolean | If true, set the img loading attribute to 'lazy', default is undefined. |
imageAltText | false | "YouTube's thumbnail for this video." | string | You can specify an alternative text description for the thumbnail image for accessibility purposes. |
iframeTitle | false | "YouTube video." | string | You can specify a title for the iframe containing the video for accessibility purposes. |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/24 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
74 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-09
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More