Refactored the Plyr YouTube/Vimeo embed implementation to use rather than elements to improve page loading performance.
Only initialise Plyr for videos that are inside visible containers to avoid conflicts. Recalculate the carousel height after Plyr videos initialise to improve compatibility. Plyr videos that exist in cloned slides are no longer initialised to improve page loading performance. Fixes
- Resolved an issue with the rendering of some thumbnail image HTML attributes causing odd behaviour.
- Prevented a gallery flash during initial load when default variations are set.
- Always return an absolute integer for image data height values even if height is unavailable.
- Prevented duplication of photoswipe gallery instances causing some fullscreen inconsistencies.
- Autoplay now correctly triggers in fullscreen if navigating back to a previously played video.
- Check for a valid product instance when deleting cache entries to avoid edge case errors in certain admin screens.
- Ensure assets are enqueued when the WooThumbs block is added directly to a page rather than via a shortcode.