This issue has been reported multiple times under different names:
The Ad is loaded and you can hear the sound but there is a black screen
Error message about the ad unit timing out before starting the AD even though the ad was played and the VAST events were fired.
vast.adStart event is never fired.
After some debugging, it seems that the main issue is that all these events depend on the durationchange event being fired. The problem is that this event won't fire if the original video content has the same length as the Ad being played and the VASTIntegrator will never know that the AdUnit is actually playing.
You can see that here:
VASTIntegrator.prototype._playSelectedAd = function playSelectedAd(source, response, callback) {
var player = this.player;
player.preload("auto"); //without preload=auto the durationchange event is never fired
player.src(source);
logger.debug ("<VASTIntegrator._playSelectedAd> waiting for durationchange to play the ad...");
playerUtils.once(player, ['durationchange', 'error', 'vast.adsCancel'], function (evt) {
if (evt.type === 'durationchange') {
logger.debug ("<VASTIntegrator._playSelectedAd> got durationchange; calling playAd()");
playAd();
} else if(evt.type === 'error') {
callback(new VASTError("on VASTIntegrator, Player is unable to play the Ad", 400), response);
}
//NOTE: If the ads get canceled we do nothing/
});
To reproduce the issue, try setting the src of the actual video element to a 15 seconds video then test the plugin with an Ad that is also 15 seconds long.
This issue has been reported multiple times under different names:
After some debugging, it seems that the main issue is that all these events depend on the
durationchange
event being fired. The problem is that this event won't fire if the original video content has the same length as the Ad being played and theVASTIntegrator
will never know that theAdUnit
is actually playing.You can see that here:
To reproduce the issue, try setting the src of the actual video element to a 15 seconds video then test the plugin with an Ad that is also 15 seconds long.