Skip to content

Releases: tomickigrzegorz/lazy-youtube-embed

v1.1.6

30 Sep 09:47
14cd36a

Choose a tag to compare

Fixed:

  • fixes issue when we add an additional class to div
    <div class="ytLazy__item NEW-CLASS" ...

v1.1.5

03 May 20:18
10dac07

Choose a tag to compare

Added

  • onResize method 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

08 Mar 11:24
b30a766

Choose a tag to compare

Adedd

  • local parameter to global config,
    local defaults to true from now on. If you want to enable lightbox you need to add "local": false to json html data-yt='{ "id": "XHeDps0fX6c", "local": false }'

v1.1.3

07 Mar 10:11
a3c6cb5

Choose a tag to compare

Added

  • new parameter picture is 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

17 Feb 13:28
294c272

Choose a tag to compare

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

24 Jan 17:44
c09c18a

Choose a tag to compare

Added

  • new props title #24

v1.1.0

20 Dec 23:50
4800ab2

Choose a tag to compare

Added

  • callback function - the possibility of creating an additional button that opens the youtube page with the movie
  • separate dist folder with iife, umd, esm libraries both minimized and not

changed

  • renive autoprefixer library and add postcss-preset-env

v1.0.9

14 Oct 11:51
5ffd87b

Choose a tag to compare

Adedd

  • new props 'overflow'

Changed

  • animation opacity

v1.0.8

16 Sep 08:45
5d36ab9

Choose a tag to compare

Added

  • maxWidth - new props

Changed

  • js converted into ts

v1.0.6

23 Feb 16:03
55942cb

Choose a tag to compare

  • Chore: replacing node-sass to sass