简体   繁体   English

在JWplayer 7+中调试Vast广告代码

[英]Debug Vast advertising tags in JWplayer 7+

Apparently because I am new here I cannot even post sufficent links to explain my problem fully. 显然,因为我是新来的,所以我什至不能张贴足够的链接来充分说明我的问题。 FYI 费耶

Source 资源

mp4stream.com / preroll / videe / mp4stream.com /预卷/ videe /

This is one of many demos I have setup for various Ad Networks. 这是我为各种广告网络设置的众多演示之一。 Almost all have the same result. 几乎所有结果都相同。

Part One 第一部分

A lot of the Ad Networks I demo all have the same issue that looks something like this. 我演示的许多广告网络都存在类似的问题。 I'm talking at least 10 partners I've tested have. 我说的是我测试过的至少10位合作伙伴。 Below is an example of one. 下面是一个示例。

XMLHttpRequest cannot load http://vast.videe.tv/vast-proxy/?VPAID=1&aid=12988&sid=0&channel_id=0&conte …player_width=657&player_height=370&vid_duration=1440&cb=685997865628451100. XMLHttpRequest无法加载http://vast.videe.tv/vast-proxy/?VPAID=1&aid=12988&sid=0&channel_id=0&conte…player_width = 657&player_height = 370&vid_duration = 1440&cb = 685997865628451100。 A wildcard ' ' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. 当凭据标志为true时,不能在'Access-Control-Allow-Origin'标头中使用通配符' '。 Origin ' http://mp4stream.com ' is therefore not allowed access.* 因此,不允许访问来源“ http://mp4stream.com ”。*

These failures create a huge increase load time and affects the entire player / user experience as a whole. 这些故障会大大增加加载时间,并影响整个播放器/用户的整体体验。

One Ad Network today indicated that I may be passing cookies to them and that is why the above is failing. 今天的一个广告网络表示,我可能会将Cookie传递给了它们,这就是为什么上述操作失败的原因。 But I have a hard time believing that based on my development / server experience. 但是基于我的开发/服务器经验,我很难相信这一点。 As far as I'm aware every single player JWplayer or otherwise would use cookies of some kind. 据我所知,每个玩家JWplayer或其他方式都会使用某种cookie。

So the question I have is why do hundreds of these simply fail? 因此,我的问题是为什么其中有数百个仅会失败?

to be servable in a JavaScript environment a VAST ad server's response must include the following HTTP CORS headers: 为了在JavaScript环境中可投放,VAST广告服务器的响应必须包含以下HTTP CORS标头:

Access-Control-Allow-Origin: 访问控制允许来源:
Access-Control-Allow-Credentials: true 访问控制允许凭据:true

This HTTP header allows an ads player on any origin to read the VAST response from the ad server origin. 该HTTP标头允许任何来源的广告播放器从广告服务器来源读取VAST响应。 The value of Access-Control-Allow-Origin: should be the value of the Origin header sent with the ad request. Access-Control-Allow-Origin:的值应为与广告请求一起发送的Origin标头的值。 The Access-Control-Allow-Credentials: header will ensure that cookies will be sent and received properly. Access-Control-Allow-Credentials:标头将确保cookie被正确发送和接收。

Hope this helps... 希望这可以帮助...

Based on that error you are seeing, vast.videe.tv is blocking mp4stream.com from making requests. 根据您所看到的错误,mast.videe.tv阻止mp4stream.com发出请求。 You will need to contact videe.tv to determine why this is happening. 您需要联系videe.tv以确定为什么发生这种情况。

Here's a specific support document we have for this: http://support.jwplayer.com/customer/portal/articles/1403679-crossdomain-file-loading 这是我们为此提供的特定支持文档: http : //support.jwplayer.com/customer/portal/articles/1403679-crossdomain-file-loading

We love StackOverflow, but we don't check here often. 我们喜欢StackOverflow,但我们不经常在这里检查。 The best way to get support for JW Player is to go to http://jwplayer.com/support/ 获得对JW Player的支持的最佳方法是访问http://jwplayer.com/support/

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

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