Selective Autoplay

July 18, 2012

Topic tags

Alyce Currier


Before we start: we totally know the most annoying thing ever, even more annoying than a hangnail or the construction site next to your bedroom window that starts drilling at 4:30 am, is when you go to a website and their video or music or whatever other rich content starts playing at you, overwhelming that magnificent highbrow art album you were listening to in Rdio with the webmaster’s choice of some brash, lowbrow soundtrack (it might involve Drake, but wait, that was probably an art album too).

That’s why we don’t want you to autoplay your video all the time. We’re giving you great power, here, and we only ask one thing in return: use it responsibly.

When is it okay to autoplay?

We mostly use autoplay for when users click a video thumbnail in an email message - they practically already pressed play! Basically, any place where you’re using a video thumbnail as a link is probably an acceptable place from which to trigger autoplay.

And now, how you can harness the power …  this is kind of anticlimactic, but it’s really just a snippet of code (below). Learn more about how to use it in the documentation. You can use this code to autoplay only for visitors who arrive at your site from a specific source, like an email or a particular thumbnail somewhere on your site. Let us know if you come up with another good (read: non-annoying) use for autoplay that we didn’t list, we’d love to hear about it!

// Put this somewhere after your embed.
// Update 'wemail' to your string
if (/wemail=/.test(location.href)) {;

Alyce Currier


Mailing list sign-up form

Sign up to get Wistia’s best and freshest content.

More of a social being? We’re also on Instagram and Twitter.