Online store performance and site speed optimization
Since your scripts are coming from youtube.com, it's not possible to only remove the unused code in this situation. You'd need direct access to their code.
The code is being delivered by a 3rd party source. In this case, it's Youtube. Even if you lazyload your videos, they will still require the necessary scripts (base.js, etc.) to load your videos.
So, unfortunately, it's not possible to alter the code coming from Youtube beyond removing your videos entirely.
JohnCodes is right in that you can't edit third party code to make it more effecient, simply not possible.
If you want to autoplay the video, then there's nothing to be done.
Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...By Ollie May 25, 2023
Summary of EventsBeginning in January of 2023, some merchants reported seeing a large amo...By Trevor May 15, 2023
With 2-Factor Authentication being required to use Shopify Payments, we’re here to help yo...By Imogen Apr 26, 2023