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
npm install react-lite-yt-embed
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
97 Stars
65 Commits
6 Forks
2 Watching
2 Branches
4 Contributors
Updated on 07 Jul 2024
TypeScript (72.57%)
CSS (21.57%)
HTML (3.66%)
JavaScript (2.2%)
Cumulative downloads
Total Downloads
Last day
-36.8%
196
Compared to previous day
Last week
-19%
1,162
Compared to previous week
Last month
14.4%
5,502
Compared to previous month
Last year
-72.1%
40,460
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
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 2/24 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
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
69 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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