You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
# React Lite Youtube Embed
2
-
React component version of [lite-youtube-embed]([https://](https://github.com/paulirish/lite-youtube-embed)) power by tsdx, which focus on visual performance, rendering just like the real thing but much faster.
2
+
React component version of [lite-youtube-embed](https://github.com/paulirish/lite-youtube-embed) build with tsdx, which focus on visual performance, rendering just like the real thing but much faster.
'react-lite-yt-embed' is a react component version of popular package [lite-youtube-embed]([https://](https://github.com/paulirish/lite-youtube-embed)), which can use in React project including server-side-rendering project. It renders just like the real iframe but way much faster.
27
+
'react-lite-yt-embed' is a react component version of popular package [lite-youtube-embed](https://github.com/paulirish/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.
28
28
29
29
## Basic Usage
30
30
@@ -41,21 +41,21 @@ import { LiteYoutubeEmbed } from 'react-lite-yt-embed';
41
41
42
42
## Component Props
43
43
44
-
| props | required | default value | Type | Description |
| id | true | none |`string`| The unique id of the youtube video |
47
+
| defaultPlay | false | false |`boolean`| Set defaultPlay as `true` will directly show youtube iframe |
48
+
| isPlaylist | false | false |`boolean`| If you want to play playlist, set this as `true` and pass the playlist id |
49
+
| noCookie | false | true |`boolean`| Use "https://www.youtube-nocookie.com" as path or "https://www.youtube.com"|
50
+
| mute | false | true |`boolean`| Set the video is mute or not. |
51
+
| 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. |
52
+
| isMobile | false | false |`boolean`| Use in mobile device or not. |
53
+
| 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). |
54
+
| 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). |
55
+
56
+
## Roadmap (Welcome contribution)
55
57
-[ ] Use react-testing-library to test whether component render correctly.
0 commit comments