jQuery("#videoPlayer").ready(function(){
var script = document.createElement("script");
script.type = "text/javascript";
script.text = "function check_if_ready(){if (espn.video.player.adPlaying){espn.video.pause();} else{setTimeout(check_if_ready, 100);}}check_if_ready();"
document.body.appendChild(script);
});
Unfortunately getting to that point took a while; I tried a few other things before I hit on that solution. It's not perfect but it gets the job done. In the future it would be nice to skip the ads entirely, or auto-play only the video in the tab I'm currently watching. You can download the extension here or improve the source code here. Liked what you read? I am available for hire.
Awesome, thanks!
I’ve been able to block ESPN video from autostarting using native settings, however I cannot seem to get the audio to stop. I’d be okay with it just buffering, just don’t play them.