BKWLD / vue-visual

Vue 2 image and video loader supporting lazy loading, background videos, fixed aspect ratios, low rez poster images, transitions, loaders, slotted content and more.
https://bkwld.github.io/vue-visual
MIT License
59 stars 7 forks source link

Set videoLoaded to true immediately if loaded before the canplaythrou… #37

Closed jonjahr closed 4 years ago

jonjahr commented 4 years ago

Use the readystate property to check if the video loaded before the canplaythrough event fires. Solves an issue I found where videoLoaded never gets set to true in some instances in local development, because the canplaythrough event was not getting captured by Vue.

weotch commented 4 years ago

Awesome, I was wanting to do something for video like I did for images in 35181dd900828b5f4823e30b8da23b431dd9f74f but didn't think of that readystate check. 👍

Fixes #36