How do I use the same Wistia video multiple times?

1.1k views Asked by At

I've been able to embed a wistia video on to a page of mine, but now I'm confused about how I could use multiple instances of the same video.

Like, for example, if I wanted to have a second version of the video that doesn't autoplay like video1 has been assigned to do below.

window._wq = window._wq || [];
_wq.push({ "hashedidhere": function(video) {
  video1 = Wistia.api("hashedidhere");
  video1.play();
}});

Can anyone give me some insight?

edit: To further illustrate my question, I want to do something like this...

window._wq = window._wq || [];
_wq.push({ "hashedidhere": function(video) {
video1 = Wistia.api("hashedidhere");
video2 = Wistia.api("thesamehashedidhere");
video1.play();
video2.someotherfunction();
}});
1

There are 1 answers

2
mrdavidjcole On

Good question! You can pull that off without writing any JS, but instead by including the autoPlay=true embed option in the class name of the video container:

<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js" async></script>
<div class="wistia_embed wistia_async_te2r1m8yjn autoPlay=true" style="height:360px;width:640px"></div>
<div class="wistia_embed wistia_async_te2r1m8yjn" style="height:360px;width:640px"></div>