1

我已经能够将 wistia 视频嵌入到我的页面上,但现在我对如何使用同一视频的多个实例感到困惑。

例如,如果我想要第二个不自动播放的视频版本,比如 video1 已在下面分配。

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

谁能给我一些见解?

编辑:为了进一步说明我的问题,我想做这样的事情......

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

1 回答 1

0

好问题!您可以在不编写任何 JS 的情况下实现这一点,而是autoPlay=true在视频容器的类名中包含 embed 选项:

<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>
于 2016-02-19T22:36:53.170 回答