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
<p>Developed in π§π· <spanrole="img"aria-label="Flag for Brazil">Brazil</p>
@@ -93,7 +93,7 @@ const App = () => (
93
93
94
94
## β οΈ After version 1.0.0 - BREAKING CHANGES β οΈ
95
95
96
-
To play nice with new frameworks like [NextJS](https://nextjs.org/), we now don't import the `.css` necessary. Instead in order to use now you have three options:
96
+
To play nice with new frameworks like [NextJS](https://nextjs.org/), we now don't import the `.css` necessary. Since version `2.0.9` you can pass custom aspect-ratio props, so be aware of any changes needed in the CSS options. Instead in order to use now you have three options:
97
97
98
98
### Option 1
99
99
@@ -188,7 +188,7 @@ Place the necessary CSS in your Global CSS file method of preference
188
188
189
189
For example, for NextJS:
190
190
191
-
```jsx
191
+
```jsx
192
192
<style jsx global>{`
193
193
html,
194
194
body {
@@ -201,10 +201,9 @@ For example, for NextJS:
201
201
202
202
* {
203
203
box-sizing: border-box;
204
-
}
205
-
204
+
206
205
// CSS above
207
-
206
+
208
207
`}</style>
209
208
210
209
```
@@ -221,7 +220,7 @@ Not work on every framework but you can import the css directly, check what work
@@ -245,6 +244,8 @@ Only two props are required to work: `id` from the YouTube you want to render an
245
244
| activeClass | string | Pass the string class for the active state |
246
245
| adNetwork | boolean | Default: `false` To preconnect or not to doubleclick addresses called by YouTube iframe (the adnetwork from Google) |
247
246
| announce | string | Default: `Watch`. This will be passed to the button in order to be announced to the final user as in `Clickable Watch, ${title}, button` , customize to match your own language #a11y #i18n |
247
+
| aspectHeight | number | Default: `9`. Use this optional prop if you want a custom aspect-ratio. Please be aware of aspect height and width relation and also any custom CSS you are using. |
248
+
| aspectWidth | number | Default: `16`. Use this optional prop if you want a custom aspect-ratio. Please be aware of aspect height and width relation and also any custom CSS you are using. |
248
249
| cookie | boolean | Default: `false` Connect to YouTube via the Privacy-Enhanced Mode using https://www.youtube-nocookie.com You should opt-in to allow cookies|
249
250
| iFrameClass | string | Pass the string class for the own iFrame |
-[Why I made my open source React component private by default](https://ibrahimcesar.cloud/blog/why-i-made-my-open-source-react-component-private-by-default/)
262
269
263
-
## Thanks
264
270
265
-
Paul Irish ([paulirish](https://github.com/paulirish)) for [Lite YouTube Embed](https://github.com/paulirish/lite-youtube-embed)
266
-
AcauΓ£ Sperl de Faria ([acaua](https://github.com/acaua)) for code review
267
-
Addy Osmani ([addyosmani](https://github.com/addyosmani)) for the Adaptive Loading ideas
271
+
### πΊ TODO:
268
272
269
-
## See Also
273
+
-[ ] Add tests
270
274
271
-
[React Quicklink](https://www.npmjs.com/package/react-quicklink): Faster subsequent page-loads by prefetching in-viewport links during idle time for __React__
0 commit comments