I’m embedding youtube videos, but for every video it loads TWO 800 kb base.js file on the first page load, even before I’m scrolling down to the videos. Which is in itself already a problem.
If I want to mitigate this problem by installing a div overlay, I’m forcing the user to click twice to play a video, which is unintuitive and unwanted.
If I want to mitigate this issue, I try to use autoplay, but because all videos are in content tabs, the auto play will trigger the videos of previous tabs because its original div overlay was removed.
Step-by-step reproduction instructions:
Create 5 tabs, of which one open on load. In each tab content there is a video that gets shown once you click the corresponding tab list. Check on Chrome Dev tools ‘Network’ tab to see what gets loaded on page load. You should see all base.js files of 800kb. Then try to avoid this by adding a div overlay and autoplay. Once you now open a first video on a tab by removing its div, its auto play will trigger once you open another tab, which is unwanted
Screenshots, screen recording, code snippet
- WordPress version: 6.3.2
- Cwicly Plugin version: 1.3.1