Just do not set the poster tag in video if you are adding the preloaded image on top, that would make the case.
On other improvement please would be really good to add preload=”none” to video as the videos as preload metadata has not the same behaviour depending on browser and downloads many data.
Autoplay tag is downloading all the videos, that is terrible for perfomance.
Better solution would be to remove autoplay and autoplay through javascript when magnificPopup is open, it is pointless to autoplay the video (and consume a lot of data) when it has not been opened.
Concept: use the callback open in magnificPopup and if there is a video play it.
if(this.content.find( '> .swiper-container > .swiper-wrapper > .swiper-slide[data-uid="' + currentElement.data( 'mfp-src' ) + '"] video')){
this.content.find( '> .swiper-container > .swiper-wrapper > .swiper-slide[data-uid="' + currentElement.data( 'mfp-src' ) + '"] video')[0].play();
}
Hello @javierdemuga
Thanks a lot for pointing out these errors and suggestions. We’ll make these changes in the plugin and update it soon.
@javierdemuga, you can track our progress with suggested changes and other improvements in the “develop” branch on the GitHub repository of the plugin:
https://github.com/wpzoom/instagram-widget-by-wpzoom/commits/develop
Hello @javierdemuga
Please update the plugin to the latest version. We’ve updated it and improved many things.
Thank you for the improvement, that helps a lot with video loading but still the video poster should not be set (as it cannot be lazyloaded) if lazyload is activated. If you add poster then the poster images are loaded without lazyload and afterwards the other images are loaded.
On other topics the last version did not work with a shortcode inside a widget, when I used directly the shortcode it worked.