我正在将 JWPlayer 与 VAST 集成,因此如果我无法从主要来源中找到任何广告,我将退回到第二个来源。我依靠 onError() 和 onSetupError() 来做到这一点,但我遇到了一些问题。
是否有任何方法可以测试 VAST 广告响应然后采取相应措施?就像是:
if (vast_response) [process ad]
else [use alternate source]
有两种方法可以做到这一点:
http://support.jwplayer.com/customer/portal/articles/1480813-example-ad-tag-waterfalling
或者:
http://support.jwplayer.com/customer/portal/articles/1665150-ad-tag-waterfalling