I have noticed on many WordPress sites I work on that when there is more than one YouTube video embedded, multiple instances of the player JS will be called.
Since it’s a full megabyte of data, I am trying to determine if there is a way to have only one instance of the JS loaded. I would have thought the second (or more) instances are redundant.
Here’s what gets loaded twice, for a WP page with two embedded videos.
https://s.ytimg.com/yts/jsbin/player-en_US-vfle0WwUC/base.js (1.0MiB)
I’ve been unable to find any information on this, which is a bit surprising as I thought this would be an issue many people would be wanting to solve.
Any suggestions?