0

我正在使用 Wistia 的 Turnstile 在视频结尾捕获电子邮件。问题是我想在用户点击提交后重定向到另一个页面。该消息将请求检查电子邮件以确认双重选择加入。

我尝试使用 2 种嵌入类型但没有成功。

框架:

<iframe src="//fast.wistia.net/embed/iframe/7zu6ze7v40?videoFoam=true" allowtransparency="true" frameborder="0" scrolling="yes" class="wistia_embed" name="wistia_embed" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen id="my_wistia_video"></iframe>
<script src="//fast.wistia.net/assets/external/iframe-api-v1.js"></script>
<script>
  wistiaEmbed = document.getElementById("my_wistia_video").wistiaApi;
  wistiaEmbed.bind("conversion", function(type, val) {
  window.location.href == "http://the_page";
});
</script>

接口:

<div id="wistia_7zu6ze7v40" class="wistia_embed" style="width:640px;height:508px;">&nbsp;</div>
<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js"></script>
<script>
  wistiaEmbed = Wistia.embed("7zu6ze7v40", {
    videoFoam: true
  });
  wistiaEmbed.bind("conversion", function(type, val) {
    window.location.href == "http://the_page";
  });
</script>

任何提示或建议?

4

2 回答 2

1

Looks like you're using a comparison operator (a boolean operator) there with the ==, and you'll want to use a single = in that place to simply set the window.location.href in your example. If you're curious about more on comparison operators, check this W3 page.

Anyhow, I'd recommend this embed:

<div id="wistia_7zu6ze7v40" class="wistia_embed" style="width:640px;height:508px;">&nbsp;</div>
<script charset="ISO-8859-1" src="//fast.wistia.com/assets/external/E-v1.js"></script>
<script>
  wistiaEmbed = Wistia.embed("7zu6ze7v40", {
videoFoam: true
  });
  wistiaEmbed.bind("conversion", function(type, val) {
    window.location.href = "http://the_page";
  });
</script>
于 2014-06-20T16:00:09.450 回答
0

我找不到我的问题的答案,但我以另一种方式解决了这个问题,根据具体情况可能会更好。

这个想法是在视频所在的页面上包含一个表单,并且仅在视频结束时显示该表单。表单的 div 必须有一个“display: none;” 这段代码会在视频结束时出现:

<script>
  wistiaEmbed = document.getElementById("my_wistia_video").wistiaApi;
  wistiaEmbed.bind("end", function() {  
    document.getElementById("div_id").style.display = 'block';
  });
</script>

在这种情况下,我停止使用旋转栅门。尽管我相信编辑视频可能是另一种解决方案,但我正在使用号召性用语。

于 2014-06-22T18:23:57.087 回答