Disable ESPN Autoplay

I wrote a Google Chrome extension that stops videos and ads from playing automatically on ESPN.com. This is another example of scratching my own itch; most people can enable this feature by clicking Autostart Off on any ESPN video, but I clear out my cookies every time I close Chrome, so that tool doesn't work for me. Also, this is more important for me than other people because I'll click to open three stories at once, and if the videos all begin playing at the same time, it gets extremely annoying. Anyway, here's the extension, all six lines of it in Javascript:
    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();"
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.

2 thoughts on “Disable ESPN Autoplay

  1. Tim

    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.


Leave a Reply

Your email address will not be published. Required fields are marked *

Comments are heavily moderated.