简体   繁体   English

Ziggeo:已提交事件多次触发

[英]Ziggeo: Submitted event fired multiple times

We are using ZIGGEO to record video interviews in our new platform. 我们正在使用ZIGGEO在我们的新平台中记录视频采访。 I have noticed that sometimes it seems that the submitted event is fired more than once when the user submit the video. 我注意到有时用户提交视频时似乎多次触发了所提交的事件。 It doesn't happen all the time. 并非总是如此。 Is it something that we can control? 这是我们可以控制的吗?

 ziggeo.ZiggeoApi.Events.on("submitted", (data: any) => {
                this.addAnswer(data);
            });

The addAnswer method is called multiple times, sometimes. 有时会多次调用addAnswer方法。

I saw that you send us a message to support as well Jordi, as mentioned there happy to help you with this here or there :) 我看到您也向我们发送了支持乔迪(Jordi)的消息,如前所述,很高兴为您提供帮助:)

  • For those that do not know I work at Ziggeo :) 对于那些不知道我在Ziggeo工作的人:)

In regards to the submitted event it would usually be called as: 关于提交的事件,通常将其称为:

ZiggeoApi.Events.on("submitted", function ( data ) {
    //Your code goes here
});

I am not sure if the way you are using it currently could cause any issues, however what I presume to be happening is that there might be 2 embeddings on the page. 我不确定您当前使用它的方式是否会引起任何问题,但是我推测正在发生的是页面上可能有2个嵌入。

The reason why I say that is because v1's submitted event will fire each time some (any) Ziggeo embedding on your page raises the same. 我之所以这样说,是因为每次在页面上嵌入某些(任何)Ziggeo都会引发v1的提交事件。

If you want to make sure that events fire in more private manner, I would actually suggest using v2. 如果您想确保事件以更私密的方式触发,我实际上建议您使用v2。

I consider v2 much better than v1 in a lot of different aspects, while both are great on its own (good to point out that these are 2 different systems if you will, v2 is not built on top of v1). 我认为v2在很多方面都比v1好得多,尽管两者都很出色(很高兴指出,如果您愿意的话,这是2个不同的系统,那么v2并不是建立在v1之上的)。

While v2 does not have submitted event it has a better one called verified which fires once the video is uploaded and before processing, requiring less time to tell you if the video would for some reason fail to be processed or not - you can read more about that on our forum 尽管v2尚未submitted事件,但它有一个更好的方法,称为“ verified ,可在视频上传后和处理之前触发,从而需要更少的时间告诉您视频是否由于某种原因而无法处理-您可以阅读更多内容在我们的论坛上

This would make it fire for specific video only, and could not be affected by multiple embeddings so I would suggest trying that one out. 这将使其仅针对特定视频触发,并且不会受到多个嵌入的影响,因此我建议您尝试使用该视频。

You can see how to set it up: 您可以查看如何进行设置:

  1. The embedding codes 嵌入代码
  2. Available parameters 可用参数
  3. Events 大事记

    • on all of those pages you can change the version (v1 / v2) and on some even the revision to show you only relevant details for revision you are using. 在所有这些页面上,您可以更改版本(v1 / v2),甚至可以在某些版本上进行更改,以仅向您显示所使用版本的相关详细信息。

PS: Might be good to see if this is specific to any browser maybe as well, causing the event to be called again for some reason. PS:最好看看这是否也适用于任何浏览器,由于某种原因导致再次调用该事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM