adrienhobbs / vue-lazyload-video

A set of Vue components for lazy-loading videos into the DOM.
https://adrienhobbs.github.io/vue-lazyload-video/
4 stars 3 forks source link

window of undefined #1

Closed wilco-superbalist closed 4 years ago

wilco-superbalist commented 5 years ago

Using SSR I get an error window of undefined, is there a way around this?

adrienhobbs commented 5 years ago

@wilco-superbalist - I just pushed a small update that will only install the plugin if the global window object exists. I don't have a SSR setup to test unfortunately, so try updating to the version 0.1.15, and let me know if it fixes your issue. Thanks!

adrienhobbs commented 4 years ago

closing due to inactivity

fsproru commented 4 years ago

I'm getting a slightly different one in a Nuxt project

window is not defined
captain-zsa commented 1 year ago

It may be too late to write, but the problem is with the intersectionObserver. Nuxt.js for vue2 allows installing the plugin with mode: 'client'. This eliminates the error, as far as I understand and tried.

adrienhobbs commented 1 year ago

Thanks for the clarification @captain-zsa - glad you were able to integrate it into Nuxt for vue2.