Open mennolui opened 6 years ago
Don't load scripts at all? Other than Foyer's, and registered through Foyer. Maybe with a setting to enable loading of all public website scripts for those who need it somehow.
Maybe use try {} combined with a timeout, or when slide becomes active, to detect if API is loaded even though our onYouTubeIframeAPIReady function was not invoked?
If a theme or plugin also defines a window.onYouTubeIframeAPIReady function ours will stop from being invoked, so our YouTube players will not be initialized.