Releases: tomickigrzegorz/lazy-youtube-embed
Releases · tomickigrzegorz/lazy-youtube-embed
v1.1.6
v1.1.5
Added
onResizemethod returns the logical value "true/false" if "true" then the movie is opened in the place of display, if "false" the movie is opened in lightbox
onResize: () => {
let responsiveMin = 800;
// we check the width of the browser window
const windowWidth =
window.innerWidth ||
document.documentElement.clientWidth ||
document.body.clientWidth;
const widthWindow = windowWidth < responsiveMin ? true : false;
return widthWindow;
},v1.1.4
Adedd
localparameter to global config,
local defaults to true from now on. If you want to enable lightbox you need to add"local": falseto json htmldata-yt='{ "id": "XHeDps0fX6c", "local": false }'
v1.1.3
Added
- new parameter
pictureis responsible for generating a thumbnail.
TRUE - generates picture + source + img.
<picture>
<source media="(min-width: 1440px)" srcset="//i.ytimg.com/vi/YoutubeID/maxresdefault.jpg">
<source media="(min-width: 1024px)" srcset="//i.ytimg.com/vi/YoutubeID/hqdefault.jpg">
<source media="(min-width: 480px)" srcset="//i.ytimg.com/vi/YoutubeID/mqdefault.jpg">
<img class="ytLazy__image" loading="lazy" width="1050" height="787" src="//i.ytimg.com/vi/YoutubeID/sddefault.jpg">
</picture>FALSE - only generate an img thumbnail
<img class="ytLazy__image" loading="lazy" width="1050" height="787" src="//i.ytimg.com/vi/YoutubeID/sddefault.jpg">v1.1.2
Added
- css for IE version
- new way to add thumbnail photo
Build
- separate IE lib
- mangle props
- move taget from tsconfig to rollup.config
- script to change version lib
Changed
- set singleQoute to false
v1.1.1
v1.1.0
Added
- callback function - the possibility of creating an additional button that opens the youtube page with the movie
- separate
distfolder with iife, umd, esm libraries both minimized and not
changed
- renive autoprefixer library and add postcss-preset-env
v1.0.9
Adedd
- new props 'overflow'
Changed
- animation opacity
v1.0.8
Added
- maxWidth - new props
Changed
- js converted into ts
v1.0.6
Chore: replacing node-sass to sass